Merge "Add display cutout to proto dump"
This commit is contained in:
committed by
Android (Google) Code Review
commit
dbeb9d5a1c
@@ -23,6 +23,7 @@ import static android.view.DisplayCutoutProto.BOUND_LEFT;
|
||||
import static android.view.DisplayCutoutProto.BOUND_RIGHT;
|
||||
import static android.view.DisplayCutoutProto.BOUND_TOP;
|
||||
import static android.view.DisplayCutoutProto.INSETS;
|
||||
import static android.view.DisplayCutoutProto.WATERFALL_INSETS;
|
||||
import static android.view.Surface.ROTATION_0;
|
||||
|
||||
import static com.android.internal.annotations.VisibleForTesting.Visibility.PRIVATE;
|
||||
@@ -830,7 +831,7 @@ public final class DisplayCutout {
|
||||
mBounds.getRect(BOUNDS_POSITION_TOP).dumpDebug(proto, BOUND_TOP);
|
||||
mBounds.getRect(BOUNDS_POSITION_RIGHT).dumpDebug(proto, BOUND_RIGHT);
|
||||
mBounds.getRect(BOUNDS_POSITION_BOTTOM).dumpDebug(proto, BOUND_BOTTOM);
|
||||
mWaterfallInsets.toRect().dumpDebug(proto, INSETS);
|
||||
mWaterfallInsets.toRect().dumpDebug(proto, WATERFALL_INSETS);
|
||||
proto.end(token);
|
||||
}
|
||||
|
||||
|
||||
@@ -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.CUTOUT;
|
||||
import static android.view.DisplayInfoProto.FLAGS;
|
||||
import static android.view.DisplayInfoProto.LOGICAL_HEIGHT;
|
||||
import static android.view.DisplayInfoProto.LOGICAL_WIDTH;
|
||||
@@ -861,6 +862,9 @@ public final class DisplayInfo implements Parcelable {
|
||||
protoOutputStream.write(APP_HEIGHT, appHeight);
|
||||
protoOutputStream.write(NAME, name);
|
||||
protoOutputStream.write(FLAGS, flags);
|
||||
if (displayCutout != null) {
|
||||
displayCutout.dumpDebug(protoOutputStream, CUTOUT);
|
||||
}
|
||||
protoOutputStream.end(token);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,4 +31,5 @@ message DisplayCutoutProto {
|
||||
optional .android.graphics.RectProto bound_top = 4;
|
||||
optional .android.graphics.RectProto bound_right = 5;
|
||||
optional .android.graphics.RectProto bound_bottom = 6;
|
||||
optional .android.graphics.RectProto waterfall_insets = 7;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ syntax = "proto2";
|
||||
package android.view;
|
||||
|
||||
import "frameworks/base/core/proto/android/privacy.proto";
|
||||
import "frameworks/base/core/proto/android/view/displaycutout.proto";
|
||||
|
||||
option java_multiple_files = true;
|
||||
|
||||
@@ -34,4 +35,5 @@ message DisplayInfoProto {
|
||||
// Eg: "Built-in Screen"
|
||||
optional string name = 5;
|
||||
optional int32 flags = 6;
|
||||
optional DisplayCutoutProto cutout = 7;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user