Strip transition information from activityoptions once it is read.
The implementation of shared-element transitions takes the ActivityOptions from the calling activity and sends them to another activity. This means that any sensitive information passed into ActivityManager via ActivityOptions can make its way to an unrelated app. Recently a RemoteTransition object was added which includes some sensitive information. This CL strips the sensitive information from the activity options after it is extracted so that it can't be sent to the target. Bug: 237290578 Test: atest ActivityManagerTest#testActivityManager_stripTransitionFromActivityOptions Change-Id: Ic9f8062e67ab895292af75e97a9ce2f4aa45d467
This commit is contained in:
@@ -1352,6 +1352,11 @@ public class ActivityOptions {
|
||||
return mRemoteTransition;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public void setRemoteTransition(@Nullable RemoteTransition remoteTransition) {
|
||||
mRemoteTransition = remoteTransition;
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
public static ActivityOptions fromBundle(Bundle bOptions) {
|
||||
return bOptions != null ? new ActivityOptions(bOptions) : null;
|
||||
|
||||
@@ -4426,6 +4426,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
||||
mPendingRemoteAnimation = options.getRemoteAnimationAdapter();
|
||||
}
|
||||
mPendingRemoteTransition = options.getRemoteTransition();
|
||||
// Since options gets sent to client apps, remove transition information from it.
|
||||
options.setRemoteTransition(null);
|
||||
options.setRemoteAnimationAdapter(null);
|
||||
}
|
||||
|
||||
void applyOptionsAnimation() {
|
||||
|
||||
Reference in New Issue
Block a user