Merge "Write top focused display ID in WindowManagerServiceDumpProto."

This commit is contained in:
TreeHugger Robot
2019-06-19 02:37:51 +00:00
committed by Android (Google) Code Review
3 changed files with 7 additions and 5 deletions

View File

@@ -45,6 +45,7 @@ message WindowManagerServiceDumpProto {
optional bool display_frozen = 6;
optional int32 rotation = 7;
optional int32 last_orientation = 8;
optional int32 focused_display_id = 9;
}
/* represents RootWindowContainer object */

View File

@@ -321,11 +321,10 @@ final class InputMonitor {
}
void updateInputWindowsImmediately() {
if (mUpdateInputWindowsPending) {
mApplyImmediately = true;
mUpdateInputWindows.run();
mApplyImmediately = false;
}
mHandler.removeCallbacks(mUpdateInputWindows);
mApplyImmediately = true;
mUpdateInputWindows.run();
mApplyImmediately = false;
}
/* Called when the current input focus changes.

View File

@@ -100,6 +100,7 @@ import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
import static com.android.server.wm.WindowManagerServiceDumpProto.DISPLAY_FROZEN;
import static com.android.server.wm.WindowManagerServiceDumpProto.FOCUSED_APP;
import static com.android.server.wm.WindowManagerServiceDumpProto.FOCUSED_DISPLAY_ID;
import static com.android.server.wm.WindowManagerServiceDumpProto.FOCUSED_WINDOW;
import static com.android.server.wm.WindowManagerServiceDumpProto.INPUT_METHOD_WINDOW;
import static com.android.server.wm.WindowManagerServiceDumpProto.LAST_ORIENTATION;
@@ -5930,6 +5931,7 @@ public class WindowManagerService extends IWindowManager.Stub
final DisplayContent defaultDisplayContent = getDefaultDisplayContentLocked();
proto.write(ROTATION, defaultDisplayContent.getRotation());
proto.write(LAST_ORIENTATION, defaultDisplayContent.getLastOrientation());
proto.write(FOCUSED_DISPLAY_ID, topFocusedDisplayContent.getDisplayId());
}
private void dumpWindowsLocked(PrintWriter pw, boolean dumpAll,