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

Commit 99ae19d1 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by android-build-merger
Browse files

Merge "Remove prolonged animations" into pi-dev am: 5bdf9530

am: 92cb00c2

Change-Id: Ibab85ea0385f09ac332553e51b13c4638c6d6d98
parents 8d72a03e 92cb00c2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -128,7 +128,10 @@ interface IWindowManager
    void overridePendingAppTransitionRemote(in RemoteAnimationAdapter remoteAnimationAdapter);
    void executeAppTransition();

    /** Used by system ui to report that recents has shown itself. */
    /**
      * Used by system ui to report that recents has shown itself.
      * @deprecated to be removed once prebuilts are updated
      */
    void endProlongedAnimations();

    // Re-evaluate the current orientation from the caller's state.
+0 −8
Original line number Diff line number Diff line
@@ -104,14 +104,6 @@ public class WindowManagerWrapper {
        }
    }

    public void endProlongedAnimations() {
        try {
            WindowManagerGlobal.getWindowManagerService().endProlongedAnimations();
        } catch (RemoteException e) {
            Log.w(TAG, "Failed to end prolonged animations: ", e);
        }
    }

    /**
     * Enable or disable haptic feedback on the navigation bar buttons.
     */
+0 −3
Original line number Diff line number Diff line
@@ -835,9 +835,6 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
    @Override
    public boolean onPreDraw() {
        mRecentsView.getViewTreeObserver().removeOnPreDrawListener(this);
        // We post to make sure that this information is delivered after this traversals is
        // finished.
        mRecentsView.post(() -> WindowManagerWrapper.getInstance().endProlongedAnimations());
        return true;
    }

+0 −17
Original line number Diff line number Diff line
@@ -245,7 +245,6 @@ public class AppTransition implements Dump {

    private int mLastClipRevealMaxTranslation;
    private boolean mLastHadClipReveal;
    private boolean mProlongedAnimationsEnded;

    private final boolean mGridLayoutRecentsEnabled;
    private final boolean mLowRamRecentsEnabled;
@@ -423,27 +422,12 @@ public class AppTransition implements Dump {
        mService.getDefaultDisplayContentLocked().getDockedDividerController()
                .notifyAppTransitionStarting(openingApps, transit);

        // Prolong the start for the transition when docking a task from recents, unless recents
        // ended it already then we don't need to wait.
        if (transit == TRANSIT_DOCK_TASK_FROM_RECENTS && !mProlongedAnimationsEnded) {
            for (int i = openingApps.size() - 1; i >= 0; i--) {
                final AppWindowToken app = openingApps.valueAt(i);
                app.startDelayingAnimationStart();
            }
        }
        if (mRemoteAnimationController != null) {
            mRemoteAnimationController.goodToGo();
        }
        return redoLayout;
    }

    /**
     * Let the transitions manager know that the somebody wanted to end the prolonged animations.
     */
    void notifyProlongedAnimationsEnded() {
        mProlongedAnimationsEnded = true;
    }

    void clear() {
        mNextAppTransitionType = NEXT_TRANSIT_TYPE_NONE;
        mNextAppTransitionPackage = null;
@@ -452,7 +436,6 @@ public class AppTransition implements Dump {
        mNextAppTransitionAnimationsSpecsFuture = null;
        mDefaultNextAppTransitionAnimationSpec = null;
        mAnimationFinishedCallback = null;
        mProlongedAnimationsEnded = false;
    }

    void freeze() {
+1 −9
Original line number Diff line number Diff line
@@ -2677,15 +2677,7 @@ public class WindowManagerService extends IWindowManager.Stub

    @Override
    public void endProlongedAnimations() {
        synchronized (mWindowMap) {
            for (final WindowState win : mWindowMap.values()) {
                final AppWindowToken appToken = win.mAppToken;
                if (appToken != null) {
                    appToken.endDelayingAnimationStart();
                }
            }
            mAppTransition.notifyProlongedAnimationsEnded();
        }
        // TODO: Remove once clients are updated.
    }

    @Override