Prevent sync state changes when user is a monkey
Bug: 7385019 Change-Id: Icf305683e57b83b3260f2587ae0a3d1a6dc3c21d
This commit is contained in:
@@ -553,7 +553,11 @@ public class DataUsageSummary extends Fragment {
|
||||
return true;
|
||||
}
|
||||
case R.id.data_usage_menu_auto_sync: {
|
||||
ConfirmAutoSyncChangeFragment.show(this, !item.isChecked());
|
||||
if (ActivityManager.isUserAMonkey()) {
|
||||
Log.d("SyncState", "ignoring monkey's attempt to flip global sync state");
|
||||
} else {
|
||||
ConfirmAutoSyncChangeFragment.show(this, !item.isChecked());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user