Merge "Ignore clicks on developer switch UI during monkey test" into oc-mr1-dev

This commit is contained in:
TreeHugger Robot
2017-07-20 22:17:50 +00:00
committed by Android (Google) Code Review
4 changed files with 56 additions and 13 deletions

View File

@@ -630,6 +630,9 @@ public class DevelopmentSettings extends RestrictedSettingsFragment
return;
}
if (Utils.isMonkeyRunning()) {
return;
}
mSwitchBar.addOnSwitchChangeListener(this);
}

View File

@@ -117,6 +117,9 @@ public class BuildNumberPreferenceController extends AbstractPreferenceControlle
if (!TextUtils.equals(preference.getKey(), KEY_BUILD_NUMBER)) {
return false;
}
if (Utils.isMonkeyRunning()) {
return false;
}
// Don't enable developer options for secondary users.
if (!mUm.isAdminUser()) {
mMetricsFeatureProvider.action(