Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b1885b85 authored by Craig Mautner's avatar Craig Mautner
Browse files

More debugging for b/106899184

Change-Id: I729a2c5bae087713765d782daaa7309ee6cd5b5a
parent c06b1db2
Loading
Loading
Loading
Loading
+17 −17
Original line number Diff line number Diff line
@@ -923,7 +923,8 @@ public class WindowManagerService extends IWindowManager.Stub
                    //that was created later or a window at the top of the list of
                    //windows associated with this token.
                    if (DEBUG_FOCUS_LIGHT || DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(TAG,
                            "Adding window " + win + " at " + (newIdx + 1) + " of " + N);
                            "not Base app: Adding window " + win + " at " + (newIdx + 1) + " of " +
                            N);
                    windows.add(newIdx + 1, win);
                    if (newIdx < 0) {
                        // No window from token found on win's display.
@@ -1044,7 +1045,7 @@ public class WindowManagerService extends IWindowManager.Stub
            }
        }
        if (DEBUG_FOCUS_LIGHT || DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(TAG,
                "Adding window " + win + " at " + i + " of " + N);
                "Based on layer: Adding window " + win + " at " + i + " of " + N);
        windows.add(i, win);
        mWindowsChanged = true;
        return tokenWindowsPos;
@@ -1063,7 +1064,7 @@ public class WindowManagerService extends IWindowManager.Stub
        }
        i++;
        if (DEBUG_FOCUS_LIGHT || DEBUG_WINDOW_MOVEMENT || DEBUG_ADD_REMOVE) Slog.v(TAG,
                "Adding window " + win + " at " + i + " of " + windows.size());
                "Free window: Adding window " + win + " at " + i + " of " + windows.size());
        windows.add(i, win);
        mWindowsChanged = true;
    }
@@ -1130,6 +1131,8 @@ public class WindowManagerService extends IWindowManager.Stub
    }

    private void addWindowToListInOrderLocked(final WindowState win, boolean addToToken) {
        if (DEBUG_FOCUS_LIGHT) Slog.d(TAG, "addWindowToListInOrderLocked: win=" + win +
                " Callers=" + Debug.getCallers(4));
        if (win.mAttachedWindow == null) {
            final WindowToken token = win.mToken;
            int tokenWindowsPos = 0;
@@ -7081,7 +7084,6 @@ public class WindowManagerService extends IWindowManager.Stub
                        }
                    }

                    if (lastFocus != newFocus) {
                    //System.out.println("Changing focus from " + lastFocus
                    //                   + " to " + newFocus);
                    if (newFocus != null) {
@@ -7094,7 +7096,6 @@ public class WindowManagerService extends IWindowManager.Stub
                        if (DEBUG_FOCUS_LIGHT) Slog.i(TAG, "Losing focus: " + lastFocus);
                        lastFocus.reportFocusChangedSerialized(false, mInTouchMode);
                    }
                    }
                } break;

                case REPORT_LOSING_FOCUS: {
@@ -10277,14 +10278,13 @@ public class WindowManagerService extends IWindowManager.Stub

    void dumpWindowsNoHeaderLocked(PrintWriter pw, boolean dumpAll,
            ArrayList<WindowState> windows) {
        int j = 0;
        final int numDisplays = mDisplayContents.size();
        for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
            final WindowList windowList = mDisplayContents.valueAt(displayNdx).getWindowList();
            for (int winNdx = windowList.size() - 1; winNdx >= 0; --winNdx) {
                final WindowState w = windowList.get(winNdx);
                if (windows == null || windows.contains(w)) {
                    pw.print("  Window #"); pw.print(j++); pw.print(' ');
                    pw.print("  Window #"); pw.print(winNdx); pw.print(' ');
                            pw.print(w); pw.println(":");
                    w.dump(pw, "    ", dumpAll || windows != null);
                }