Merge "Limit primary text color to notification shelf icons" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-03-19 20:15:02 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 1 deletions

View File

@@ -132,6 +132,7 @@ public class NotificationShelf extends ActivatableNotificationView implements
mHiddenShelfIconSize = res.getDimensionPixelOffset(R.dimen.hidden_shelf_icon_size);
mGapHeight = res.getDimensionPixelSize(R.dimen.qs_notification_padding);
mShelfIcons.setInNotificationIconShelf(true);
if (!mShowNotificationShelf) {
setVisibility(GONE);
}

View File

@@ -152,6 +152,7 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
private boolean mDozing;
private boolean mOnLockScreen;
private int mLockScreenMode = KeyguardUpdateMonitor.LOCK_SCREEN_MODE_NORMAL;
private boolean mInNotificationIconShelf;
private boolean mChangingViewPositions;
private int mAddAnimationStartIndex = -1;
private int mCannedAnimationStartIndex = -1;
@@ -702,6 +703,10 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
mLockScreenMode = lockScreenMode;
}
public void setInNotificationIconShelf(boolean inShelf) {
mInNotificationIconShelf = inShelf;
}
public class IconState extends ViewState {
public static final int NO_VALUE = NotificationIconContainer.NO_VALUE;
public float iconAppearAmount = 1.0f;
@@ -813,7 +818,7 @@ public class NotificationIconContainer extends AlphaOptimizedFrameLayout {
}
}
icon.setVisibleState(visibleState, animationsAllowed);
icon.setIconColor(mThemedTextColorPrimary,
icon.setIconColor(mInNotificationIconShelf ? mThemedTextColorPrimary : iconColor,
needsCannedAnimation && animationsAllowed);
if (animate) {
animateTo(icon, animationProperties);