Add merged local insets to proto

Bug: 263872611
Test: Caption insets are populated in CTS tests.
Change-Id: Ia4e64d05ccf5f9f938237fbddb3911833b670b2f
This commit is contained in:
Garfield Tan
2023-04-12 15:38:15 -07:00
parent 2297912e3a
commit 0b5f00c3a6
2 changed files with 7 additions and 0 deletions

View File

@@ -458,6 +458,7 @@ message WindowStateProto {
optional float global_scale = 44;
repeated .android.graphics.RectProto keep_clear_areas = 45;
repeated .android.graphics.RectProto unrestricted_keep_clear_areas = 46;
repeated .android.view.InsetsSourceProto mergedLocalInsetsSources = 47;
}
message IdentifierProto {

View File

@@ -166,6 +166,7 @@ import static com.android.server.wm.WindowStateProto.IS_ON_SCREEN;
import static com.android.server.wm.WindowStateProto.IS_READY_FOR_DISPLAY;
import static com.android.server.wm.WindowStateProto.IS_VISIBLE;
import static com.android.server.wm.WindowStateProto.KEEP_CLEAR_AREAS;
import static com.android.server.wm.WindowStateProto.MERGED_LOCAL_INSETS_SOURCES;
import static com.android.server.wm.WindowStateProto.PENDING_SEAMLESS_ROTATION;
import static com.android.server.wm.WindowStateProto.REMOVED;
import static com.android.server.wm.WindowStateProto.REMOVE_ON_EXIT;
@@ -4027,6 +4028,11 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
for (Rect r : mUnrestrictedKeepClearAreas) {
r.dumpDebug(proto, UNRESTRICTED_KEEP_CLEAR_AREAS);
}
if (mMergedLocalInsetsSources != null) {
for (int i = 0; i < mMergedLocalInsetsSources.size(); ++i) {
mMergedLocalInsetsSources.valueAt(i).dumpDebug(proto, MERGED_LOCAL_INSETS_SOURCES);
}
}
proto.end(token);
}