Merge "Add window_frames_valid to proto" into tm-dev

This commit is contained in:
Tiger Huang
2022-03-04 16:37:20 +00:00
committed by Android (Google) Code Review
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 focused_display_id = 9;
optional bool hard_keyboard_available = 10;
optional bool window_frames_valid = 11;
}
/* 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.POLICY;
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.permission;
@@ -6437,9 +6438,13 @@ public class WindowManagerService extends IWindowManager.Stub
imeWindow.writeIdentifierToProto(proto, INPUT_METHOD_WINDOW);
}
proto.write(DISPLAY_FROZEN, mDisplayFrozen);
final DisplayContent defaultDisplayContent = getDefaultDisplayContentLocked();
proto.write(FOCUSED_DISPLAY_ID, topFocusedDisplayContent.getDisplayId());
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,