OSDN Git Service

Don't allow monkey to play with SIM lock settings. Bug # 2358489. DO NOT MERGE
authorAmith Yamasani <yamasani@google.com>
Fri, 8 Jan 2010 03:05:07 +0000 (19:05 -0800)
committerAmith Yamasani <yamasani@google.com>
Tue, 12 Jan 2010 22:55:16 +0000 (14:55 -0800)
Backport from froyo.

If the monkey is running, exit the SIM lock settings activity.

src/com/android/settings/IccLockSettings.java

index 3a7a708..6494567 100644 (file)
@@ -119,6 +119,11 @@ public class IccLockSettings extends PreferenceActivity
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
+        if (Utils.isMonkeyRunning()) {
+            finish();
+            return;
+        }
+
         addPreferencesFromResource(R.xml.sim_lock_settings);
 
         mPinDialog = (EditPinPreference) findPreference(PIN_DIALOG);