Loading src/com/android/settings/accessibility/AccessibilityDetailsSettingsFragment.java +3 −1 Original line number Diff line number Diff line Loading @@ -163,7 +163,9 @@ public class AccessibilityDetailsSettingsFragment extends InstrumentedFragment { try { final int mode = mAppOps.noteOpNoThrow(AppOpsManager.OP_ACCESS_RESTRICTED_SETTINGS, uid, packageName); return mode != AppOpsManager.MODE_ERRORED && mode != AppOpsManager.MODE_IGNORED; final boolean ecmEnabled = getContext().getResources().getBoolean( com.android.internal.R.bool.config_enhancedConfirmationModeEnabled); return !ecmEnabled || mode == AppOpsManager.MODE_ALLOWED; } catch (Exception e) { // Fallback in case if app ops is not available in testing. return true; Loading src/com/android/settings/accessibility/RestrictedPreferenceHelper.java +3 −1 Original line number Diff line number Diff line Loading @@ -233,7 +233,9 @@ public class RestrictedPreferenceHelper { final int mode = mAppOps.noteOpNoThrow( AppOpsManager.OP_ACCESS_RESTRICTED_SETTINGS, preference.getUid(), preference.getPackageName()); appOpsAllowed = mode == AppOpsManager.MODE_ALLOWED; final boolean ecmEnabled = mContext.getResources().getBoolean( com.android.internal.R.bool.config_enhancedConfirmationModeEnabled); appOpsAllowed = !ecmEnabled || mode == AppOpsManager.MODE_ALLOWED; serviceAllowed = appOpsAllowed; } catch (Exception e) { // Allow service in case if app ops is not available in testing. Loading Loading
src/com/android/settings/accessibility/AccessibilityDetailsSettingsFragment.java +3 −1 Original line number Diff line number Diff line Loading @@ -163,7 +163,9 @@ public class AccessibilityDetailsSettingsFragment extends InstrumentedFragment { try { final int mode = mAppOps.noteOpNoThrow(AppOpsManager.OP_ACCESS_RESTRICTED_SETTINGS, uid, packageName); return mode != AppOpsManager.MODE_ERRORED && mode != AppOpsManager.MODE_IGNORED; final boolean ecmEnabled = getContext().getResources().getBoolean( com.android.internal.R.bool.config_enhancedConfirmationModeEnabled); return !ecmEnabled || mode == AppOpsManager.MODE_ALLOWED; } catch (Exception e) { // Fallback in case if app ops is not available in testing. return true; Loading
src/com/android/settings/accessibility/RestrictedPreferenceHelper.java +3 −1 Original line number Diff line number Diff line Loading @@ -233,7 +233,9 @@ public class RestrictedPreferenceHelper { final int mode = mAppOps.noteOpNoThrow( AppOpsManager.OP_ACCESS_RESTRICTED_SETTINGS, preference.getUid(), preference.getPackageName()); appOpsAllowed = mode == AppOpsManager.MODE_ALLOWED; final boolean ecmEnabled = mContext.getResources().getBoolean( com.android.internal.R.bool.config_enhancedConfirmationModeEnabled); appOpsAllowed = !ecmEnabled || mode == AppOpsManager.MODE_ALLOWED; serviceAllowed = appOpsAllowed; } catch (Exception e) { // Allow service in case if app ops is not available in testing. Loading