diff options
| author | John Spurlock <jspurlock@google.com> | 2012-05-29 14:37:05 -0400 |
|---|---|---|
| committer | John Spurlock <jspurlock@google.com> | 2012-05-29 18:19:57 -0400 |
| commit | 960779d3bbc6f2c767432ce48aca1e12cb0093b7 (patch) | |
| tree | 7f992265b22bf9e547aae6e4daf856949b5609e6 | |
| parent | 48c22c84c089213dda6495fbdeb384e400c7c5c5 (diff) | |
| download | frameworks_base-960779d3bbc6f2c767432ce48aca1e12cb0093b7.zip frameworks_base-960779d3bbc6f2c767432ce48aca1e12cb0093b7.tar.gz frameworks_base-960779d3bbc6f2c767432ce48aca1e12cb0093b7.tar.bz2 | |
Dock: Renable desk-dock apps
Revert to pre-dreams behavior. DeskClock once again launches the correct
activity (instead of Screensaver) when desk-dock is attached.
Bug: 6559590
Change-Id: I32a03a25469f17b5e87e16831839ec757d56c90b
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/DreamsDockLauncher.java | 4 | ||||
| -rw-r--r-- | services/java/com/android/server/UiModeManagerService.java | 24 |
2 files changed, 14 insertions, 14 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/DreamsDockLauncher.java b/packages/SystemUI/src/com/android/systemui/DreamsDockLauncher.java index 1db2a7f..73249b4 100644 --- a/packages/SystemUI/src/com/android/systemui/DreamsDockLauncher.java +++ b/packages/SystemUI/src/com/android/systemui/DreamsDockLauncher.java @@ -58,8 +58,8 @@ public class DreamsDockLauncher extends Activity { @Override public void onReceive(Context context, Intent intent) { final boolean activateOnDock = 0 != Settings.Secure.getInt( - context.getContentResolver(), - Settings.Secure.SCREENSAVER_ACTIVATE_ON_DOCK, 1); + context.getContentResolver(), + Settings.Secure.SCREENSAVER_ACTIVATE_ON_DOCK, 0); if (!activateOnDock) return; diff --git a/services/java/com/android/server/UiModeManagerService.java b/services/java/com/android/server/UiModeManagerService.java index c936ef9..d1f92a7 100644 --- a/services/java/com/android/server/UiModeManagerService.java +++ b/services/java/com/android/server/UiModeManagerService.java @@ -65,7 +65,7 @@ class UiModeManagerService extends IUiModeManager.Stub { // Enable launching of applications when entering the dock. private static final boolean ENABLE_LAUNCH_CAR_DOCK_APP = true; - private static final boolean ENABLE_LAUNCH_DESK_DOCK_APP = false; + private static final boolean ENABLE_LAUNCH_DESK_DOCK_APP = true; private static final int MSG_UPDATE_TWILIGHT = 0; private static final int MSG_ENABLE_LOCATION_UPDATES = 1; @@ -120,7 +120,7 @@ class UiModeManagerService extends IUiModeManager.Stub { | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); return intent; } - + // The broadcast receiver which receives the result of the ordered broadcast sent when // the dock state changes. The original ordered broadcast is sent with an initial result // code of RESULT_OK. If any of the registered broadcast receivers changes this value, e.g., @@ -130,7 +130,7 @@ class UiModeManagerService extends IUiModeManager.Stub { public void onReceive(Context context, Intent intent) { if (getResultCode() != Activity.RESULT_OK) { if (LOG) { - Slog.v(TAG, "Handling broadcast result for action " + intent.getAction() + Slog.v(TAG, "Handling broadcast result for action " + intent.getAction() + ": canceled: " + getResultCode()); } return; @@ -138,7 +138,7 @@ class UiModeManagerService extends IUiModeManager.Stub { final int enableFlags = intent.getIntExtra("enableFlags", 0); final int disableFlags = intent.getIntExtra("disableFlags", 0); - + synchronized (mLock) { // Launch a dock activity String category = null; @@ -166,15 +166,15 @@ class UiModeManagerService extends IUiModeManager.Stub { if (LOG) { Slog.v(TAG, String.format( - "Handling broadcast result for action %s: enable=0x%08x disable=0x%08x category=%s", + "Handling broadcast result for action %s: enable=0x%08x disable=0x%08x category=%s", intent.getAction(), enableFlags, disableFlags, category)); } - + if (category != null) { // This is the new activity that will serve as home while // we are in care mode. Intent homeIntent = buildHomeIntent(category); - + // Now we are going to be careful about switching the // configuration and starting the activity -- we need to // do this in a specific order under control of the @@ -479,8 +479,8 @@ class UiModeManagerService extends IUiModeManager.Stub { } if (LOG) { - Slog.d(TAG, - "updateConfigurationLocked: mDockState=" + mDockState + Slog.d(TAG, + "updateConfigurationLocked: mDockState=" + mDockState + "; mCarMode=" + mCarModeEnabled + "; mNightMode=" + mNightMode + "; uiMode=" + uiMode); @@ -657,7 +657,7 @@ class UiModeManagerService extends IUiModeManager.Stub { boolean mNetworkListenerEnabled; boolean mDidFirstInit; long mLastNetworkRegisterTime = -MIN_LOCATION_UPDATE_MS; - + @Override public void handleMessage(Message msg) { switch (msg.what) { @@ -682,12 +682,12 @@ class UiModeManagerService extends IUiModeManager.Stub { // since we last requested an update. return; } - + // Unregister the current location monitor, so we can // register a new one for it to get an immediate update. mNetworkListenerEnabled = false; mLocationManager.removeUpdates(mEmptyLocationListener); - + // Fall through to re-register listener. case MSG_ENABLE_LOCATION_UPDATES: // enable network provider to receive at least location updates for a given |
