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

Commit 8d2e6a80 authored by Matt Sziklay's avatar Matt Sziklay Committed by Android (Google) Code Review
Browse files

Merge "Skip fade out animator if current type is NO_INDICATOR." into main

parents e83ada6d 2116f0e1
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -120,6 +120,7 @@ public class DesktopModeVisualIndicator {
    private View mView;
    private IndicatorType mCurrentType;
    private DragStartState mDragStartState;
    private boolean mIsReleased;

    public DesktopModeVisualIndicator(SyncTransactionQueue syncQueue,
            ActivityManager.RunningTaskInfo taskInfo, DisplayController displayController,
@@ -240,6 +241,7 @@ public class DesktopModeVisualIndicator {
     * Create a fullscreen indicator with no animation
     */
    private void createView() {
        if (mIsReleased) return;
        final SurfaceControl.Transaction t = new SurfaceControl.Transaction();
        final Resources resources = mContext.getResources();
        final DisplayMetrics metrics = resources.getDisplayMetrics();
@@ -295,6 +297,12 @@ public class DesktopModeVisualIndicator {
     * @param finishCallback called when animation ends or gets cancelled
     */
    void fadeOutIndicator(@Nullable Runnable finishCallback) {
        if (mCurrentType == NO_INDICATOR) {
            // In rare cases, fade out can be requested before the indicator has determined its
            // initial type and started animating in. In this case, no animator is needed.
            finishCallback.run();
            return;
        }
        final VisualIndicatorAnimator animator = VisualIndicatorAnimator
                .fadeBoundsOut(mView, mCurrentType,
                        mDisplayController.getDisplayLayout(mTaskInfo.displayId));
@@ -335,6 +343,7 @@ public class DesktopModeVisualIndicator {
     * Release the indicator and its components when it is no longer needed.
     */
    public void releaseVisualIndicator(SurfaceControl.Transaction t) {
        mIsReleased = true;
        if (mViewHost == null) return;
        if (mViewHost != null) {
            mViewHost.release();