| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.window; |
| 18 |
|
| 19 |
import android.annotation.NonNull; |
| 20 |
import android.annotation.TestApi; |
| 21 |
import android.os.Parcel; |
| 22 |
import android.os.Parcelable; |
| 23 |
import android.view.SurfaceControl; |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
@TestApi |
| 31 |
public final class DisplayAreaAppearedInfo implements Parcelable { |
| 32 |
|
| 33 |
@NonNull |
| 34 |
private final DisplayAreaInfo mDisplayAreaInfo; |
| 35 |
|
| 36 |
@NonNull |
| 37 |
private final SurfaceControl mLeash; |
| 38 |
|
| 39 |
@NonNull |
| 40 |
public static final Creator<DisplayAreaAppearedInfo> CREATOR = |
| 41 |
new Creator<DisplayAreaAppearedInfo>() { |
| 42 |
@Override |
| 43 |
public DisplayAreaAppearedInfo createFromParcel(Parcel source) { |
| 44 |
final DisplayAreaInfo displayAreaInfo = source.readTypedObject(DisplayAreaInfo.CREATOR); |
| 45 |
final SurfaceControl leash = source.readTypedObject(SurfaceControl.CREATOR); |
| 46 |
return new DisplayAreaAppearedInfo(displayAreaInfo, leash); |
| 47 |
} |
| 48 |
|
| 49 |
@Override |
| 50 |
public DisplayAreaAppearedInfo[] newArray(int size) { |
| 51 |
return new DisplayAreaAppearedInfo[size]; |
| 52 |
} |
| 53 |
|
| 54 |
}; |
| 55 |
|
| 56 |
public DisplayAreaAppearedInfo(@NonNull DisplayAreaInfo displayAreaInfo, |
| 57 |
@NonNull SurfaceControl leash) { |
| 58 |
mDisplayAreaInfo = displayAreaInfo; |
| 59 |
mLeash = leash; |
| 60 |
} |
| 61 |
|
| 62 |
@Override |
| 63 |
public void writeToParcel(@NonNull Parcel dest, int flags) { |
| 64 |
dest.writeTypedObject(mDisplayAreaInfo, flags); |
| 65 |
dest.writeTypedObject(mLeash, flags); |
| 66 |
} |
| 67 |
|
| 68 |
@Override |
| 69 |
public int describeContents() { |
| 70 |
return 0; |
| 71 |
} |
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
@NonNull |
| 77 |
public DisplayAreaInfo getDisplayAreaInfo() { |
| 78 |
return mDisplayAreaInfo; |
| 79 |
} |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
@NonNull |
| 85 |
public SurfaceControl getLeash() { |
| 86 |
return mLeash; |
| 87 |
} |
| 88 |
} |