Disallow turning off developer options in page-agnostic mode
When device is in page-agnostic mode, it would be OEM unlocked and filesystem will be different than production. Don't allow to turn off developer options in that state. Bug: 329657279 Bug: 295035851 Test: m Settings && adb install -r $ANDROID_PRODUCT_OUT/system_ext/priv-app/Settings/Settings.apk Change-Id: I9b8a9dbaf8192bb3758c53501450eb45e2fe8d9c
This commit is contained in:
@@ -577,6 +577,15 @@ public class DevelopmentSettingsDashboardFragment extends RestrictedDashboardFra
|
||||
if (Utils.isMonkeyRunning()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Disabling developer options in page-agnostic mode isn't supported as device isn't in
|
||||
// production state
|
||||
if (Enable16kUtils.isPageAgnosticModeOn(getContext())) {
|
||||
Enable16kUtils.showPageAgnosticWarning(getContext());
|
||||
onDisableDevelopmentOptionsRejected();
|
||||
return;
|
||||
}
|
||||
|
||||
DevelopmentSettingsEnabler.setDevelopmentSettingsEnabled(getContext(), false);
|
||||
final SystemPropPoker poker = SystemPropPoker.getInstance();
|
||||
poker.blockPokes();
|
||||
|
Reference in New Issue
Block a user