Ignore clicks on developer switch UI during monkey test

Change-Id: I10c4771386bb38e117848da385090dec78e4a2f8
Fix: 63852950
Test: robotests
This commit is contained in:
Fan Zhang
2017-07-19 16:06:15 -07:00
parent b49578e485
commit bac6458a22
4 changed files with 56 additions and 13 deletions

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(