diff options
author | John Spurlock <jspurlock@google.com> | 2013-04-08 20:05:50 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-04-08 20:05:50 +0000 |
commit | 04c83357c3dee87f08e63a11e67e89d78df81938 (patch) | |
tree | 11b940a3b9a6d62019d0ba77839cc27497c2cedf | |
parent | 7ce7b0068c869408003f512a4e04cc73be2f7c69 (diff) | |
parent | c8b46ca5754a9ac9e0afea2f9c0b5d9984c5c128 (diff) | |
download | frameworks_base-04c83357c3dee87f08e63a11e67e89d78df81938.zip frameworks_base-04c83357c3dee87f08e63a11e67e89d78df81938.tar.gz frameworks_base-04c83357c3dee87f08e63a11e67e89d78df81938.tar.bz2 |
Merge "Awaken dreams on home + recents." into jb-mr2-dev
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 1 | ||||
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 21 |
2 files changed, 21 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 52f552b..c2dc159 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -708,6 +708,7 @@ public class PhoneStatusBar extends BaseStatusBar { private View.OnClickListener mRecentsClickListener = new View.OnClickListener() { public void onClick(View v) { + awakenDreams(); toggleRecentApps(); } }; diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 49460de..5f9e921 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -59,6 +59,8 @@ import android.os.UEventObserver; import android.os.UserHandle; import android.os.Vibrator; import android.provider.Settings; +import android.service.dreams.DreamService; +import android.service.dreams.IDreamManager; import android.util.DisplayMetrics; import android.util.EventLog; import android.util.Log; @@ -1801,7 +1803,23 @@ public class PhoneWindowManager implements WindowManagerPolicy { ? com.android.internal.R.anim.lock_screen_wallpaper_behind_enter : com.android.internal.R.anim.lock_screen_behind_enter); } - + + private static void awakenDreams() { + IDreamManager dreamManager = getDreamManager(); + if (dreamManager != null) { + try { + dreamManager.awaken(); + } catch (RemoteException e) { + // fine, stay asleep then + } + } + } + + static IDreamManager getDreamManager() { + return IDreamManager.Stub.asInterface( + ServiceManager.checkService(DreamService.DREAM_SERVICE)); + } + static ITelephony getTelephonyService() { return ITelephony.Stub.asInterface( ServiceManager.checkService(Context.TELEPHONY_SERVICE)); @@ -4550,6 +4568,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } void startDockOrHome() { + awakenDreams(); // We don't have dock home anymore. Home is home. If you lived here, you'd be home by now. mContext.startActivityAsUser(mHomeIntent, UserHandle.CURRENT); } |