diff options
author | Dianne Hackborn <hackbod@google.com> | 2009-09-28 13:25:46 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2009-09-28 13:40:45 -0700 |
commit | 6af0d50a8edb101d9da1306b6d85abf5dd3f9a30 (patch) | |
tree | 0680cd7ce5f407446a1b5d50095deada73d2e508 /services/java/com/android/server/SystemServer.java | |
parent | aef439e6f825c0cb99a2ac08c8207f48b7a9fe10 (diff) | |
download | frameworks_base-6af0d50a8edb101d9da1306b6d85abf5dd3f9a30.zip frameworks_base-6af0d50a8edb101d9da1306b6d85abf5dd3f9a30.tar.gz frameworks_base-6af0d50a8edb101d9da1306b6d85abf5dd3f9a30.tar.bz2 |
Fix issue #2149145: Safe Mode does not work on Sholes device
The APIs for checking whether keys are held down now also look
at virtual keys.
However it turns out there is less than a second between the time we
start the input thread and check for safe mode, so there is not enough
time to actually open all of the devices and get the data from them
about the finger being down to determine if a virtual key is down.
So now you can also hold DPAD center, trackball center, or s to
enter safe mode. Also give some vibrator feedback.
Change-Id: I55edce63bc0c375813bd3751766b8070beeb0153
Diffstat (limited to 'services/java/com/android/server/SystemServer.java')
-rw-r--r-- | services/java/com/android/server/SystemServer.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java index b3b50e5..65b3e3f 100644 --- a/services/java/com/android/server/SystemServer.java +++ b/services/java/com/android/server/SystemServer.java @@ -365,8 +365,17 @@ class ServerThread extends Thread { mContentResolver.registerContentObserver(Settings.Secure.getUriFor(Settings.Secure.ADB_ENABLED), false, new AdbSettingsObserver()); - // It is now time to start up the app processes... + // Before things start rolling, be sure we have decided whether + // we are in safe mode. final boolean safeMode = wm.detectSafeMode(); + if (safeMode) { + try { + ActivityManagerNative.getDefault().enterSafeMode(); + } catch (RemoteException e) { + } + } + + // It is now time to start up the app processes... if (notification != null) { notification.systemReady(); |