diff options
| author | 2019-05-13 14:22:30 -0700 | |
|---|---|---|
| committer | 2019-05-13 14:22:30 -0700 | |
| commit | c104cd6bce01687ee05f593caa22bc1a2f21d569 (patch) | |
| tree | e71aff843b0b7faa6f7f9afd11d49346ba74708b | |
| parent | 99a61d3b5856e46540757df53db91c28611ac412 (diff) | |
Smaller notification icons on AOD
Test: visual
Test: breakpoint
Fixes: 132273091
Change-Id: Idb4114dc8baeeaf03c55520d681522c7fa084867
| -rw-r--r-- | packages/SystemUI/res/values/dimens.xml | 3 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index fbb439af7c51..62974238cd9f 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -252,6 +252,9 @@ <!-- size at which Notification icons will be drawn on Ambient Display --> <dimen name="status_bar_icon_drawing_size_dark">@*android:dimen/notification_header_icon_size_ambient</dimen> + <!-- size of notification icons on AOD --> + <dimen name="dark_shelf_icon_size">16dp</dimen> + <!-- opacity at which Notification icons will be drawn in the status bar --> <item type="dimen" name="status_bar_icon_drawing_alpha">90%</item> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java index 2cca701ef582..d202190724f5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java @@ -71,6 +71,7 @@ public class NotificationShelf extends ActivatableNotificationView implements private int mIconAppearTopPadding; private int mShelfAppearTranslation; private float mDarkShelfPadding; + private float mDarkShelfIconSize; private int mStatusBarHeight; private int mStatusBarPaddingStart; private AmbientState mAmbientState; @@ -151,6 +152,7 @@ public class NotificationShelf extends ActivatableNotificationView implements mScrollFastThreshold = res.getDimensionPixelOffset(R.dimen.scroll_fast_threshold); mShowNotificationShelf = res.getBoolean(R.bool.config_showNotificationShelf); mIconSize = res.getDimensionPixelSize(com.android.internal.R.dimen.status_bar_icon_size); + mDarkShelfIconSize = res.getDimensionPixelOffset(R.dimen.dark_shelf_icon_size); mGapHeight = res.getDimensionPixelSize(R.dimen.qs_notification_padding); if (!mShowNotificationShelf) { @@ -705,12 +707,13 @@ public class NotificationShelf extends ActivatableNotificationView implements } notificationIconPosition += iconTopPadding; float shelfIconPosition = getTranslationY() + icon.getTop(); - shelfIconPosition += (icon.getHeight() - icon.getIconScale() * mIconSize) / 2.0f; + float iconSize = mDark ? mDarkShelfIconSize : mIconSize; + shelfIconPosition += (icon.getHeight() - icon.getIconScale() * iconSize) / 2.0f; float iconYTranslation = NotificationUtils.interpolate( notificationIconPosition - shelfIconPosition, 0, transitionAmount); - float shelfIconSize = mIconSize * icon.getIconScale(); + float shelfIconSize = iconSize * icon.getIconScale(); float alpha = 1.0f; boolean noIcon = !row.isShowingIcon(); if (noIcon) { |