package uh2; import android.annotation.TargetApi; import android.app.AppOpsManager; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.os.Binder; import android.os.Build; import android.util.Log; import com.tencent.wcdb.database.SQLiteDatabase; /* compiled from: OppoUtils */ public class f { public static void a(Context context) { try { Intent intent = new Intent(); intent.setFlags(SQLiteDatabase.CREATE_IF_NECESSARY); intent.setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.sysfloatwindow.FloatWindowListActivity")); context.startActivity(intent); } catch (Exception e14) { e14.printStackTrace(); } } public static boolean b(Context context) { if (Build.VERSION.SDK_INT >= 19) { return c(context, 24); } return true; } @TargetApi(19) public static boolean c(Context context, int i10) { if (Build.VERSION.SDK_INT >= 19) { AppOpsManager appOpsManager = (AppOpsManager) context.getSystemService("appops"); try { Class cls = Integer.TYPE; if (((Integer) AppOpsManager.class.getDeclaredMethod("checkOp", cls, cls, String.class).invoke(appOpsManager, Integer.valueOf(i10), Integer.valueOf(Binder.getCallingUid()), context.getPackageName())).intValue() == 0) { return true; } return false; } catch (Exception e14) { Log.e("OppoUtils", Log.getStackTraceString(e14)); } } else { Log.e("OppoUtils", "Below API 19 cannot invoke!"); return false; } } }