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

Commit 988f6688 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Lock free app animations (4/n): Implement thubmnail

Bug: 64674361
Test: go/wm-smoke
Change-Id: I8f25dae04b69613c93ccb5416c2cda2df6373103
parent 980c9de9
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -626,9 +626,6 @@ interface IActivityManager {
    /** Cancels the window transitions for the given task. */
    void cancelTaskWindowTransition(int taskId);

    /** Cancels the thumbnail transitions for the given task. */
    void cancelTaskThumbnailTransition(int taskId);

    /**
     * @param taskId the id of the task to retrieve the sAutoapshots for
     * @param reducedResolution if set, if the snapshot needs to be loaded from disk, this will load
+0 −11
Original line number Diff line number Diff line
@@ -413,15 +413,4 @@ public class ActivityManagerWrapper {
            Log.w(TAG, "Failed to cancel window transition for task=" + taskId, e);
        }
    }

    /**
     * Cancels the current thumbnail transtion to/from Recents for the given task id.
     */
    public void cancelThumbnailTransition(int taskId) {
        try {
            ActivityManager.getService().cancelTaskThumbnailTransition(taskId);
        } catch (RemoteException e) {
            Log.w(TAG, "Failed to cancel window transition for task=" + taskId, e);
        }
    }
}
+0 −14
Original line number Diff line number Diff line
@@ -198,20 +198,6 @@ public class PipManager implements BasePipManager {
     * Expands the PIP.
     */
    public final void onBusEvent(ExpandPipEvent event) {
        if (event.clearThumbnailWindows) {
            try {
                StackInfo stackInfo = mActivityManager.getStackInfo(
                        WINDOWING_MODE_PINNED, ACTIVITY_TYPE_UNDEFINED);
                if (stackInfo != null && stackInfo.taskIds != null) {
                    ActivityManagerWrapper am = ActivityManagerWrapper.getInstance();
                    for (int taskId : stackInfo.taskIds) {
                        am.cancelThumbnailTransition(taskId);
                    }
                }
            } catch (RemoteException e) {
                // Do nothing
            }
        }
        mTouchHandler.getMotionHelper().expandPip(false /* skipAnimation */);
    }

+0 −1
Original line number Diff line number Diff line
@@ -709,7 +709,6 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
                (event.launchTask == null || launchToTaskId != event.launchTask.key.id)) {
            ActivityManagerWrapper am = ActivityManagerWrapper.getInstance();
            am.cancelWindowTransition(launchState.launchedToTaskId);
            am.cancelThumbnailTransition(getTaskId());
        }
    }

+0 −1
Original line number Diff line number Diff line
@@ -22,5 +22,4 @@ import com.android.systemui.recents.events.EventBus;
 * This is sent when the PiP should be expanded due to being relaunched.
 */
public class ExpandPipEvent extends EventBus.Event {
    public final boolean clearThumbnailWindows = true;
}
Loading