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

Commit 0489c145 authored by Wale Ogunwale's avatar Wale Ogunwale Committed by Android (Google) Code Review
Browse files

Merge "Reduce jank during pinned stack animation" into nyc-dev

parents 3b5a29cb 480dca0d
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -2882,6 +2882,11 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
            reply.writeInt(isForeground ? 1 : 0);
            return true;
        }
        case NOTIFY_PINNED_STACK_ANIMATION_ENDED_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            reply.writeNoException();
            return true;
        }
        }

        return super.onTransact(code, data, reply, flags);
@@ -6732,5 +6737,15 @@ class ActivityManagerProxy implements IActivityManager
        return isForeground;
    };

    @Override
    public void notifyPinnedStackAnimationEnded() throws RemoteException {
        Parcel data = Parcel.obtain();
        Parcel reply = Parcel.obtain();
        data.writeInterfaceToken(IActivityManager.descriptor);
        mRemote.transact(NOTIFY_PINNED_STACK_ANIMATION_ENDED_TRANSACTION, data, reply, 0);
        data.recycle();
        reply.recycle();
    };

    private IBinder mRemote;
}
+3 −0
Original line number Diff line number Diff line
@@ -597,6 +597,8 @@ public interface IActivityManager extends IInterface {

    public boolean supportsLocalVoiceInteraction() throws RemoteException;

    public void notifyPinnedStackAnimationEnded() throws RemoteException;

    /*
     * Private non-Binder interfaces
     */
@@ -972,4 +974,5 @@ public interface IActivityManager extends IInterface {
    int START_LOCAL_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 363;
    int STOP_LOCAL_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 364;
    int SUPPORTS_LOCAL_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 365;
    int NOTIFY_PINNED_STACK_ANIMATION_ENDED_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 366;
}
+5 −0
Original line number Diff line number Diff line
@@ -30,4 +30,9 @@ oneway interface ITaskStackListener {
     * brought to the front or a new Intent is delivered to it.
     */
    void onPinnedActivityRestartAttempt();

    /**
     * Called whenever the pinned stack is done animating a resize.
     */
    void onPinnedStackAnimationEnded();
}
+4 −0
Original line number Diff line number Diff line
@@ -124,6 +124,10 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
        public void onPinnedActivityRestartAttempt() {
        }

        @Override
        public void onPinnedStackAnimationEnded() {
        }

        /** Preloads the next task */
        public void run() {
            RecentsConfiguration config = Recents.getConfiguration();
+2 −2
Original line number Diff line number Diff line
@@ -318,13 +318,13 @@ public class RecentsTvActivity extends Activity implements OnPreDrawListener {
        switch (keyCode) {
            case KeyEvent.KEYCODE_DPAD_UP: {
                SystemServicesProxy ssp = Recents.getSystemServices();
                PipManager.getInstance().showPipMenu();
                PipManager.getInstance().resizePinnedStack(PipManager.STATE_PIP_MENU);
                ssp.focusPinnedStack();
                return true;
            }
            case KeyEvent.KEYCODE_DPAD_DOWN: {
                SystemServicesProxy ssp = Recents.getSystemServices();
                PipManager.getInstance().showPipOverlay(false);
                PipManager.getInstance().resizePinnedStack(PipManager.STATE_PIP_OVERLAY);
                ssp.focusHomeStack();
                return true;
            }
Loading