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 /core | |
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 'core')
5 files changed, 25 insertions, 7 deletions
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl index 7d13399..0d5df99 100644 --- a/core/java/android/view/IWindowManager.aidl +++ b/core/java/android/view/IWindowManager.aidl @@ -120,6 +120,7 @@ interface IWindowManager boolean isKeyguardSecure(); boolean inKeyguardRestrictedInputMode(); void dismissKeyguard(); + void keyguardGoingAway(); void closeSystemDialogs(String reason); diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java index 1bb20c9..cfb40da 100644 --- a/core/java/android/view/WindowManagerPolicy.java +++ b/core/java/android/view/WindowManagerPolicy.java @@ -603,8 +603,15 @@ public interface WindowManagerPolicy { * Return whether the given window should forcibly hide everything * behind it. Typically returns true for the keyguard. */ - public boolean doesForceHide(WindowState win, WindowManager.LayoutParams attrs); - + public boolean doesForceHide(WindowManager.LayoutParams attrs); + + + /** + * Return whether the given window can become one that passes doesForceHide() test. + * Typically returns true for the StatusBar. + */ + public boolean isKeyguardHostWindow(WindowManager.LayoutParams attrs); + /** * Determine if a window that is behind one that is force hiding * (as determined by {@link #doesForceHide}) should actually be hidden. @@ -613,7 +620,7 @@ public interface WindowManagerPolicy { * will conflict with what you set. */ public boolean canBeForceHidden(WindowState win, WindowManager.LayoutParams attrs); - + /** * Called when the system would like to show a UI to indicate that an * application is starting. You can use this to add a @@ -1190,4 +1197,9 @@ public interface WindowManagerPolicy { * @return True if the window is a top level one. */ public boolean isTopLevelWindow(int windowType); + + /** + * Notifies the keyguard to start fading out. + */ + public void startKeyguardExitAnimation(long fadeoutDuration); } diff --git a/core/java/com/android/internal/policy/IKeyguardService.aidl b/core/java/com/android/internal/policy/IKeyguardService.aidl index b78c70f..f22800c 100644 --- a/core/java/com/android/internal/policy/IKeyguardService.aidl +++ b/core/java/com/android/internal/policy/IKeyguardService.aidl @@ -56,4 +56,10 @@ interface IKeyguardService { oneway void dispatch(in MotionEvent event); oneway void launchCamera(); oneway void onBootCompleted(); + + /** + * Notifies that the activity behind has now been drawn and it's safe to remove the wallpaper + * and keyguard flag. + */ + oneway void startKeyguardExitAnimation(long fadeoutDuration); } diff --git a/core/res/res/anim/lock_screen_behind_enter.xml b/core/res/res/anim/lock_screen_behind_enter.xml index cb47b3c..4a956d7 100644 --- a/core/res/res/anim/lock_screen_behind_enter.xml +++ b/core/res/res/anim/lock_screen_behind_enter.xml @@ -20,9 +20,8 @@ <set xmlns:android="http://schemas.android.com/apk/res/android" android:background="#ff000000" android:shareInterpolator="false"> <alpha - android:fromAlpha="0.0" android:toAlpha="1.0" + android:fromAlpha="1.0" android:toAlpha="1.0" android:fillEnabled="true" android:fillBefore="true" android:interpolator="@interpolator/decelerate_quint" - android:startOffset="@android:integer/config_shortAnimTime" - android:duration="@android:integer/config_shortAnimTime"/> + android:duration="0"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/lock_screen_wallpaper_behind_enter.xml b/core/res/res/anim/lock_screen_wallpaper_behind_enter.xml index c29fd1a..f7a6a65 100644 --- a/core/res/res/anim/lock_screen_wallpaper_behind_enter.xml +++ b/core/res/res/anim/lock_screen_wallpaper_behind_enter.xml @@ -23,6 +23,6 @@ android:fromAlpha="0.0" android:toAlpha="1.0" android:fillEnabled="true" android:fillBefore="true" android:interpolator="@interpolator/decelerate_quad" - android:startOffset="@android:integer/config_shortAnimTime" + android:startOffset="@android:integer/config_mediumAnimTime" android:duration="@android:integer/config_shortAnimTime"/> </set> |