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

Commit 3a1d026b authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Restore overridePendingTransition to a sync binder call

Otherwise the calling activity is not blocked and can proceed
to change activity state, that may cause the override request
to be dropped. In addition, it is usually called after
startActivity and finish which are non-one-way binder calls.
The order also needs to be guaranteed to make the override
take effect.

Bug: 161781274
Bug: 179008865
Test: WindowUntrustedTouchTest# \
      testWhenExitAnimationAboveThresholdFromSameUid_allowsTouch
Change-Id: I7ca018a934972c195040f2a9f63a18a59dce9c48
parent 544ee86b
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -96,7 +96,14 @@ interface IActivityClientController {
    oneway void setInheritShowWhenLocked(in IBinder token, boolean setInheritShownWhenLocked);
    oneway void setTurnScreenOn(in IBinder token, boolean turnScreenOn);
    oneway void reportActivityFullyDrawn(in IBinder token, boolean restoredFromBundle);
    oneway void overridePendingTransition(in IBinder token, in String packageName,
    /**
     * Overrides the animation of activity pending transition. This call is not one-way because
     * the method is usually used after startActivity or Activity#finish. If this is non-blocking,
     * the calling activity may proceed to complete pause and become stopping state, which will
     * cause the request to be ignored. Besides, startActivity and Activity#finish are blocking
     * calls, so this method should be the same as them to keep the invocation order.
     */
    void overridePendingTransition(in IBinder token, in String packageName,
            int enterAnim, int exitAnim);
    int setVrMode(in IBinder token, boolean enabled, in ComponentName packageName);