Loading core/java/android/app/Notification.java +8 −10 Original line number Diff line number Diff line Loading @@ -3246,9 +3246,10 @@ public class Notification implements Parcelable * This should only be used for high priority ongoing tasks like navigation, an ongoing * call, or other similarly high-priority events for the user. * <p> * For most styles, the coloring will only be applied if the notification is ongoing. * For most styles, the coloring will only be applied if the notification is for a * foreground service notification. * However, for {@link MediaStyle} and {@link DecoratedMediaCustomViewStyle} notifications * that have a media session attached there is no requirement for it to be ongoing. * that have a media session attached there is no such requirement. * * @see Builder#setOngoing(boolean) * @see Builder#setColor(int) Loading Loading @@ -4746,12 +4747,10 @@ public class Notification implements Parcelable } /** * @return whether this notification is ongoing and can't be dismissed by the user. * @return whether this notification is a foreground service notification */ private boolean isOngoing() { final int ongoingFlags = Notification.FLAG_FOREGROUND_SERVICE | Notification.FLAG_ONGOING_EVENT | Notification.FLAG_NO_CLEAR; return (flags & ongoingFlags) != 0; private boolean isForegroundService() { return (flags & Notification.FLAG_FOREGROUND_SERVICE) != 0; } /** Loading @@ -4776,8 +4775,7 @@ public class Notification implements Parcelable } /** * @return true if this notification is colorized. This also factors in whether the * notification is ongoing. * @return true if this notification is colorized. * * @hide */ Loading @@ -4793,7 +4791,7 @@ public class Notification implements Parcelable return true; } } return extras.getBoolean(EXTRA_COLORIZED) && isOngoing(); return extras.getBoolean(EXTRA_COLORIZED) && isForegroundService(); } private boolean hasLargeIcon() { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +5 −3 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, private static final int TAG_KEY_ANIM_TARGET = R.id.scrim_target; private static final int TAG_START_ALPHA = R.id.scrim_alpha_start; private static final int TAG_END_ALPHA = R.id.scrim_alpha_end; private static final float NOT_INITIALIZED = -1; private final LightBarController mLightBarController; protected final ScrimView mScrimBehind; Loading Loading @@ -87,9 +88,9 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, private boolean mDozing; private float mDozeInFrontAlpha; private float mDozeBehindAlpha; private float mCurrentInFrontAlpha; private float mCurrentBehindAlpha; private float mCurrentHeadsUpAlpha = 1; private float mCurrentInFrontAlpha = NOT_INITIALIZED; private float mCurrentBehindAlpha = NOT_INITIALIZED; private float mCurrentHeadsUpAlpha = NOT_INITIALIZED; private int mPinnedHeadsUpCount; private float mTopHeadsUpDragAmount; private View mDraggedHeadsUpView; Loading @@ -111,6 +112,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, mScrimBehindAlpha = context.getResources().getFloat(R.dimen.scrim_behind_alpha); updateHeadsUpScrim(false); updateScrims(); } public void setKeyguardShowing(boolean showing) { Loading Loading
core/java/android/app/Notification.java +8 −10 Original line number Diff line number Diff line Loading @@ -3246,9 +3246,10 @@ public class Notification implements Parcelable * This should only be used for high priority ongoing tasks like navigation, an ongoing * call, or other similarly high-priority events for the user. * <p> * For most styles, the coloring will only be applied if the notification is ongoing. * For most styles, the coloring will only be applied if the notification is for a * foreground service notification. * However, for {@link MediaStyle} and {@link DecoratedMediaCustomViewStyle} notifications * that have a media session attached there is no requirement for it to be ongoing. * that have a media session attached there is no such requirement. * * @see Builder#setOngoing(boolean) * @see Builder#setColor(int) Loading Loading @@ -4746,12 +4747,10 @@ public class Notification implements Parcelable } /** * @return whether this notification is ongoing and can't be dismissed by the user. * @return whether this notification is a foreground service notification */ private boolean isOngoing() { final int ongoingFlags = Notification.FLAG_FOREGROUND_SERVICE | Notification.FLAG_ONGOING_EVENT | Notification.FLAG_NO_CLEAR; return (flags & ongoingFlags) != 0; private boolean isForegroundService() { return (flags & Notification.FLAG_FOREGROUND_SERVICE) != 0; } /** Loading @@ -4776,8 +4775,7 @@ public class Notification implements Parcelable } /** * @return true if this notification is colorized. This also factors in whether the * notification is ongoing. * @return true if this notification is colorized. * * @hide */ Loading @@ -4793,7 +4791,7 @@ public class Notification implements Parcelable return true; } } return extras.getBoolean(EXTRA_COLORIZED) && isOngoing(); return extras.getBoolean(EXTRA_COLORIZED) && isForegroundService(); } private boolean hasLargeIcon() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/ScrimController.java +5 −3 Original line number Diff line number Diff line Loading @@ -57,6 +57,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, private static final int TAG_KEY_ANIM_TARGET = R.id.scrim_target; private static final int TAG_START_ALPHA = R.id.scrim_alpha_start; private static final int TAG_END_ALPHA = R.id.scrim_alpha_end; private static final float NOT_INITIALIZED = -1; private final LightBarController mLightBarController; protected final ScrimView mScrimBehind; Loading Loading @@ -87,9 +88,9 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, private boolean mDozing; private float mDozeInFrontAlpha; private float mDozeBehindAlpha; private float mCurrentInFrontAlpha; private float mCurrentBehindAlpha; private float mCurrentHeadsUpAlpha = 1; private float mCurrentInFrontAlpha = NOT_INITIALIZED; private float mCurrentBehindAlpha = NOT_INITIALIZED; private float mCurrentHeadsUpAlpha = NOT_INITIALIZED; private int mPinnedHeadsUpCount; private float mTopHeadsUpDragAmount; private View mDraggedHeadsUpView; Loading @@ -111,6 +112,7 @@ public class ScrimController implements ViewTreeObserver.OnPreDrawListener, mScrimBehindAlpha = context.getResources().getFloat(R.dimen.scrim_behind_alpha); updateHeadsUpScrim(false); updateScrims(); } public void setKeyguardShowing(boolean showing) { Loading