Merge "Add window_frames_valid to proto" into tm-dev am: 6382d7cac3

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17077615

Change-Id: I00dea184206e5d31eb91839ba6b9e4391afc0e06
This commit is contained in:
Tiger Huang
2022-03-04 16:39:42 +00:00
committed by Automerger Merge Worker
2 changed files with 7 additions and 1 deletions

View File

@@ -53,6 +53,7 @@ message WindowManagerServiceDumpProto {
optional int32 last_orientation = 8 [(.android.typedef) = "android.content.pm.ActivityInfo.ScreenOrientation", deprecated=true]; optional int32 last_orientation = 8 [(.android.typedef) = "android.content.pm.ActivityInfo.ScreenOrientation", deprecated=true];
optional int32 focused_display_id = 9; optional int32 focused_display_id = 9;
optional bool hard_keyboard_available = 10; optional bool hard_keyboard_available = 10;
optional bool window_frames_valid = 11;
} }
/* represents RootWindowContainer object */ /* represents RootWindowContainer object */

View File

@@ -141,6 +141,7 @@ import static com.android.server.wm.WindowManagerServiceDumpProto.HARD_KEYBOARD_
import static com.android.server.wm.WindowManagerServiceDumpProto.INPUT_METHOD_WINDOW; import static com.android.server.wm.WindowManagerServiceDumpProto.INPUT_METHOD_WINDOW;
import static com.android.server.wm.WindowManagerServiceDumpProto.POLICY; import static com.android.server.wm.WindowManagerServiceDumpProto.POLICY;
import static com.android.server.wm.WindowManagerServiceDumpProto.ROOT_WINDOW_CONTAINER; import static com.android.server.wm.WindowManagerServiceDumpProto.ROOT_WINDOW_CONTAINER;
import static com.android.server.wm.WindowManagerServiceDumpProto.WINDOW_FRAMES_VALID;
import android.Manifest; import android.Manifest;
import android.Manifest.permission; import android.Manifest.permission;
@@ -6437,9 +6438,13 @@ public class WindowManagerService extends IWindowManager.Stub
imeWindow.writeIdentifierToProto(proto, INPUT_METHOD_WINDOW); imeWindow.writeIdentifierToProto(proto, INPUT_METHOD_WINDOW);
} }
proto.write(DISPLAY_FROZEN, mDisplayFrozen); proto.write(DISPLAY_FROZEN, mDisplayFrozen);
final DisplayContent defaultDisplayContent = getDefaultDisplayContentLocked();
proto.write(FOCUSED_DISPLAY_ID, topFocusedDisplayContent.getDisplayId()); proto.write(FOCUSED_DISPLAY_ID, topFocusedDisplayContent.getDisplayId());
proto.write(HARD_KEYBOARD_AVAILABLE, mHardKeyboardAvailable); proto.write(HARD_KEYBOARD_AVAILABLE, mHardKeyboardAvailable);
// This is always true for now since we still update the window frames at the server side.
// Once we move the window layout to the client side, this can be false when we are waiting
// for the frames.
proto.write(WINDOW_FRAMES_VALID, true);
} }
private void dumpWindowsLocked(PrintWriter pw, boolean dumpAll, private void dumpWindowsLocked(PrintWriter pw, boolean dumpAll,