| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.view; |
| 18 |
|
| 19 |
import android.os.Parcel; |
| 20 |
import android.os.Parcelable; |
| 21 |
import android.util.ArraySet; |
| 22 |
|
| 23 |
import java.util.Set; |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
public class TaskTransitionSpec implements Parcelable { |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
public final int backgroundColor; |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
public final Set<Integer> animationBoundInsets; |
| 50 |
|
| 51 |
public TaskTransitionSpec( |
| 52 |
int backgroundColor, Set<Integer> animationBoundInsets) { |
| 53 |
this.backgroundColor = backgroundColor; |
| 54 |
this.animationBoundInsets = animationBoundInsets; |
| 55 |
} |
| 56 |
|
| 57 |
public TaskTransitionSpec(Parcel in) { |
| 58 |
this.backgroundColor = in.readInt(); |
| 59 |
|
| 60 |
int animationBoundInsetsSize = in.readInt(); |
| 61 |
this.animationBoundInsets = new ArraySet<>(animationBoundInsetsSize); |
| 62 |
for (int i = 0; i < animationBoundInsetsSize; i++) { |
| 63 |
this.animationBoundInsets.add(in.readInt()); |
| 64 |
} |
| 65 |
} |
| 66 |
|
| 67 |
@Override |
| 68 |
public int describeContents() { |
| 69 |
return 0; |
| 70 |
} |
| 71 |
|
| 72 |
@Override |
| 73 |
public void writeToParcel(Parcel dest, int flags) { |
| 74 |
dest.writeInt(backgroundColor); |
| 75 |
|
| 76 |
dest.writeInt(animationBoundInsets.size()); |
| 77 |
for (int insetType : animationBoundInsets) { |
| 78 |
dest.writeInt(insetType); |
| 79 |
} |
| 80 |
} |
| 81 |
|
| 82 |
public static final @android.annotation.NonNull Parcelable.Creator<TaskTransitionSpec> |
| 83 |
CREATOR = new Parcelable.Creator<TaskTransitionSpec>() { |
| 84 |
public TaskTransitionSpec createFromParcel(Parcel in) { |
| 85 |
return new TaskTransitionSpec(in); |
| 86 |
} |
| 87 |
|
| 88 |
public TaskTransitionSpec[] newArray(int size) { |
| 89 |
return new TaskTransitionSpec[size]; |
| 90 |
} |
| 91 |
}; |
| 92 |
} |