Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d674623 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Craig Mautner
Browse files

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
parent 41b170d6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -120,6 +120,7 @@ interface IWindowManager
    boolean isKeyguardSecure();
    boolean inKeyguardRestrictedInputMode();
    void dismissKeyguard();
    void keyguardGoingAway();

    void closeSystemDialogs(String reason);

+15 −3
Original line number Diff line number Diff line
@@ -603,7 +603,14 @@ 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
@@ -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);
}
+6 −0
Original line number Diff line number Diff line
@@ -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);
}
+2 −3
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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>
Loading