summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/keyguard
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2014-07-03 13:46:07 +0200
committerAdrian Roos <roosa@google.com>2014-07-04 18:28:36 +0200
commit0002a45034b1103ffc5ecf4d5a14b7d1ba225005 (patch)
tree23bbb4a9524780e95ea775974ab06c4aa8ba0f6a /packages/SystemUI/src/com/android/systemui/keyguard
parent30afdcad9156e8d110602e53a7977cc4ac7004c3 (diff)
downloadframeworks_base-0002a45034b1103ffc5ecf4d5a14b7d1ba225005.zip
frameworks_base-0002a45034b1103ffc5ecf4d5a14b7d1ba225005.tar.gz
frameworks_base-0002a45034b1103ffc5ecf4d5a14b7d1ba225005.tar.bz2
Show bouncer when opening notification in occluded mode
When showing apps on top of keyguard, properly put up a bouncer when a notification is clicked. Bug: 15588412 Change-Id: I48bcc5cc17c32856c11e7ab28182cdc3f253ad98
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/keyguard')
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 0681ff4..6c00f4c 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -48,7 +48,8 @@ import android.view.IWindowManager;
import android.view.ViewGroup;
import android.view.WindowManagerGlobal;
import android.view.WindowManagerPolicy;
-
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
import com.android.internal.policy.IKeyguardExitCallback;
import com.android.internal.policy.IKeyguardShowCallback;
import com.android.internal.telephony.IccCardConstants;
@@ -262,6 +263,12 @@ public class KeyguardViewMediator extends SystemUI {
private int mLockSoundStreamId;
/**
+ * The animation used for hiding keyguard. This is used to fetch the animation timings if
+ * WindowManager is not providing us with them.
+ */
+ private Animation mHideAnimation;
+
+ /**
* The volume applied to the lock/unlock sounds.
*/
private float mLockSoundVolume;
@@ -482,6 +489,9 @@ public class KeyguardViewMediator extends SystemUI {
int lockSoundDefaultAttenuation = mContext.getResources().getInteger(
com.android.internal.R.integer.config_lockSoundVolumeDb);
mLockSoundVolume = (float)Math.pow(10, (float)lockSoundDefaultAttenuation/20);
+
+ mHideAnimation = AnimationUtils.loadAnimation(mContext,
+ com.android.internal.R.anim.lock_screen_behind_enter);
}
@Override
@@ -1192,7 +1202,7 @@ public class KeyguardViewMediator extends SystemUI {
if (DEBUG) Log.d(TAG, "handleHide");
try {
mHiding = true;
- if (mShowing) {
+ if (mShowing && !mOccluded) {
// Don't actually hide the Keyguard at the moment, wait for window manager until
// it tells us it's safe to do so with startKeyguardExitAnimation.
@@ -1201,7 +1211,9 @@ public class KeyguardViewMediator extends SystemUI {
// Don't try to rely on WindowManager - if Keyguard wasn't showing, window
// manager won't start the exit animation.
- handleStartKeyguardExitAnimation(0, 0);
+ handleStartKeyguardExitAnimation(
+ SystemClock.uptimeMillis() + mHideAnimation.getStartOffset(),
+ mHideAnimation.getDuration());
}
} catch (RemoteException e) {
Log.e(TAG, "Error while calling WindowManager", e);