commit | c28b3fda7010a7b265ee89987bf4e54cd6cbd769 | [log] [tgz] |
---|---|---|
author | jeffreyhuang <jeffreyhuang@google.com> | Mon Nov 13 11:31:40 2017 -0800 |
committer | jeffreyhuang <jeffreyhuang@google.com> | Mon Nov 13 12:48:16 2017 -0800 |
tree | 8c9bd4554162a17bb032a236e7c14e2e8b2d3c3d | |
parent | a414573d629fac07c0c6abe912a567d9bd6e0f34 [diff] |
Prevent monkey from opening dev options Change-Id: I155fc195a9f800ff099592244f13228646f586ac Fixes: 68707778 Test: Manual with settings app
diff --git a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java index 83f395f..038f183 100644 --- a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java +++ b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
@@ -135,6 +135,15 @@ } @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + if (Utils.isMonkeyRunning()) { + getActivity().finish(); + return; + } + } + + @Override public void onActivityCreated(Bundle icicle) { super.onActivityCreated(icicle); // Apply page-level restrictions