| 1 |
package android.view; |
| 2 |
|
| 3 |
import android.compat.annotation.UnsupportedAppUsage; |
| 4 |
import android.graphics.Rect; |
| 5 |
import android.hardware.HardwareBuffer; |
| 6 |
import android.os.Parcel; |
| 7 |
import android.os.Parcelable; |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
public class AppTransitionAnimationSpec implements Parcelable { |
| 18 |
public final int taskId; |
| 19 |
public final HardwareBuffer buffer; |
| 20 |
public final Rect rect; |
| 21 |
|
| 22 |
@UnsupportedAppUsage |
| 23 |
public AppTransitionAnimationSpec(int taskId, HardwareBuffer buffer, Rect rect) { |
| 24 |
this.taskId = taskId; |
| 25 |
this.rect = rect; |
| 26 |
this.buffer = buffer; |
| 27 |
} |
| 28 |
|
| 29 |
public AppTransitionAnimationSpec(Parcel in) { |
| 30 |
taskId = in.readInt(); |
| 31 |
rect = in.readTypedObject(Rect.CREATOR); |
| 32 |
buffer = in.readTypedObject(HardwareBuffer.CREATOR); |
| 33 |
} |
| 34 |
|
| 35 |
@Override |
| 36 |
public int describeContents() { |
| 37 |
return 0; |
| 38 |
} |
| 39 |
|
| 40 |
@Override |
| 41 |
public void writeToParcel(Parcel dest, int flags) { |
| 42 |
dest.writeInt(taskId); |
| 43 |
dest.writeTypedObject(rect, 0 ); |
| 44 |
dest.writeTypedObject(buffer, 0 ); |
| 45 |
} |
| 46 |
|
| 47 |
public static final @android.annotation.NonNull Parcelable.Creator<AppTransitionAnimationSpec> CREATOR |
| 48 |
= new Parcelable.Creator<AppTransitionAnimationSpec>() { |
| 49 |
public AppTransitionAnimationSpec createFromParcel(Parcel in) { |
| 50 |
return new AppTransitionAnimationSpec(in); |
| 51 |
} |
| 52 |
|
| 53 |
public AppTransitionAnimationSpec[] newArray(int size) { |
| 54 |
return new AppTransitionAnimationSpec[size]; |
| 55 |
} |
| 56 |
}; |
| 57 |
|
| 58 |
@Override |
| 59 |
public String toString() { |
| 60 |
return "{taskId: " + taskId + ", buffer: " + buffer + ", rect: " + rect + "}"; |
| 61 |
} |
| 62 |
} |