diff options
| author | Santos Cordon <santoscordon@google.com> | 2021-01-28 14:52:02 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-01-28 14:52:02 +0000 |
| commit | 9fb0bb91c61f6f7649582dabb61e12de98a0cf39 (patch) | |
| tree | b8d7c3fee53820f1efbb886d1d9f407c39d699a1 /core/java | |
| parent | 85a4c88d38e1addbd4044d042a69c3343259f669 (diff) | |
| parent | 50f6173c522f426167f8e00ec7c9bbd3050deb84 (diff) | |
Merge "Add DisplayGroup ID to DisplayInfo" into sc-dev
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/view/Display.java | 13 | ||||
| -rw-r--r-- | core/java/android/view/DisplayInfo.java | 11 |
2 files changed, 24 insertions, 0 deletions
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java index 0e5fb2cad08f..c664ccba4ca7 100644 --- a/core/java/android/view/Display.java +++ b/core/java/android/view/Display.java @@ -121,6 +121,19 @@ public final class Display { public static final int INVALID_DISPLAY = -1; /** + * The default display group id, which is the display group id of the primary display assuming + * there is one. + * @hide + */ + public static final int DEFAULT_DISPLAY_GROUP = 0; + + /** + * Invalid display group id. + * @hide + */ + public static final int INVALID_DISPLAY_GROUP = -1; + + /** * Display flag: Indicates that the display supports compositing content * that is stored in protected graphics buffers. * <p> diff --git a/core/java/android/view/DisplayInfo.java b/core/java/android/view/DisplayInfo.java index ab35af89f0b3..d200a328773b 100644 --- a/core/java/android/view/DisplayInfo.java +++ b/core/java/android/view/DisplayInfo.java @@ -66,6 +66,11 @@ public final class DisplayInfo implements Parcelable { public int displayId; /** + * Display Group identifier. + */ + public int displayGroupId; + + /** * Display address, or null if none. * Interpretation varies by display type. */ @@ -331,6 +336,7 @@ public final class DisplayInfo implements Parcelable { && flags == other.flags && type == other.type && displayId == other.displayId + && displayGroupId == other.displayGroupId && Objects.equals(address, other.address) && Objects.equals(deviceProductInfo, other.deviceProductInfo) && Objects.equals(uniqueId, other.uniqueId) @@ -376,6 +382,7 @@ public final class DisplayInfo implements Parcelable { flags = other.flags; type = other.type; displayId = other.displayId; + displayGroupId = other.displayGroupId; address = other.address; deviceProductInfo = other.deviceProductInfo; name = other.name; @@ -418,6 +425,7 @@ public final class DisplayInfo implements Parcelable { flags = source.readInt(); type = source.readInt(); displayId = source.readInt(); + displayGroupId = source.readInt(); address = source.readParcelable(null); deviceProductInfo = source.readParcelable(null); name = source.readString8(); @@ -468,6 +476,7 @@ public final class DisplayInfo implements Parcelable { dest.writeInt(this.flags); dest.writeInt(type); dest.writeInt(displayId); + dest.writeInt(displayGroupId); dest.writeParcelable(address, flags); dest.writeParcelable(deviceProductInfo, flags); dest.writeString8(name); @@ -662,6 +671,8 @@ public final class DisplayInfo implements Parcelable { sb.append(name); sb.append("\", displayId "); sb.append(displayId); + sb.append("\", displayGroupId "); + sb.append(displayGroupId); sb.append(flagsToString(flags)); sb.append(", real "); sb.append(logicalWidth); |
