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

Commit 44aabe4b authored by Chong Zhang's avatar Chong Zhang
Browse files

Disable keep_screen_on traces

bug: 28692100
bug: 27522448

Change-Id: Ic077e8985f1f21bc111287813fb2992ed01df909
parent 9e935820
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@ public final class ViewRootImpl implements ViewParent,
    private static final boolean DEBUG_CONFIGURATION = false || LOCAL_LOGV;
    private static final boolean DEBUG_FPS = false;
    private static final boolean DEBUG_INPUT_STAGES = false || LOCAL_LOGV;
    private static final boolean DEBUG_KEEP_SCREEN_ON = false || LOCAL_LOGV;

    /**
     * Set to false if we do not want to use the multi threaded renderer. Note that by disabling
@@ -563,9 +564,10 @@ public final class ViewRootImpl implements ViewParent,
                attrs = mWindowAttributes;
                setTag();

                if ((mClientWindowLayoutFlags&WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) != 0
                if (DEBUG_KEEP_SCREEN_ON && (mClientWindowLayoutFlags
                        & WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) != 0
                        && (attrs.flags&WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) == 0) {
                    Slog.d(mTag, "setView: FLAG_KEEP_SCREEN_ON changed from true to false!!!");
                    Slog.d(mTag, "setView: FLAG_KEEP_SCREEN_ON changed from true to false!");
                }
                // Keep track of the actual window flags supplied by the client.
                mClientWindowLayoutFlags = attrs.flags;
@@ -894,9 +896,11 @@ public final class ViewRootImpl implements ViewParent,
            final int oldInsetBottom = mWindowAttributes.surfaceInsets.bottom;
            final int oldSoftInputMode = mWindowAttributes.softInputMode;
            final boolean oldHasManualSurfaceInsets = mWindowAttributes.hasManualSurfaceInsets;
            if ((mClientWindowLayoutFlags&WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) != 0

            if (DEBUG_KEEP_SCREEN_ON && (mClientWindowLayoutFlags
                    & WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) != 0
                    && (attrs.flags&WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) == 0) {
                Slog.d(mTag, "setLayoutParams: FLAG_KEEP_SCREEN_ON from true to false!!!");
                Slog.d(mTag, "setLayoutParams: FLAG_KEEP_SCREEN_ON from true to false!");
            }

            // Keep track of the actual window flags supplied by the client.
+1 −1
Original line number Diff line number Diff line
@@ -75,5 +75,5 @@ public class WindowManagerDebugConfig {
    static final boolean DEBUG_WINDOW_CROP = false;

    static final String TAG_KEEP_SCREEN_ON = "DebugKeepScreenOn";
    static final boolean DEBUG_KEEP_SCREEN_ON = true;
    static final boolean DEBUG_KEEP_SCREEN_ON = false;
}