diff options
| author | 2024-03-08 16:44:07 -0500 | |
|---|---|---|
| committer | 2024-04-15 17:14:56 +0000 | |
| commit | 92d95cfae896b3bc0e47f6eb2f0f6d2e4f1785ea (patch) | |
| tree | 7d828dfd975dcbb2eeb2050923e983fc76bcc3bb | |
| parent | 62f4d08d7472cbf7b602aaedc1b3f0e25f0075f5 (diff) | |
NSSL: Log more about side padding decisions
Turns out that updateSidePadding doesn't tell the whole story, so
collect and dump *all* all of the inputs.
Bug: 328588062
Test: manual
Flag: NA
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:73ba75733e799f362fbb246ec5cfbefcb4577254)
Merged-In: I90cb8b1c757faf9667e7d8acd877c7f17100ff5d
Change-Id: I90cb8b1c757faf9667e7d8acd877c7f17100ff5d
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index 77f19222545e..e53999132949 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -51,6 +51,7 @@ import android.graphics.Paint; import android.graphics.Path; import android.graphics.Rect; import android.os.Bundle; +import android.os.SystemClock; import android.os.Trace; import android.provider.Settings; import android.util.AttributeSet; @@ -221,6 +222,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private float mQsExpansionFraction; private final int mSplitShadeMinContentHeight; private String mLastUpdateSidePaddingDumpString; + private long mLastUpdateSidePaddingElapsedRealtime; + private String mLastInitViewDumpString; + private long mLastInitViewElapsedRealtime; /** * The algorithm which calculates the properties for our children @@ -1094,17 +1098,34 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mOverflingDistance = configuration.getScaledOverflingDistance(); Resources res = context.getResources(); + final boolean isSmallScreenLandscape = res.getBoolean(R.bool.is_small_screen_landscape); boolean useSmallLandscapeLockscreenResources = mIsSmallLandscapeLockscreenEnabled - && res.getBoolean(R.bool.is_small_screen_landscape); + && isSmallScreenLandscape; // TODO (b/293252410) remove condition here when flag is launched // Instead update the config_skinnyNotifsInLandscape to be false whenever // is_small_screen_landscape is true. Then, only use the config_skinnyNotifsInLandscape. + final boolean configSkinnyNotifsInLandscape = res.getBoolean( + R.bool.config_skinnyNotifsInLandscape); if (useSmallLandscapeLockscreenResources) { mSkinnyNotifsInLandscape = false; } else { - mSkinnyNotifsInLandscape = res.getBoolean( - R.bool.config_skinnyNotifsInLandscape); + mSkinnyNotifsInLandscape = configSkinnyNotifsInLandscape; } + + mLastInitViewDumpString = + "mIsSmallLandscapeLockscreenEnabled=" + mIsSmallLandscapeLockscreenEnabled + + " isSmallScreenLandscape=" + isSmallScreenLandscape + + " useSmallLandscapeLockscreenResources=" + + useSmallLandscapeLockscreenResources + + " skinnyNotifsInLandscape=" + configSkinnyNotifsInLandscape + + " mSkinnyNotifsInLandscape=" + mSkinnyNotifsInLandscape; + mLastInitViewElapsedRealtime = SystemClock.elapsedRealtime(); + + if (DEBUG_UPDATE_SIDE_PADDING) { + Log.v(TAG, "initView @ elapsedRealtime " + mLastInitViewElapsedRealtime + ": " + + mLastInitViewDumpString); + } + mGapHeight = res.getDimensionPixelSize(R.dimen.notification_section_divider_height); mStackScrollAlgorithm.initView(context); mStateAnimator.initView(context); @@ -1132,9 +1153,12 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable mLastUpdateSidePaddingDumpString = "viewWidth=" + viewWidth + " skinnyNotifsInLandscape=" + mSkinnyNotifsInLandscape + " orientation=" + orientation; + mLastUpdateSidePaddingElapsedRealtime = SystemClock.elapsedRealtime(); if (DEBUG_UPDATE_SIDE_PADDING) { - Log.v(TAG, "updateSidePadding: " + mLastUpdateSidePaddingDumpString); + Log.v(TAG, + "updateSidePadding @ elapsedRealtime " + mLastUpdateSidePaddingElapsedRealtime + + ": " + mLastUpdateSidePaddingDumpString); } if (viewWidth == 0 || !mSkinnyNotifsInLandscape) { @@ -5312,6 +5336,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable public void dump(PrintWriter pwOriginal, String[] args) { IndentingPrintWriter pw = DumpUtilsKt.asIndenting(pwOriginal); + final long elapsedRealtime = SystemClock.elapsedRealtime(); pw.println("Internal state:"); DumpUtilsKt.withIncreasedIndent(pw, () -> { println(pw, "pulsing", mPulsing); @@ -5342,7 +5367,17 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable println(pw, "minimumPaddings", mMinimumPaddings); println(pw, "qsTilePadding", mQsTilePadding); println(pw, "sidePaddings", mSidePaddings); + println(pw, "elapsedRealtime", elapsedRealtime); + println(pw, "lastInitView", mLastInitViewDumpString); + println(pw, "lastInitViewElapsedRealtime", mLastInitViewElapsedRealtime); + println(pw, "lastInitViewMillisAgo", elapsedRealtime - mLastInitViewElapsedRealtime); + println(pw, "shouldUseSplitNotificationShade", mShouldUseSplitNotificationShade); println(pw, "lastUpdateSidePadding", mLastUpdateSidePaddingDumpString); + println(pw, "lastUpdateSidePaddingElapsedRealtime", + mLastUpdateSidePaddingElapsedRealtime); + println(pw, "lastUpdateSidePaddingMillisAgo", + elapsedRealtime - mLastUpdateSidePaddingElapsedRealtime); + println(pw, "isSmallLandscapeLockscreenEnabled", mIsSmallLandscapeLockscreenEnabled); mNotificationStackSizeCalculator.dump(pw, args); }); pw.println(); |