diff options
| author | 2024-07-04 15:10:57 +0000 | |
|---|---|---|
| committer | 2024-07-04 15:41:07 +0000 | |
| commit | 6f5dbbe66734e88ad0e320e6d0b3f3b6e9f079c3 (patch) | |
| tree | b38b2577239842e09d808568d27b9497a3c03a8d | |
| parent | fbc66cd074226658e4e61ea67ea60232097dca2a (diff) | |
Dump type from DisplayInfo
This can be used to distinguish between the main display and the virtual display.
Flag: NONE dumping new field to proto
Bug: 351162994
Change-Id: I0a63ee7adc9d37c1ae60074f5a9e01f93c8c43e4
| -rw-r--r-- | core/java/android/view/DisplayInfo.java | 2 | ||||
| -rw-r--r-- | core/proto/android/view/displayinfo.proto | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/view/DisplayInfo.java b/core/java/android/view/DisplayInfo.java index 8b9d876f6bf1..12dbc5afd0a3 100644 --- a/core/java/android/view/DisplayInfo.java +++ b/core/java/android/view/DisplayInfo.java @@ -24,6 +24,7 @@ import static android.view.DisplayInfoProto.FLAGS; import static android.view.DisplayInfoProto.LOGICAL_HEIGHT; import static android.view.DisplayInfoProto.LOGICAL_WIDTH; import static android.view.DisplayInfoProto.NAME; +import static android.view.DisplayInfoProto.TYPE; import android.annotation.NonNull; import android.annotation.Nullable; @@ -961,6 +962,7 @@ public final class DisplayInfo implements Parcelable { protoOutputStream.write(APP_HEIGHT, appHeight); protoOutputStream.write(NAME, name); protoOutputStream.write(FLAGS, flags); + protoOutputStream.write(TYPE, type); if (displayCutout != null) { displayCutout.dumpDebug(protoOutputStream, CUTOUT); } diff --git a/core/proto/android/view/displayinfo.proto b/core/proto/android/view/displayinfo.proto index f936ed1b1bd1..32f4cb3a32c0 100644 --- a/core/proto/android/view/displayinfo.proto +++ b/core/proto/android/view/displayinfo.proto @@ -36,4 +36,5 @@ message DisplayInfoProto { optional string name = 5; optional int32 flags = 6; optional DisplayCutoutProto cutout = 7; + optional int32 type = 8; } |