diff options
author | Jorim Jaggi <jjaggi@google.com> | 2014-05-21 01:34:15 +0200 |
---|---|---|
committer | Craig Mautner <cmautner@google.com> | 2014-05-27 16:45:57 -0700 |
commit | 0d674623facfbd3e9c520d2be4ed98977b92a1a2 (patch) | |
tree | ab6c7fd7cb671b0e32da414fb0c640af20403c71 /policy | |
parent | 41b170d6066cb52bb3e396c608b01f2981b95e5d (diff) | |
download | frameworks_base-0d674623facfbd3e9c520d2be4ed98977b92a1a2.zip frameworks_base-0d674623facfbd3e9c520d2be4ed98977b92a1a2.tar.gz frameworks_base-0d674623facfbd3e9c520d2be4ed98977b92a1a2.tar.bz2 |
Add methods to coordinate unlock animation.
Introduce IWindowManager.keyguardGoingAway to notify that Keyguard
wants to dismiss it self. This method starts the state machine in
WindowAnimator which animates in the activity behind the keyguard.
Animating out the keyguard is done by the StatusBar/Keyguard
software when it receives the startKeyguardExitAnimation() callback.
Bug: 14118756
Change-Id: Id3b8f41189410bad808b4892fbec74245e59efce
Diffstat (limited to 'policy')
3 files changed, 32 insertions, 1 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index e178773..fb02ebe 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -1567,11 +1567,16 @@ public class PhoneWindowManager implements WindowManagerPolicy { } @Override - public boolean doesForceHide(WindowState win, WindowManager.LayoutParams attrs) { + public boolean doesForceHide(WindowManager.LayoutParams attrs) { return (attrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0; } @Override + public boolean isKeyguardHostWindow(WindowManager.LayoutParams attrs) { + return attrs.type == TYPE_STATUS_BAR; + } + + @Override public boolean canBeForceHidden(WindowState win, WindowManager.LayoutParams attrs) { switch (attrs.type) { case TYPE_STATUS_BAR: @@ -4533,6 +4538,18 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } + @Override + public void startKeyguardExitAnimation(final long fadeoutDuration) { + if (mKeyguardDelegate != null) { + mHandler.post(new Runnable() { + @Override + public void run() { + mKeyguardDelegate.startKeyguardExitAnimation(fadeoutDuration); + } + }); + } + } + void sendCloseSystemWindows() { sendCloseSystemWindows(mContext, null); } 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 966924b..faf7020 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceDelegate.java @@ -274,6 +274,12 @@ public class KeyguardServiceDelegate { mKeyguardState.currentUser = newUserId; } + public void startKeyguardExitAnimation(long fadeoutDuration) { + if (mKeyguardService != null) { + mKeyguardService.startKeyguardExitAnimation(fadeoutDuration); + } + } + private static final View createScrim(Context context) { View view = new View(context); 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 7cb48fa..f236ce7 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceWrapper.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardServiceWrapper.java @@ -190,6 +190,14 @@ public class KeyguardServiceWrapper implements IKeyguardService { } } + public void startKeyguardExitAnimation(long fadeoutDuration) { + try { + mService.startKeyguardExitAnimation(fadeoutDuration); + } catch (RemoteException e) { + Slog.w(TAG , "Remote Exception", e); + } + } + public void showAssistant() { // Not used by PhoneWindowManager } |