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

Commit bf1d985c authored by Matthew Ng's avatar Matthew Ng
Browse files

Clipping before keyguard dismiss animation occurs

When the keyguard is going away or from wallpaper, the clipping will be
applied before the animation starts to avoid showing the docked app over
the area that should be clipped by the divider in splitscreen.

Change-Id: I2ca8f77a2b5d514f65a2032d4279dcb4996814e1
Fixes: 34095975
Test: manual
parent 6e015391
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -44,6 +44,7 @@ import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ANIM;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_APP_TRANSITIONS;
import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_APP_TRANSITIONS;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
import static com.android.server.wm.WindowStateAnimator.STACK_CLIP_BEFORE_ANIM;
import static com.android.server.wm.WindowStateAnimator.STACK_CLIP_NONE;
import static com.android.server.wm.WindowStateAnimator.STACK_CLIP_NONE;
import static com.android.server.wm.WindowStateAnimator.STACK_CLIP_AFTER_ANIM;
import static com.android.server.wm.WindowStateAnimator.STACK_CLIP_AFTER_ANIM;


@@ -1652,10 +1653,14 @@ public class AppTransition implements Dump {
    }
    }


    int getAppStackClipMode() {
    int getAppStackClipMode() {
        // When dismiss keyguard animation occurs, clip before the animation to prevent docked
        // app from showing beyond the divider
        if (mNextAppTransition == TRANSIT_KEYGUARD_GOING_AWAY
                || mNextAppTransition == TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER) {
            return STACK_CLIP_BEFORE_ANIM;
        }
        return mNextAppTransition == TRANSIT_ACTIVITY_RELAUNCH
        return mNextAppTransition == TRANSIT_ACTIVITY_RELAUNCH
                || mNextAppTransition == TRANSIT_DOCK_TASK_FROM_RECENTS
                || mNextAppTransition == TRANSIT_DOCK_TASK_FROM_RECENTS
                || mNextAppTransition == TRANSIT_KEYGUARD_GOING_AWAY
                || mNextAppTransition == TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER
                || mNextAppTransitionType == NEXT_TRANSIT_TYPE_CLIP_REVEAL
                || mNextAppTransitionType == NEXT_TRANSIT_TYPE_CLIP_REVEAL
                ? STACK_CLIP_NONE
                ? STACK_CLIP_NONE
                : STACK_CLIP_AFTER_ANIM;
                : STACK_CLIP_AFTER_ANIM;