summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Julia Tuttle <juliatuttle@google.com> 2024-03-08 16:44:07 -0500
committer Julia Tuttle <juliatuttle@google.com> 2024-03-13 13:15:43 -0400
commit73ba75733e799f362fbb246ec5cfbefcb4577254 (patch)
tree9ff40f85f5cc3c8c4cb49b59e71708d7fdf56b4b
parent9e5b2f19ded853415487e444cae5a4175c3eb545 (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 Change-Id: I90cb8b1c757faf9667e7d8acd877c7f17100ff5d
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java43
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 b20507117558..47718d83ee57 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
@@ -49,6 +49,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;
@@ -211,6 +212,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
@@ -895,17 +899,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);
@@ -933,9 +954,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) {
@@ -4912,6 +4936,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);
@@ -4942,7 +4967,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();