Files
rr3-apk/decompiled/sources/androidx/core/os/UserHandleCompat.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

56 lines
1.6 KiB
Java

package androidx.core.os;
import android.os.UserHandle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
/* loaded from: classes.dex */
public class UserHandleCompat {
@Nullable
private static Method sGetUserIdMethod;
@Nullable
private static Constructor<UserHandle> sUserHandleConstructor;
private UserHandleCompat() {
}
@NonNull
public static UserHandle getUserHandleForUid(int i) {
return Api24Impl.getUserHandleForUid(i);
}
@RequiresApi(24)
public static class Api24Impl {
private Api24Impl() {
}
@NonNull
public static UserHandle getUserHandleForUid(int i) {
return UserHandle.getUserHandleForUid(i);
}
}
private static Method getGetUserIdMethod() throws NoSuchMethodException {
if (sGetUserIdMethod == null) {
Method declaredMethod = UserHandle.class.getDeclaredMethod("getUserId", Integer.TYPE);
sGetUserIdMethod = declaredMethod;
declaredMethod.setAccessible(true);
}
return sGetUserIdMethod;
}
private static Constructor<UserHandle> getUserHandleConstructor() throws NoSuchMethodException {
if (sUserHandleConstructor == null) {
Constructor<UserHandle> declaredConstructor = UserHandle.class.getDeclaredConstructor(Integer.TYPE);
sUserHandleConstructor = declaredConstructor;
declaredConstructor.setAccessible(true);
}
return sUserHandleConstructor;
}
}