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

Commit 7be50af8 authored by Wale Ogunwale's avatar Wale Ogunwale Committed by android-build-merger
Browse files

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

am: 0489c145

* commit '0489c145':
  Reduce jank during pinned stack animation
parents 2bc4ba4e 0489c145
Loading
Loading
Loading
Loading
+15 −0
Original line number Original line Diff line number Diff line
@@ -2882,6 +2882,11 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
            reply.writeInt(isForeground ? 1 : 0);
            reply.writeInt(isForeground ? 1 : 0);
            return true;
            return true;
        }
        }
        case NOTIFY_PINNED_STACK_ANIMATION_ENDED_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            reply.writeNoException();
            return true;
        }
        }
        }


        return super.onTransact(code, data, reply, flags);
        return super.onTransact(code, data, reply, flags);
@@ -6732,5 +6737,15 @@ class ActivityManagerProxy implements IActivityManager
        return isForeground;
        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;
    private IBinder mRemote;
}
}
+3 −0
Original line number Original line Diff line number Diff line
@@ -597,6 +597,8 @@ public interface IActivityManager extends IInterface {


    public boolean supportsLocalVoiceInteraction() throws RemoteException;
    public boolean supportsLocalVoiceInteraction() throws RemoteException;


    public void notifyPinnedStackAnimationEnded() throws RemoteException;

    /*
    /*
     * Private non-Binder interfaces
     * 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 START_LOCAL_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 363;
    int STOP_LOCAL_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 364;
    int STOP_LOCAL_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 364;
    int SUPPORTS_LOCAL_VOICE_INTERACTION_TRANSACTION = IBinder.FIRST_CALL_TRANSACTION + 365;
    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 Original line Diff line number Diff line
@@ -30,4 +30,9 @@ oneway interface ITaskStackListener {
     * brought to the front or a new Intent is delivered to it.
     * brought to the front or a new Intent is delivered to it.
     */
     */
    void onPinnedActivityRestartAttempt();
    void onPinnedActivityRestartAttempt();

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


        @Override
        public void onPinnedStackAnimationEnded() {
        }

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