Merge "Fixes an issue where the wrong icons where ambient" into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
95a633d653
@@ -20,7 +20,7 @@ import static com.android.systemui.Dependency.ALLOW_NOTIFICATION_LONG_PRESS_NAME
|
|||||||
import static com.android.systemui.statusbar.notification.ActivityLaunchAnimator.ExpandAnimationParameters;
|
import static com.android.systemui.statusbar.notification.ActivityLaunchAnimator.ExpandAnimationParameters;
|
||||||
import static com.android.systemui.statusbar.notification.stack.StackScrollAlgorithm.ANCHOR_SCROLLING;
|
import static com.android.systemui.statusbar.notification.stack.StackScrollAlgorithm.ANCHOR_SCROLLING;
|
||||||
import static com.android.systemui.statusbar.notification.stack.StackStateAnimator.ANIMATION_DURATION_SWIPE;
|
import static com.android.systemui.statusbar.notification.stack.StackStateAnimator.ANIMATION_DURATION_SWIPE;
|
||||||
import static com.android.systemui.statusbar.phone.NotificationIconAreaController.LOW_PRIORITY;
|
import static com.android.systemui.statusbar.phone.NotificationIconAreaController.HIGH_PRIORITY;
|
||||||
import static com.android.systemui.util.InjectionInflationController.VIEW_CONTEXT;
|
import static com.android.systemui.util.InjectionInflationController.VIEW_CONTEXT;
|
||||||
|
|
||||||
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||||
@@ -187,7 +187,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
|||||||
private int mCurrentStackHeight = Integer.MAX_VALUE;
|
private int mCurrentStackHeight = Integer.MAX_VALUE;
|
||||||
private final Paint mBackgroundPaint = new Paint();
|
private final Paint mBackgroundPaint = new Paint();
|
||||||
private final boolean mShouldDrawNotificationBackground;
|
private final boolean mShouldDrawNotificationBackground;
|
||||||
private boolean mLowPriorityBeforeSpeedBump;
|
private boolean mHighPriorityBeforeSpeedBump;
|
||||||
private final boolean mAllowLongPress;
|
private final boolean mAllowLongPress;
|
||||||
private boolean mDismissRtl;
|
private boolean mDismissRtl;
|
||||||
|
|
||||||
@@ -584,12 +584,12 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
|||||||
|
|
||||||
TunerService tunerService = Dependency.get(TunerService.class);
|
TunerService tunerService = Dependency.get(TunerService.class);
|
||||||
tunerService.addTunable((key, newValue) -> {
|
tunerService.addTunable((key, newValue) -> {
|
||||||
if (key.equals(LOW_PRIORITY)) {
|
if (key.equals(HIGH_PRIORITY)) {
|
||||||
mLowPriorityBeforeSpeedBump = "1".equals(newValue);
|
mHighPriorityBeforeSpeedBump = "1".equals(newValue);
|
||||||
} else if (key.equals(Settings.Secure.NOTIFICATION_DISMISS_RTL)) {
|
} else if (key.equals(Settings.Secure.NOTIFICATION_DISMISS_RTL)) {
|
||||||
updateDismissRtlSetting("1".equals(newValue));
|
updateDismissRtlSetting("1".equals(newValue));
|
||||||
}
|
}
|
||||||
}, LOW_PRIORITY, Settings.Secure.NOTIFICATION_DISMISS_RTL);
|
}, HIGH_PRIORITY, Settings.Secure.NOTIFICATION_DISMISS_RTL);
|
||||||
|
|
||||||
mEntryManager.addNotificationEntryListener(new NotificationEntryListener() {
|
mEntryManager.addNotificationEntryListener(new NotificationEntryListener() {
|
||||||
@Override
|
@Override
|
||||||
@@ -5757,10 +5757,10 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
|
|||||||
ExpandableNotificationRow row = (ExpandableNotificationRow) view;
|
ExpandableNotificationRow row = (ExpandableNotificationRow) view;
|
||||||
currentIndex++;
|
currentIndex++;
|
||||||
boolean beforeSpeedBump;
|
boolean beforeSpeedBump;
|
||||||
if (mLowPriorityBeforeSpeedBump) {
|
if (mHighPriorityBeforeSpeedBump) {
|
||||||
beforeSpeedBump = !row.getEntry().ambient;
|
|
||||||
} else {
|
|
||||||
beforeSpeedBump = row.getEntry().isHighPriority();
|
beforeSpeedBump = row.getEntry().isHighPriority();
|
||||||
|
} else {
|
||||||
|
beforeSpeedBump = !row.getEntry().ambient;
|
||||||
}
|
}
|
||||||
if (beforeSpeedBump) {
|
if (beforeSpeedBump) {
|
||||||
speedBumpIndex = currentIndex;
|
speedBumpIndex = currentIndex;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import java.util.function.Function;
|
|||||||
public class NotificationIconAreaController implements DarkReceiver,
|
public class NotificationIconAreaController implements DarkReceiver,
|
||||||
StatusBarStateController.StateListener {
|
StatusBarStateController.StateListener {
|
||||||
|
|
||||||
public static final String LOW_PRIORITY = "low_priority";
|
public static final String HIGH_PRIORITY = "high_priority";
|
||||||
|
|
||||||
private final ContrastColorUtil mContrastColorUtil;
|
private final ContrastColorUtil mContrastColorUtil;
|
||||||
private final NotificationEntryManager mEntryManager;
|
private final NotificationEntryManager mEntryManager;
|
||||||
|
|||||||
Reference in New Issue
Block a user