From 39b0e9a02ba653e49333368ffbfa494a64d81d21 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Mon, 22 Jul 2019 11:23:13 -0700 Subject: [PATCH] Add flag info to displays dump output proto FLAG_PRIVATE information is needed for cts on physical private display Bug: 133794475 Test: -Build and flash (make -j framework; aae flash 1s) - Add "Log.d(TAG, display.toString())" in code to print out detailed information about display. (Note: Display class is imported from android.server.wm.WindowManagerState.Display) - Check "mFlags=.." is printed Change-Id: I6481dff51b140d3a9320e1e92b06fff531ba34e9 --- core/java/android/view/DisplayInfo.java | 2 ++ core/proto/android/view/displayinfo.proto | 1 + 2 files changed, 3 insertions(+) diff --git a/core/java/android/view/DisplayInfo.java b/core/java/android/view/DisplayInfo.java index 2efebf6457ab0..7e22dd9f0ac84 100644 --- a/core/java/android/view/DisplayInfo.java +++ b/core/java/android/view/DisplayInfo.java @@ -18,6 +18,7 @@ package android.view; import static android.view.DisplayInfoProto.APP_HEIGHT; import static android.view.DisplayInfoProto.APP_WIDTH; +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; @@ -708,6 +709,7 @@ public final class DisplayInfo implements Parcelable { protoOutputStream.write(APP_WIDTH, appWidth); protoOutputStream.write(APP_HEIGHT, appHeight); protoOutputStream.write(NAME, name); + protoOutputStream.write(FLAGS, flags); protoOutputStream.end(token); } diff --git a/core/proto/android/view/displayinfo.proto b/core/proto/android/view/displayinfo.proto index 49c0a290c3687..984be2a2e417c 100644 --- a/core/proto/android/view/displayinfo.proto +++ b/core/proto/android/view/displayinfo.proto @@ -33,4 +33,5 @@ message DisplayInfoProto { // The human-readable name of the display. // Eg: "Built-in Screen" optional string name = 5; + optional int32 flags = 6; }