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

Commit b729e995 authored by Craig Mautner's avatar Craig Mautner Committed by Android (Google) Code Review
Browse files

Merge "Yet more debugging for 10858941." into klp-dev

parents bf33f34c e2dd83a5
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -226,7 +226,7 @@ public final class ActivityManagerService extends ActivityManagerNative
    static final boolean DEBUG_RESULTS = localLOGV || false;
    static final boolean DEBUG_RESULTS = localLOGV || false;
    static final boolean DEBUG_SERVICE = localLOGV || false;
    static final boolean DEBUG_SERVICE = localLOGV || false;
    static final boolean DEBUG_SERVICE_EXECUTING = localLOGV || false;
    static final boolean DEBUG_SERVICE_EXECUTING = localLOGV || false;
    static final boolean DEBUG_STACK = localLOGV || false;
    static final boolean DEBUG_STACK = localLOGV || true;
    static final boolean DEBUG_SWITCH = localLOGV || false;
    static final boolean DEBUG_SWITCH = localLOGV || false;
    static final boolean DEBUG_TASKS = localLOGV || false;
    static final boolean DEBUG_TASKS = localLOGV || false;
    static final boolean DEBUG_THUMBNAILS = localLOGV || false;
    static final boolean DEBUG_THUMBNAILS = localLOGV || false;
+3 −1
Original line number Original line Diff line number Diff line
@@ -24,6 +24,7 @@ import static com.android.server.wm.WindowManagerService.TAG;
import android.app.ActivityManager.StackBoxInfo;
import android.app.ActivityManager.StackBoxInfo;
import android.graphics.Rect;
import android.graphics.Rect;
import android.graphics.Region;
import android.graphics.Region;
import android.os.Debug;
import android.util.Slog;
import android.util.Slog;
import android.view.Display;
import android.view.Display;
import android.view.DisplayInfo;
import android.view.DisplayInfo;
@@ -322,7 +323,8 @@ class DisplayContent {
     * @return true if a change was made, false otherwise.
     * @return true if a change was made, false otherwise.
     */
     */
    boolean moveHomeStackBox(boolean toTop) {
    boolean moveHomeStackBox(boolean toTop) {
        if (DEBUG_STACK) Slog.d(TAG, "moveHomeStackBox: toTop=" + toTop);
        if (DEBUG_STACK) Slog.d(TAG, "moveHomeStackBox: toTop=" + toTop + " Callers=" +
                Debug.getCallers(4));
        switch (mStackBoxes.size()) {
        switch (mStackBoxes.size()) {
            case 0: throw new RuntimeException("moveHomeStackBox: No home StackBox!");
            case 0: throw new RuntimeException("moveHomeStackBox: No home StackBox!");
            case 1: return false; // Only the home StackBox exists.
            case 1: return false; // Only the home StackBox exists.
+4 −4
Original line number Original line Diff line number Diff line
@@ -63,7 +63,7 @@ class FocusedStackFrame {
    }
    }


    private void draw(Rect bounds, int color) {
    private void draw(Rect bounds, int color) {
        if (DEBUG_STACK) Slog.i(TAG, "draw: bounds=" + bounds.toShortString() +
        if (false && DEBUG_STACK) Slog.i(TAG, "draw: bounds=" + bounds.toShortString() +
                " color=" + Integer.toHexString(color));
                " color=" + Integer.toHexString(color));
        mTmpDrawRect.set(bounds);
        mTmpDrawRect.set(bounds);
        Canvas c = null;
        Canvas c = null;
@@ -100,7 +100,7 @@ class FocusedStackFrame {
    }
    }


    private void positionSurface(Rect bounds) {
    private void positionSurface(Rect bounds) {
        if (DEBUG_STACK) Slog.i(TAG, "positionSurface: bounds=" + bounds.toShortString());
        if (false && DEBUG_STACK) Slog.i(TAG, "positionSurface: bounds=" + bounds.toShortString());
        mSurfaceControl.setSize(bounds.width(), bounds.height());
        mSurfaceControl.setSize(bounds.width(), bounds.height());
        mSurfaceControl.setPosition(bounds.left, bounds.top);
        mSurfaceControl.setPosition(bounds.left, bounds.top);
    }
    }
@@ -108,7 +108,7 @@ class FocusedStackFrame {
    // Note: caller responsible for being inside
    // Note: caller responsible for being inside
    // Surface.openTransaction() / closeTransaction()
    // Surface.openTransaction() / closeTransaction()
    public void setVisibility(boolean on) {
    public void setVisibility(boolean on) {
        if (DEBUG_STACK) Slog.i(TAG, "setVisibility: on=" + on +
        if (false && DEBUG_STACK) Slog.i(TAG, "setVisibility: on=" + on +
                " mLastBounds=" + mLastBounds.toShortString() +
                " mLastBounds=" + mLastBounds.toShortString() +
                " mBounds=" + mBounds.toShortString());
                " mBounds=" + mBounds.toShortString());
        if (mSurfaceControl == null) {
        if (mSurfaceControl == null) {
@@ -132,7 +132,7 @@ class FocusedStackFrame {
    }
    }


    public void setBounds(Rect bounds) {
    public void setBounds(Rect bounds) {
        if (DEBUG_STACK) Slog.i(TAG, "setBounds: bounds=" + bounds);
        if (false && DEBUG_STACK) Slog.i(TAG, "setBounds: bounds=" + bounds);
        mBounds.set(bounds);
        mBounds.set(bounds);
    }
    }


+5 −5
Original line number Original line Diff line number Diff line
@@ -187,7 +187,7 @@ public class WindowManagerService extends IWindowManager.Stub
    static final boolean DEBUG_SURFACE_TRACE = false;
    static final boolean DEBUG_SURFACE_TRACE = false;
    static final boolean DEBUG_WINDOW_TRACE = false;
    static final boolean DEBUG_WINDOW_TRACE = false;
    static final boolean DEBUG_TASK_MOVEMENT = false;
    static final boolean DEBUG_TASK_MOVEMENT = false;
    static final boolean DEBUG_STACK = false;
    static final boolean DEBUG_STACK = true;
    static final boolean SHOW_SURFACE_ALLOC = false;
    static final boolean SHOW_SURFACE_ALLOC = false;
    static final boolean SHOW_TRANSACTIONS = false;
    static final boolean SHOW_TRANSACTIONS = false;
    static final boolean SHOW_LIGHT_TRANSACTIONS = false || SHOW_TRANSACTIONS;
    static final boolean SHOW_LIGHT_TRANSACTIONS = false || SHOW_TRANSACTIONS;
@@ -2369,8 +2369,8 @@ public class WindowManagerService extends IWindowManager.Stub
        if (localLOGV || DEBUG_FOCUS || DEBUG_FOCUS_LIGHT && win==mCurrentFocus) Slog.v(
        if (localLOGV || DEBUG_FOCUS || DEBUG_FOCUS_LIGHT && win==mCurrentFocus) Slog.v(
                TAG, "Remove " + win + " client="
                TAG, "Remove " + win + " client="
                + Integer.toHexString(System.identityHashCode(win.mClient.asBinder()))
                + Integer.toHexString(System.identityHashCode(win.mClient.asBinder()))
            + ", surface=" + win.mWinAnimator.mSurfaceControl,
                + ", surface=" + win.mWinAnimator.mSurfaceControl + " Callers="
            new RuntimeException("here").fillInStackTrace());
                + Debug.getCallers(4));


        final long origId = Binder.clearCallingIdentity();
        final long origId = Binder.clearCallingIdentity();