Merge "Optimize the Parcel read/write of remote animation" into sc-dev
This commit is contained in:
@@ -28,8 +28,8 @@ public class AppTransitionAnimationSpec implements Parcelable {
|
||||
|
||||
public AppTransitionAnimationSpec(Parcel in) {
|
||||
taskId = in.readInt();
|
||||
rect = in.readParcelable(null);
|
||||
buffer = in.readParcelable(null);
|
||||
rect = in.readTypedObject(Rect.CREATOR);
|
||||
buffer = in.readTypedObject(HardwareBuffer.CREATOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -40,8 +40,8 @@ public class AppTransitionAnimationSpec implements Parcelable {
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeInt(taskId);
|
||||
dest.writeParcelable(rect, 0 /* flags */);
|
||||
dest.writeParcelable(buffer, 0);
|
||||
dest.writeTypedObject(rect, 0 /* flags */);
|
||||
dest.writeTypedObject(buffer, 0 /* flags */);
|
||||
}
|
||||
|
||||
public static final @android.annotation.NonNull Parcelable.Creator<AppTransitionAnimationSpec> CREATOR
|
||||
|
||||
@@ -184,13 +184,13 @@ public class RemoteAnimationDefinition implements Parcelable {
|
||||
}
|
||||
|
||||
private RemoteAnimationAdapterEntry(Parcel in) {
|
||||
adapter = in.readParcelable(RemoteAnimationAdapter.class.getClassLoader());
|
||||
adapter = in.readTypedObject(RemoteAnimationAdapter.CREATOR);
|
||||
activityTypeFilter = in.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeParcelable(adapter, flags);
|
||||
dest.writeTypedObject(adapter, flags);
|
||||
dest.writeInt(activityTypeFilter);
|
||||
}
|
||||
|
||||
|
||||
@@ -222,20 +222,20 @@ public class RemoteAnimationTarget implements Parcelable {
|
||||
public RemoteAnimationTarget(Parcel in) {
|
||||
taskId = in.readInt();
|
||||
mode = in.readInt();
|
||||
leash = in.readParcelable(null);
|
||||
leash = in.readTypedObject(SurfaceControl.CREATOR);
|
||||
isTranslucent = in.readBoolean();
|
||||
clipRect = in.readParcelable(null);
|
||||
contentInsets = in.readParcelable(null);
|
||||
clipRect = in.readTypedObject(Rect.CREATOR);
|
||||
contentInsets = in.readTypedObject(Rect.CREATOR);
|
||||
prefixOrderIndex = in.readInt();
|
||||
position = in.readParcelable(null);
|
||||
localBounds = in.readParcelable(null);
|
||||
sourceContainerBounds = in.readParcelable(null);
|
||||
screenSpaceBounds = in.readParcelable(null);
|
||||
windowConfiguration = in.readParcelable(null);
|
||||
position = in.readTypedObject(Point.CREATOR);
|
||||
localBounds = in.readTypedObject(Rect.CREATOR);
|
||||
sourceContainerBounds = in.readTypedObject(Rect.CREATOR);
|
||||
screenSpaceBounds = in.readTypedObject(Rect.CREATOR);
|
||||
windowConfiguration = in.readTypedObject(WindowConfiguration.CREATOR);
|
||||
isNotInRecents = in.readBoolean();
|
||||
startLeash = in.readParcelable(null);
|
||||
startBounds = in.readParcelable(null);
|
||||
pictureInPictureParams = in.readParcelable(null);
|
||||
startLeash = in.readTypedObject(SurfaceControl.CREATOR);
|
||||
startBounds = in.readTypedObject(Rect.CREATOR);
|
||||
pictureInPictureParams = in.readTypedObject(PictureInPictureParams.CREATOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -247,20 +247,20 @@ public class RemoteAnimationTarget implements Parcelable {
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeInt(taskId);
|
||||
dest.writeInt(mode);
|
||||
dest.writeParcelable(leash, 0 /* flags */);
|
||||
dest.writeTypedObject(leash, 0 /* flags */);
|
||||
dest.writeBoolean(isTranslucent);
|
||||
dest.writeParcelable(clipRect, 0 /* flags */);
|
||||
dest.writeParcelable(contentInsets, 0 /* flags */);
|
||||
dest.writeTypedObject(clipRect, 0 /* flags */);
|
||||
dest.writeTypedObject(contentInsets, 0 /* flags */);
|
||||
dest.writeInt(prefixOrderIndex);
|
||||
dest.writeParcelable(position, 0 /* flags */);
|
||||
dest.writeParcelable(localBounds, 0 /* flags */);
|
||||
dest.writeParcelable(sourceContainerBounds, 0 /* flags */);
|
||||
dest.writeParcelable(screenSpaceBounds, 0 /* flags */);
|
||||
dest.writeParcelable(windowConfiguration, 0 /* flags */);
|
||||
dest.writeTypedObject(position, 0 /* flags */);
|
||||
dest.writeTypedObject(localBounds, 0 /* flags */);
|
||||
dest.writeTypedObject(sourceContainerBounds, 0 /* flags */);
|
||||
dest.writeTypedObject(screenSpaceBounds, 0 /* flags */);
|
||||
dest.writeTypedObject(windowConfiguration, 0 /* flags */);
|
||||
dest.writeBoolean(isNotInRecents);
|
||||
dest.writeParcelable(startLeash, 0 /* flags */);
|
||||
dest.writeParcelable(startBounds, 0 /* flags */);
|
||||
dest.writeParcelable(pictureInPictureParams, 0 /* flags */);
|
||||
dest.writeTypedObject(startLeash, 0 /* flags */);
|
||||
dest.writeTypedObject(startBounds, 0 /* flags */);
|
||||
dest.writeTypedObject(pictureInPictureParams, 0 /* flags */);
|
||||
}
|
||||
|
||||
public void dump(PrintWriter pw, String prefix) {
|
||||
|
||||
Reference in New Issue
Block a user