Loading packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java +15 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.animation.TimeAnimator; import android.animation.ValueAnimator; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.RectF; import android.util.AttributeSet; import android.view.MotionEvent; Loading Loading @@ -177,6 +178,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView * Similar to mDimmed but is also true if it's not dimmable but should be */ private boolean mNeedsDimming; private int mDimmedAlpha; public ActivatableNotificationView(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -214,6 +216,8 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView mBackgroundDimmed = findViewById(R.id.backgroundDimmed); mBackgroundNormal.setCustomBackground(R.drawable.notification_material_bg); mBackgroundDimmed.setCustomBackground(R.drawable.notification_material_bg_dim); mDimmedAlpha = Color.alpha(mContext.getColor( R.color.notification_material_background_dimmed_color)); updateBackground(); updateBackgroundTint(); updateOutlineAlpha(); Loading Loading @@ -492,10 +496,21 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView * used and the background color not at all. */ public void setOverrideTintColor(int color, float overrideAmount) { if (mDark) { color = NO_COLOR; overrideAmount = 0; } mOverrideTint = color; mOverrideAmount = overrideAmount; int newColor = calculateBgColor(); setBackgroundTintColor(newColor); if (!isDimmable() && mNeedsDimming) { mBackgroundNormal.setDrawableAlpha((int) NotificationUtils.interpolate(255, mDimmedAlpha, overrideAmount)); } else { mBackgroundNormal.setDrawableAlpha(255); } } protected void updateBackgroundTint() { Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationBackgroundView.java +4 −0 Original line number Diff line number Diff line Loading @@ -144,4 +144,8 @@ public class NotificationBackgroundView extends View { ripple.setColor(ColorStateList.valueOf(color)); } } public void setDrawableAlpha(int drawableAlpha) { mBackground.setAlpha(drawableAlpha); } } packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +8 −4 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ public class NotificationShelf extends ActivatableNotificationView implements // find the first view that doesn't overlap with the shelf int notificationIndex = 0; int notGoneIndex = 0; int colorOfViewBeforeLast = 0; int colorOfViewBeforeLast = NO_COLOR; boolean backgroundForceHidden = false; if (mHideBackground && !mShelfState.hasItemsInStableShelf) { backgroundForceHidden = true; Loading Loading @@ -256,7 +256,10 @@ public class NotificationShelf extends ActivatableNotificationView implements colorTwoBefore = previousColor; transitionAmount = inShelfAmount; } if (isLastChild && colorOfViewBeforeLast != NO_COLOR) { if (isLastChild) { if (colorOfViewBeforeLast == NO_COLOR) { colorOfViewBeforeLast = ownColorUntinted; } row.setOverrideTintColor(colorOfViewBeforeLast, inShelfAmount); } else { colorOfViewBeforeLast = ownColorUntinted; Loading Loading @@ -310,7 +313,8 @@ public class NotificationShelf extends ActivatableNotificationView implements float fullTransitionAmount; float iconTransitionAmount; float shelfStart = getTranslationY(); if (viewEnd >= shelfStart && (mAmbientState.isShadeExpanded() if (viewEnd >= shelfStart && (!mAmbientState.isUnlockHintRunning() || row.isInShelf()) && (mAmbientState.isShadeExpanded() || (!row.isPinned() && !row.isHeadsUpAnimatingAway()))) { if (viewStart < shelfStart) { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +12 −0 Original line number Diff line number Diff line Loading @@ -1984,6 +1984,18 @@ public class NotificationPanelView extends PanelView implements } } @Override protected void onUnlockHintFinished() { super.onUnlockHintFinished(); mNotificationStackScroller.setUnlockHintRunning(false); } @Override protected void onUnlockHintStarted() { super.onUnlockHintStarted(); mNotificationStackScroller.setUnlockHintRunning(true); } @Override public KeyguardAffordanceView getLeftIcon() { return getLayoutDirection() == LAYOUT_DIRECTION_RTL Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +10 −3 Original line number Diff line number Diff line Loading @@ -35,7 +35,6 @@ import android.widget.FrameLayout; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.systemui.DejankUtils; import com.android.systemui.EventLogConstants; import com.android.systemui.EventLogTags; import com.android.systemui.Interpolators; import com.android.keyguard.LatencyTracker; Loading Loading @@ -1020,14 +1019,22 @@ public abstract class PanelView extends FrameLayout { @Override public void run() { notifyExpandingFinished(); mStatusBar.onHintFinished(); onUnlockHintFinished(); mHintAnimationRunning = false; } }); mStatusBar.onUnlockHintStarted(); onUnlockHintStarted(); mHintAnimationRunning = true; } protected void onUnlockHintFinished() { mStatusBar.onHintFinished(); } protected void onUnlockHintStarted() { mStatusBar.onUnlockHintStarted(); } /** * Phase 1: Move everything upwards. */ Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java +15 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import android.animation.TimeAnimator; import android.animation.ValueAnimator; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.RectF; import android.util.AttributeSet; import android.view.MotionEvent; Loading Loading @@ -177,6 +178,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView * Similar to mDimmed but is also true if it's not dimmable but should be */ private boolean mNeedsDimming; private int mDimmedAlpha; public ActivatableNotificationView(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -214,6 +216,8 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView mBackgroundDimmed = findViewById(R.id.backgroundDimmed); mBackgroundNormal.setCustomBackground(R.drawable.notification_material_bg); mBackgroundDimmed.setCustomBackground(R.drawable.notification_material_bg_dim); mDimmedAlpha = Color.alpha(mContext.getColor( R.color.notification_material_background_dimmed_color)); updateBackground(); updateBackgroundTint(); updateOutlineAlpha(); Loading Loading @@ -492,10 +496,21 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView * used and the background color not at all. */ public void setOverrideTintColor(int color, float overrideAmount) { if (mDark) { color = NO_COLOR; overrideAmount = 0; } mOverrideTint = color; mOverrideAmount = overrideAmount; int newColor = calculateBgColor(); setBackgroundTintColor(newColor); if (!isDimmable() && mNeedsDimming) { mBackgroundNormal.setDrawableAlpha((int) NotificationUtils.interpolate(255, mDimmedAlpha, overrideAmount)); } else { mBackgroundNormal.setDrawableAlpha(255); } } protected void updateBackgroundTint() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationBackgroundView.java +4 −0 Original line number Diff line number Diff line Loading @@ -144,4 +144,8 @@ public class NotificationBackgroundView extends View { ripple.setColor(ColorStateList.valueOf(color)); } } public void setDrawableAlpha(int drawableAlpha) { mBackground.setAlpha(drawableAlpha); } }
packages/SystemUI/src/com/android/systemui/statusbar/NotificationShelf.java +8 −4 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ public class NotificationShelf extends ActivatableNotificationView implements // find the first view that doesn't overlap with the shelf int notificationIndex = 0; int notGoneIndex = 0; int colorOfViewBeforeLast = 0; int colorOfViewBeforeLast = NO_COLOR; boolean backgroundForceHidden = false; if (mHideBackground && !mShelfState.hasItemsInStableShelf) { backgroundForceHidden = true; Loading Loading @@ -256,7 +256,10 @@ public class NotificationShelf extends ActivatableNotificationView implements colorTwoBefore = previousColor; transitionAmount = inShelfAmount; } if (isLastChild && colorOfViewBeforeLast != NO_COLOR) { if (isLastChild) { if (colorOfViewBeforeLast == NO_COLOR) { colorOfViewBeforeLast = ownColorUntinted; } row.setOverrideTintColor(colorOfViewBeforeLast, inShelfAmount); } else { colorOfViewBeforeLast = ownColorUntinted; Loading Loading @@ -310,7 +313,8 @@ public class NotificationShelf extends ActivatableNotificationView implements float fullTransitionAmount; float iconTransitionAmount; float shelfStart = getTranslationY(); if (viewEnd >= shelfStart && (mAmbientState.isShadeExpanded() if (viewEnd >= shelfStart && (!mAmbientState.isUnlockHintRunning() || row.isInShelf()) && (mAmbientState.isShadeExpanded() || (!row.isPinned() && !row.isHeadsUpAnimatingAway()))) { if (viewStart < shelfStart) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +12 −0 Original line number Diff line number Diff line Loading @@ -1984,6 +1984,18 @@ public class NotificationPanelView extends PanelView implements } } @Override protected void onUnlockHintFinished() { super.onUnlockHintFinished(); mNotificationStackScroller.setUnlockHintRunning(false); } @Override protected void onUnlockHintStarted() { super.onUnlockHintStarted(); mNotificationStackScroller.setUnlockHintRunning(true); } @Override public KeyguardAffordanceView getLeftIcon() { return getLayoutDirection() == LAYOUT_DIRECTION_RTL Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +10 −3 Original line number Diff line number Diff line Loading @@ -35,7 +35,6 @@ import android.widget.FrameLayout; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.systemui.DejankUtils; import com.android.systemui.EventLogConstants; import com.android.systemui.EventLogTags; import com.android.systemui.Interpolators; import com.android.keyguard.LatencyTracker; Loading Loading @@ -1020,14 +1019,22 @@ public abstract class PanelView extends FrameLayout { @Override public void run() { notifyExpandingFinished(); mStatusBar.onHintFinished(); onUnlockHintFinished(); mHintAnimationRunning = false; } }); mStatusBar.onUnlockHintStarted(); onUnlockHintStarted(); mHintAnimationRunning = true; } protected void onUnlockHintFinished() { mStatusBar.onHintFinished(); } protected void onUnlockHintStarted() { mStatusBar.onUnlockHintStarted(); } /** * Phase 1: Move everything upwards. */ Loading