package o; import android.app.AppOpsManager; import android.content.Context; import android.os.Binder; import android.os.Build; /* loaded from: classes.dex */ public final class hqT { public static String e(String str) { return Sts.e(str); } public static int a(Context context, String str, String str2) { return Sts.mi_((AppOpsManager) Sts.e(context, AppOpsManager.class), str, str2); } public static int d(Context context, int i, String str, String str2) { if (Build.VERSION.SDK_INT >= 29) { AppOpsManager mk_ = RVV.mk_(context); int mj_ = RVV.mj_(mk_, str, Binder.getCallingUid(), str2); return mj_ != 0 ? mj_ : RVV.mj_(mk_, str, i, RVV.b(context)); } return a(context, str, str2); } /* loaded from: classes.dex */ static class RVV { static AppOpsManager mk_(Context context) { return (AppOpsManager) context.getSystemService(AppOpsManager.class); } static int mj_(AppOpsManager appOpsManager, String str, int i, String str2) { if (appOpsManager == null) { return 1; } return appOpsManager.checkOpNoThrow(str, i, str2); } static String b(Context context) { return context.getOpPackageName(); } } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes.dex */ public static class Sts { static String e(String str) { return AppOpsManager.permissionToOp(str); } static T e(Context context, Class cls) { return (T) context.getSystemService(cls); } static int mi_(AppOpsManager appOpsManager, String str, String str2) { return appOpsManager.noteProxyOpNoThrow(str, str2); } } }