Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dbeb9d5a authored by Nataniel Borges's avatar Nataniel Borges Committed by Android (Google) Code Review
Browse files

Merge "Add display cutout to proto dump"

parents 174ac5dc 112c0743
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -23,6 +23,7 @@ import static android.view.DisplayCutoutProto.BOUND_LEFT;
import static android.view.DisplayCutoutProto.BOUND_RIGHT;
import static android.view.DisplayCutoutProto.BOUND_RIGHT;
import static android.view.DisplayCutoutProto.BOUND_TOP;
import static android.view.DisplayCutoutProto.BOUND_TOP;
import static android.view.DisplayCutoutProto.INSETS;
import static android.view.DisplayCutoutProto.INSETS;
import static android.view.DisplayCutoutProto.WATERFALL_INSETS;
import static android.view.Surface.ROTATION_0;
import static android.view.Surface.ROTATION_0;


import static com.android.internal.annotations.VisibleForTesting.Visibility.PRIVATE;
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_TOP).dumpDebug(proto, BOUND_TOP);
        mBounds.getRect(BOUNDS_POSITION_RIGHT).dumpDebug(proto, BOUND_RIGHT);
        mBounds.getRect(BOUNDS_POSITION_RIGHT).dumpDebug(proto, BOUND_RIGHT);
        mBounds.getRect(BOUNDS_POSITION_BOTTOM).dumpDebug(proto, BOUND_BOTTOM);
        mBounds.getRect(BOUNDS_POSITION_BOTTOM).dumpDebug(proto, BOUND_BOTTOM);
        mWaterfallInsets.toRect().dumpDebug(proto, INSETS);
        mWaterfallInsets.toRect().dumpDebug(proto, WATERFALL_INSETS);
        proto.end(token);
        proto.end(token);
    }
    }


+4 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@ package android.view;


import static android.view.DisplayInfoProto.APP_HEIGHT;
import static android.view.DisplayInfoProto.APP_HEIGHT;
import static android.view.DisplayInfoProto.APP_WIDTH;
import static android.view.DisplayInfoProto.APP_WIDTH;
import static android.view.DisplayInfoProto.CUTOUT;
import static android.view.DisplayInfoProto.FLAGS;
import static android.view.DisplayInfoProto.FLAGS;
import static android.view.DisplayInfoProto.LOGICAL_HEIGHT;
import static android.view.DisplayInfoProto.LOGICAL_HEIGHT;
import static android.view.DisplayInfoProto.LOGICAL_WIDTH;
import static android.view.DisplayInfoProto.LOGICAL_WIDTH;
@@ -861,6 +862,9 @@ public final class DisplayInfo implements Parcelable {
        protoOutputStream.write(APP_HEIGHT, appHeight);
        protoOutputStream.write(APP_HEIGHT, appHeight);
        protoOutputStream.write(NAME, name);
        protoOutputStream.write(NAME, name);
        protoOutputStream.write(FLAGS, flags);
        protoOutputStream.write(FLAGS, flags);
        if (displayCutout != null) {
            displayCutout.dumpDebug(protoOutputStream, CUTOUT);
        }
        protoOutputStream.end(token);
        protoOutputStream.end(token);
    }
    }


+1 −0
Original line number Original line Diff line number Diff line
@@ -31,4 +31,5 @@ message DisplayCutoutProto {
    optional .android.graphics.RectProto bound_top = 4;
    optional .android.graphics.RectProto bound_top = 4;
    optional .android.graphics.RectProto bound_right = 5;
    optional .android.graphics.RectProto bound_right = 5;
    optional .android.graphics.RectProto bound_bottom = 6;
    optional .android.graphics.RectProto bound_bottom = 6;
    optional .android.graphics.RectProto waterfall_insets = 7;
}
}
+2 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@ syntax = "proto2";
package android.view;
package android.view;


import "frameworks/base/core/proto/android/privacy.proto";
import "frameworks/base/core/proto/android/privacy.proto";
import "frameworks/base/core/proto/android/view/displaycutout.proto";


option java_multiple_files = true;
option java_multiple_files = true;


@@ -34,4 +35,5 @@ message DisplayInfoProto {
    // Eg: "Built-in Screen"
    // Eg: "Built-in Screen"
    optional string name = 5;
    optional string name = 5;
    optional int32 flags = 6;
    optional int32 flags = 6;
    optional DisplayCutoutProto cutout = 7;
}
}