Merge "Strip transition information from activityoptions once it is read." into sc-v2-dev

This commit is contained in:
Evan Rosky
2022-08-02 23:30:03 +00:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 0 deletions

View File

@@ -1352,6 +1352,11 @@ public class ActivityOptions {
return mRemoteTransition; return mRemoteTransition;
} }
/** @hide */
public void setRemoteTransition(@Nullable RemoteTransition remoteTransition) {
mRemoteTransition = remoteTransition;
}
/** @hide */ /** @hide */
public static ActivityOptions fromBundle(Bundle bOptions) { public static ActivityOptions fromBundle(Bundle bOptions) {
return bOptions != null ? new ActivityOptions(bOptions) : null; return bOptions != null ? new ActivityOptions(bOptions) : null;

View File

@@ -4426,6 +4426,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
mPendingRemoteAnimation = options.getRemoteAnimationAdapter(); mPendingRemoteAnimation = options.getRemoteAnimationAdapter();
} }
mPendingRemoteTransition = options.getRemoteTransition(); mPendingRemoteTransition = options.getRemoteTransition();
// Since options gets sent to client apps, remove transition information from it.
options.setRemoteTransition(null);
options.setRemoteAnimationAdapter(null);
} }
void applyOptionsAnimation() { void applyOptionsAnimation() {