summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Julia Tuttle <juliatuttle@google.com> 2024-03-08 19:31:22 -0500
committer Cherrypicker Worker <android-build-cherrypicker-worker@google.com> 2024-04-15 17:15:06 +0000
commitdfc4a0dd875d938e2a8ab735c611b007f49060f3 (patch)
tree986f46b41d3da6269d66d29375a7b3f8c2a19321
parent92d95cfae896b3bc0e47f6eb2f0f6d2e4f1785ea (diff)
NSSL: Apply skinny notifs based on split shade state
Currently, we're relying on some complex config/resource logic to decide whether to use the skinny notif layout, and it seems like it might be flaky. Therefore, check *directly* whether NSSL should use the split shade, and use *that* to decide whether to use the skinny notif layout. Bug: 328588062 Test: postsubmit Flag: NA (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:13203c2c38032acdc85f4927922179712ff60bc4) Merged-In: Iaeb97db2e4808cbec131019a2f2dcc6a679fa642 Change-Id: Iaeb97db2e4808cbec131019a2f2dcc6a679fa642
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java12
1 files changed, 10 insertions, 2 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 e53999132949..9ee1e4d53ead 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
@@ -1161,17 +1161,25 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
+ ": " + mLastUpdateSidePaddingDumpString);
}
- if (viewWidth == 0 || !mSkinnyNotifsInLandscape) {
+ if (viewWidth == 0) {
+ Log.e(TAG, "updateSidePadding: viewWidth is zero");
mSidePaddings = mMinimumPaddings;
return;
}
- // Portrait is easy, just use the dimen for paddings
if (orientation == Configuration.ORIENTATION_PORTRAIT) {
mSidePaddings = mMinimumPaddings;
return;
}
+ if (mShouldUseSplitNotificationShade) {
+ if (mSkinnyNotifsInLandscape) {
+ Log.e(TAG, "updateSidePadding: mSkinnyNotifsInLandscape has betrayed us!");
+ }
+ mSidePaddings = mMinimumPaddings;
+ return;
+ }
+
final int innerWidth = viewWidth - mMinimumPaddings * 2;
final int qsTileWidth = (innerWidth - mQsTilePadding * 3) / 4;
mSidePaddings = mMinimumPaddings + qsTileWidth + mQsTilePadding;