commit | 337cc6f5fca672e047b5c0a16f991868e087b4ef | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Wed Nov 16 03:46:59 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Nov 16 03:46:59 2022 +0000 |
tree | 9b43297407dae9686179966082b43b176435420b | |
parent | b9ecc133dc8a0e4f49a5863f0163be600d7f1d32 [diff] | |
parent | ddd7d73d42b2db3c8a2282d8eb08ad362a7cd273 [diff] |
Merge "Apply layout param to NotificationShelf only when needed" into tm-qpr-dev am: 0ceb4ae22f am: ddd7d73d42 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20479925 Change-Id: I2b8aaf80e8dc4a90b198a46ecfd81d49432ac3bb Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java index 815b86e..cd13085 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java
@@ -132,8 +132,11 @@ mPaddingBetweenElements = res.getDimensionPixelSize(R.dimen.notification_divider_height); ViewGroup.LayoutParams layoutParams = getLayoutParams(); - layoutParams.height = res.getDimensionPixelOffset(R.dimen.notification_shelf_height); - setLayoutParams(layoutParams); + final int newShelfHeight = res.getDimensionPixelOffset(R.dimen.notification_shelf_height); + if (newShelfHeight != layoutParams.height) { + layoutParams.height = newShelfHeight; + setLayoutParams(layoutParams); + } final int padding = res.getDimensionPixelOffset(R.dimen.shelf_icon_container_padding); mShelfIcons.setPadding(padding, 0, padding, 0);