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

Commit e9f61e06 authored by Johannes Gallmann's avatar Johannes Gallmann Committed by Android (Google) Code Review
Browse files

Merge "Ensure Statusbar icon color is reset after predictive back" into main

parents 3fa36e3c d6afd39e
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -130,7 +130,14 @@ public class BackAnimationBackground {
                    mStartBounds);
            mCustomizer.customizeStatusBarAppearance(region);
        } else {
            mCustomizer.customizeStatusBarAppearance(null);
            resetStatusBarCustomization();
        }
    }

    /**
     * Resets the statusbar customization
     */
    public void resetStatusBarCustomization() {
        mCustomizer.customizeStatusBarAppearance(null);
    }
}
+5 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static android.view.RemoteAnimationTarget.MODE_OPENING;

import static com.android.internal.jank.InteractionJankMonitor.CUJ_PREDICTIVE_BACK_CROSS_ACTIVITY;
import static com.android.wm.shell.back.BackAnimationConstants.PROGRESS_COMMIT_THRESHOLD;
import static com.android.wm.shell.back.BackAnimationConstants.UPDATE_SYSUI_FLAGS_THRESHOLD;
import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BACK_PREVIEW;

import android.animation.Animator;
@@ -272,12 +273,16 @@ public class CrossActivityAnimation extends ShellBackAnimation {
        valueAnimator.addUpdateListener(animation -> {
            float progress = animation.getAnimatedFraction();
            updatePostCommitEnteringAnimation(progress);
            if (progress > 1 - UPDATE_SYSUI_FLAGS_THRESHOLD) {
                mBackground.resetStatusBarCustomization();
            }
            mTransaction.apply();
        });

        valueAnimator.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationEnd(Animator animation) {
                mBackground.resetStatusBarCustomization();
                finishAnimation();
            }
        });
+5 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static android.view.RemoteAnimationTarget.MODE_CLOSING;
import static android.view.RemoteAnimationTarget.MODE_OPENING;

import static com.android.internal.jank.InteractionJankMonitor.CUJ_PREDICTIVE_BACK_CROSS_TASK;
import static com.android.wm.shell.back.BackAnimationConstants.UPDATE_SYSUI_FLAGS_THRESHOLD;
import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_BACK_PREVIEW;

import android.animation.Animator;
@@ -287,12 +288,16 @@ public class CrossTaskBackAnimation extends ShellBackAnimation {
            float progress = animation.getAnimatedFraction();
            updatePostCommitEnteringAnimation(progress);
            updatePostCommitClosingAnimation(progress);
            if (progress > 1 - UPDATE_SYSUI_FLAGS_THRESHOLD) {
                mBackground.resetStatusBarCustomization();
            }
            mTransaction.apply();
        });

        valueAnimator.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationEnd(Animator animation) {
                mBackground.resetStatusBarCustomization();
                finishAnimation();
            }
        });