commit | ddd7d73d42b2db3c8a2282d8eb08ad362a7cd273 | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Tue Nov 15 20:11:54 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Nov 15 20:11:54 2022 +0000 |
tree | cd10b043262f1b848715b3b6cae940020869bf39 | |
parent | ffec20f8a389c591b0bb05a2afa6bccaccae1086 [diff] | |
parent | 0ceb4ae22f64c2e93daf91827d263151ff51287f [diff] |
Merge "Apply layout param to NotificationShelf only when needed" into tm-qpr-dev am: 0ceb4ae22f Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20479925 Change-Id: I757398c1793d4011a33af38ce6f5e0c2d8403960 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);