From e29b2dbc762bfa66093d76f5a65f55328d8753c9 Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Fri, 30 May 2014 23:17:03 +0200 Subject: Fade scrim in unlock animation. This also introduces a startTime which gets sent from window manager to SystemUI, which tells when the animation should start, to allow for a more synchronized animation with fading out the scrim and fading in the activity behind. Bug: 15163546 Change-Id: I16212b1ef9eb76f1f98734da1d14fc5b7e626937 --- .../android/internal/policy/impl/PhoneWindowManager.java | 14 ++++---------- .../policy/impl/keyguard/KeyguardServiceDelegate.java | 4 ++-- .../policy/impl/keyguard/KeyguardServiceWrapper.java | 4 ++-- 3 files changed, 8 insertions(+), 14 deletions(-) (limited to 'policy') diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index c483836..30282dd 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -1914,9 +1914,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { @Override public Animation createForceHideEnterAnimation(boolean onWallpaper) { - return AnimationUtils.loadAnimation(mContext, onWallpaper - ? com.android.internal.R.anim.lock_screen_wallpaper_behind_enter - : com.android.internal.R.anim.lock_screen_behind_enter); + return AnimationUtils.loadAnimation(mContext, + com.android.internal.R.anim.lock_screen_behind_enter); } private static void awakenDreams() { @@ -4571,14 +4570,9 @@ public class PhoneWindowManager implements WindowManagerPolicy { } @Override - public void startKeyguardExitAnimation(final long fadeoutDuration) { + public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) { if (mKeyguardDelegate != null) { - mHandler.post(new Runnable() { - @Override - public void run() { - mKeyguardDelegate.startKeyguardExitAnimation(fadeoutDuration); - } - }); + mKeyguardDelegate.startKeyguardExitAnimation(startTime, fadeoutDuration); } } diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java index faf7020..63a5850 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java @@ -274,9 +274,9 @@ public class KeyguardServiceDelegate { mKeyguardState.currentUser = newUserId; } - public void startKeyguardExitAnimation(long fadeoutDuration) { + public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) { if (mKeyguardService != null) { - mKeyguardService.startKeyguardExitAnimation(fadeoutDuration); + mKeyguardService.startKeyguardExitAnimation(startTime, fadeoutDuration); } } diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceWrapper.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceWrapper.java index f236ce7..5096bd3 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceWrapper.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceWrapper.java @@ -190,9 +190,9 @@ public class KeyguardServiceWrapper implements IKeyguardService { } } - public void startKeyguardExitAnimation(long fadeoutDuration) { + public void startKeyguardExitAnimation(long startTime, long fadeoutDuration) { try { - mService.startKeyguardExitAnimation(fadeoutDuration); + mService.startKeyguardExitAnimation(startTime, fadeoutDuration); } catch (RemoteException e) { Slog.w(TAG , "Remote Exception", e); } -- cgit v1.1