Loading services/core/java/com/android/server/wm/AnrController.java +5 −9 Original line number Diff line number Diff line Loading @@ -87,16 +87,12 @@ class AnrController { return; } WindowState windowState = target.asWindowState(); WindowState windowState = target.getWindowState(); pid = target.getPid(); if (windowState != null) { activity = windowState.mActivityRecord; } else { // Don't blame the host process, instead blame the embedded pid. activity = null; // Use host WindowState for logging and z-order test. windowState = target.asEmbeddedWindow().mHostWindowState; } // Blame the activity if the input token belongs to the window. If the target is // embedded, then we will blame the pid instead. activity = (windowState.mInputChannelToken == inputToken) ? windowState.mActivityRecord : null; Slog.i(TAG_WM, "ANR in " + target + ". Reason:" + reason); aboveSystem = isWindowAboveSystem(windowState); dumpAnrStateLocked(activity, windowState, reason); Loading services/core/java/com/android/server/wm/EmbeddedWindowController.java +2 −2 Original line number Diff line number Diff line Loading @@ -198,8 +198,8 @@ class EmbeddedWindowController { } @Override public EmbeddedWindow asEmbeddedWindow() { return this; public WindowState getWindowState() { return mHostWindowState; } @Override Loading services/core/java/com/android/server/wm/InputTarget.java +2 −7 Original line number Diff line number Diff line Loading @@ -25,13 +25,8 @@ import android.view.IWindow; * of both targets. */ interface InputTarget { default WindowState asWindowState() { return null; } default EmbeddedWindowController.EmbeddedWindow asEmbeddedWindow() { return null; } /* Get the WindowState associated with the target. */ WindowState getWindowState(); /* Display id of the target. */ int getDisplayId(); Loading services/core/java/com/android/server/wm/WindowManagerService.java +8 −7 Original line number Diff line number Diff line Loading @@ -5018,16 +5018,17 @@ public class WindowManagerService extends IWindowManager.Stub ProtoLog.i(WM_DEBUG_FOCUS_LIGHT, "Focus changing: %s -> %s", lastTarget, newTarget); } if (newTarget != null && newTarget.asWindowState() != null) { WindowState newFocus = newTarget.asWindowState(); mAnrController.onFocusChanged(newFocus); newFocus.reportFocusChangedSerialized(true); // Call WindowState focus change observers WindowState newFocusedWindow = newTarget != null ? newTarget.getWindowState() : null; if (newFocusedWindow != null && newFocusedWindow.mInputChannelToken == newToken) { mAnrController.onFocusChanged(newFocusedWindow); newFocusedWindow.reportFocusChangedSerialized(true); notifyFocusChanged(); } if (lastTarget != null && lastTarget.asWindowState() != null) { WindowState lastFocus = lastTarget.asWindowState(); lastFocus.reportFocusChangedSerialized(false); WindowState lastFocusedWindow = lastTarget != null ? lastTarget.getWindowState() : null; if (lastFocusedWindow != null && lastFocusedWindow.mInputChannelToken == oldToken) { lastFocusedWindow.reportFocusChangedSerialized(false); } } Loading services/core/java/com/android/server/wm/WindowState.java +1 −1 Original line number Diff line number Diff line Loading @@ -1727,7 +1727,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } @Override public WindowState asWindowState() { public WindowState getWindowState() { return this; } Loading Loading
services/core/java/com/android/server/wm/AnrController.java +5 −9 Original line number Diff line number Diff line Loading @@ -87,16 +87,12 @@ class AnrController { return; } WindowState windowState = target.asWindowState(); WindowState windowState = target.getWindowState(); pid = target.getPid(); if (windowState != null) { activity = windowState.mActivityRecord; } else { // Don't blame the host process, instead blame the embedded pid. activity = null; // Use host WindowState for logging and z-order test. windowState = target.asEmbeddedWindow().mHostWindowState; } // Blame the activity if the input token belongs to the window. If the target is // embedded, then we will blame the pid instead. activity = (windowState.mInputChannelToken == inputToken) ? windowState.mActivityRecord : null; Slog.i(TAG_WM, "ANR in " + target + ". Reason:" + reason); aboveSystem = isWindowAboveSystem(windowState); dumpAnrStateLocked(activity, windowState, reason); Loading
services/core/java/com/android/server/wm/EmbeddedWindowController.java +2 −2 Original line number Diff line number Diff line Loading @@ -198,8 +198,8 @@ class EmbeddedWindowController { } @Override public EmbeddedWindow asEmbeddedWindow() { return this; public WindowState getWindowState() { return mHostWindowState; } @Override Loading
services/core/java/com/android/server/wm/InputTarget.java +2 −7 Original line number Diff line number Diff line Loading @@ -25,13 +25,8 @@ import android.view.IWindow; * of both targets. */ interface InputTarget { default WindowState asWindowState() { return null; } default EmbeddedWindowController.EmbeddedWindow asEmbeddedWindow() { return null; } /* Get the WindowState associated with the target. */ WindowState getWindowState(); /* Display id of the target. */ int getDisplayId(); Loading
services/core/java/com/android/server/wm/WindowManagerService.java +8 −7 Original line number Diff line number Diff line Loading @@ -5018,16 +5018,17 @@ public class WindowManagerService extends IWindowManager.Stub ProtoLog.i(WM_DEBUG_FOCUS_LIGHT, "Focus changing: %s -> %s", lastTarget, newTarget); } if (newTarget != null && newTarget.asWindowState() != null) { WindowState newFocus = newTarget.asWindowState(); mAnrController.onFocusChanged(newFocus); newFocus.reportFocusChangedSerialized(true); // Call WindowState focus change observers WindowState newFocusedWindow = newTarget != null ? newTarget.getWindowState() : null; if (newFocusedWindow != null && newFocusedWindow.mInputChannelToken == newToken) { mAnrController.onFocusChanged(newFocusedWindow); newFocusedWindow.reportFocusChangedSerialized(true); notifyFocusChanged(); } if (lastTarget != null && lastTarget.asWindowState() != null) { WindowState lastFocus = lastTarget.asWindowState(); lastFocus.reportFocusChangedSerialized(false); WindowState lastFocusedWindow = lastTarget != null ? lastTarget.getWindowState() : null; if (lastFocusedWindow != null && lastFocusedWindow.mInputChannelToken == oldToken) { lastFocusedWindow.reportFocusChangedSerialized(false); } } Loading
services/core/java/com/android/server/wm/WindowState.java +1 −1 Original line number Diff line number Diff line Loading @@ -1727,7 +1727,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP } @Override public WindowState asWindowState() { public WindowState getWindowState() { return this; } Loading