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

Commit 0e4308a3 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add log dumps for taskbar"

parents d5aa1c42 8ef85375
Loading
Loading
Loading
Loading
+19 −15
Original line number Diff line number Diff line
@@ -275,23 +275,27 @@ public class RegionSamplingHelper implements View.OnAttachStateChangeListener,
    }

    public void dump(PrintWriter pw) {
        pw.println("RegionSamplingHelper:");
        pw.println("  sampleView isAttached: " + mSampledView.isAttachedToWindow());
        pw.println("  sampleView isScValid: " + (mSampledView.isAttachedToWindow()
        dump("", pw);
    }

    public void dump(String prefix, PrintWriter pw) {
        pw.println(prefix + "RegionSamplingHelper:");
        pw.println(prefix + "\tsampleView isAttached: " + mSampledView.isAttachedToWindow());
        pw.println(prefix + "\tsampleView isScValid: " + (mSampledView.isAttachedToWindow()
                ? mSampledView.getViewRootImpl().getSurfaceControl().isValid()
                : "notAttached"));
        pw.println("  mSamplingEnabled: " + mSamplingEnabled);
        pw.println("  mSamplingListenerRegistered: " + mSamplingListenerRegistered);
        pw.println("  mSamplingRequestBounds: " + mSamplingRequestBounds);
        pw.println("  mRegisteredSamplingBounds: " + mRegisteredSamplingBounds);
        pw.println("  mLastMedianLuma: " + mLastMedianLuma);
        pw.println("  mCurrentMedianLuma: " + mCurrentMedianLuma);
        pw.println("  mWindowVisible: " + mWindowVisible);
        pw.println("  mWindowHasBlurs: " + mWindowHasBlurs);
        pw.println("  mWaitingOnDraw: " + mWaitingOnDraw);
        pw.println("  mRegisteredStopLayer: " + mRegisteredStopLayer);
        pw.println("  mWrappedStopLayer: " + mWrappedStopLayer);
        pw.println("  mIsDestroyed: " + mIsDestroyed);
        pw.println(prefix + "\tmSamplingEnabled: " + mSamplingEnabled);
        pw.println(prefix + "\tmSamplingListenerRegistered: " + mSamplingListenerRegistered);
        pw.println(prefix + "\tmSamplingRequestBounds: " + mSamplingRequestBounds);
        pw.println(prefix + "\tmRegisteredSamplingBounds: " + mRegisteredSamplingBounds);
        pw.println(prefix + "\tmLastMedianLuma: " + mLastMedianLuma);
        pw.println(prefix + "\tmCurrentMedianLuma: " + mCurrentMedianLuma);
        pw.println(prefix + "\tmWindowVisible: " + mWindowVisible);
        pw.println(prefix + "\tmWindowHasBlurs: " + mWindowHasBlurs);
        pw.println(prefix + "\tmWaitingOnDraw: " + mWaitingOnDraw);
        pw.println(prefix + "\tmRegisteredStopLayer: " + mRegisteredStopLayer);
        pw.println(prefix + "\tmWrappedStopLayer: " + mWrappedStopLayer);
        pw.println(prefix + "\tmIsDestroyed: " + mIsDestroyed);
    }

    public interface SamplingCallback {
+26 −1
Original line number Diff line number Diff line
@@ -52,13 +52,14 @@ import com.android.internal.logging.UiEvent;
import com.android.internal.logging.UiEventLogger;
import com.android.internal.logging.UiEventLoggerImpl;
import com.android.internal.view.RotationPolicy;
import com.android.systemui.shared.rotation.RotationButton.RotationButtonUpdatesCallback;
import com.android.systemui.shared.recents.utilities.Utilities;
import com.android.systemui.shared.recents.utilities.ViewRippler;
import com.android.systemui.shared.rotation.RotationButton.RotationButtonUpdatesCallback;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.TaskStackChangeListener;
import com.android.systemui.shared.system.TaskStackChangeListeners;

import java.io.PrintWriter;
import java.util.Optional;
import java.util.function.Consumer;
import java.util.function.Supplier;
@@ -450,6 +451,30 @@ public class RotationButtonController {
        return mDarkIconColor;
    }

    public void dumpLogs(String prefix, PrintWriter pw) {
        pw.println(prefix + "RotationButtonController:");

        pw.println(String.format(
                "%s\tmIsRecentsAnimationRunning=%b", prefix, mIsRecentsAnimationRunning));
        pw.println(String.format("%s\tmHomeRotationEnabled=%b", prefix, mHomeRotationEnabled));
        pw.println(String.format(
                "%s\tmLastRotationSuggestion=%d", prefix, mLastRotationSuggestion));
        pw.println(String.format(
                "%s\tmPendingRotationSuggestion=%b", prefix, mPendingRotationSuggestion));
        pw.println(String.format(
                "%s\tmHoveringRotationSuggestion=%b", prefix, mHoveringRotationSuggestion));
        pw.println(String.format("%s\tmListenersRegistered=%b", prefix, mListenersRegistered));
        pw.println(String.format(
                "%s\tmIsNavigationBarShowing=%b", prefix, mIsNavigationBarShowing));
        pw.println(String.format("%s\tmBehavior=%d", prefix, mBehavior));
        pw.println(String.format(
                "%s\tmSkipOverrideUserLockPrefsOnce=%b", prefix, mSkipOverrideUserLockPrefsOnce));
        pw.println(String.format(
                "%s\tmLightIconColor=0x%s", prefix, Integer.toHexString(mLightIconColor)));
        pw.println(String.format(
                "%s\tmDarkIconColor=0x%s", prefix, Integer.toHexString(mDarkIconColor)));
    }

    public RotationButton getRotationButton() {
        return mRotationButton;
    }