Loading packages/SystemUI/res/values/ids.xml +4 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,10 @@ <item type="id" name="top_roundess_animator_start_tag"/> <item type="id" name="top_roundess_animator_end_tag"/> <item type="id" name="keyguard_hun_animator_tag"/> <item type="id" name="keyguard_hun_animator_start_tag"/> <item type="id" name="keyguard_hun_animator_end_tag"/> <!-- Accessibility actions for the notification menu --> <item type="id" name="action_snooze_undo"/> <item type="id" name="action_snooze_shorter"/> Loading packages/SystemUI/src/com/android/systemui/statusbar/HeadsUpStatusBarView.java +4 −10 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout { private static final String HEADS_UP_STATUS_BAR_VIEW_SUPER_PARCELABLE = "heads_up_status_bar_view_super_parcelable"; private static final String FIRST_LAYOUT = "first_layout"; private static final String PUBLIC_MODE = "public_mode"; private static final String VISIBILITY = "visibility"; private static final String ALPHA = "alpha"; private int mAbsoluteStartPadding; Loading @@ -54,7 +53,6 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout { private Rect mLayoutedIconRect = new Rect(); private int[] mTmpPosition = new int[2]; private boolean mFirstLayout = true; private boolean mPublicMode; private int mMaxWidth; private View mRootView; private int mSysWinInset; Loading Loading @@ -121,7 +119,6 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout { bundle.putParcelable(HEADS_UP_STATUS_BAR_VIEW_SUPER_PARCELABLE, super.onSaveInstanceState()); bundle.putBoolean(FIRST_LAYOUT, mFirstLayout); bundle.putBoolean(PUBLIC_MODE, mPublicMode); bundle.putInt(VISIBILITY, getVisibility()); bundle.putFloat(ALPHA, getAlpha()); Loading @@ -139,7 +136,6 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout { Parcelable superState = bundle.getParcelable(HEADS_UP_STATUS_BAR_VIEW_SUPER_PARCELABLE); super.onRestoreInstanceState(superState); mFirstLayout = bundle.getBoolean(FIRST_LAYOUT, true); mPublicMode = bundle.getBoolean(PUBLIC_MODE, false); if (bundle.containsKey(VISIBILITY)) { setVisibility(bundle.getInt(VISIBILITY)); } Loading @@ -166,11 +162,13 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout { if (entry != null) { mShowingEntry = entry; CharSequence text = entry.headsUpStatusBarText; if (mPublicMode) { if (entry.isSensitive()) { text = entry.headsUpStatusBarTextPublic; } mTextView.setText(text); } else { mShowingEntry.setOnSensitiveChangedListener(() -> setEntry(entry)); } else if (mShowingEntry != null){ mShowingEntry.setOnSensitiveChangedListener(null); mShowingEntry = null; } } Loading Loading @@ -273,10 +271,6 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout { mTextView.setTextColor(DarkIconDispatcher.getTint(area, this, tint)); } public void setPublicMode(boolean publicMode) { mPublicMode = publicMode; } public void setOnDrawingRectChangedListener(Runnable onDrawingRectChangedListener) { mOnDrawingRectChangedListener = onDrawingRectChangedListener; } Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle boolean deviceSensitive = devicePublic && !mLockscreenUserManager.userAllowsPrivateNotificationsInPublic( currentUserId); ent.getRow().setSensitive(sensitive, deviceSensitive); ent.setSensitive(sensitive, deviceSensitive); ent.getRow().setNeedsRedaction(needsRedaction); if (mGroupManager.isChildInGroupWithSummary(ent.notification)) { NotificationEntry summary = mGroupManager.getGroupSummary(ent.notification); Loading packages/SystemUI/src/com/android/systemui/statusbar/PulseExpansionHandler.kt +21 −5 Original line number Diff line number Diff line Loading @@ -36,9 +36,12 @@ import com.android.systemui.plugins.FalsingManager import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow import com.android.systemui.statusbar.notification.row.ExpandableView import com.android.systemui.statusbar.notification.stack.NotificationRoundnessManager import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout import com.android.systemui.statusbar.phone.HeadsUpManagerPhone import com.android.systemui.statusbar.phone.KeyguardBypassController import com.android.systemui.statusbar.phone.ShadeController import com.android.systemui.statusbar.policy.HeadsUpManager import javax.inject.Inject import javax.inject.Singleton Loading @@ -51,7 +54,9 @@ import kotlin.math.max class PulseExpansionHandler @Inject constructor(context: Context, private val wakeUpCoordinator: NotificationWakeUpCoordinator, private val bypassController: KeyguardBypassController) : Gefingerpoken { private val bypassController: KeyguardBypassController, private val headsUpManager: HeadsUpManagerPhone, private val roundnessManager: NotificationRoundnessManager) : Gefingerpoken { companion object { private val RUBBERBAND_FACTOR_STATIC = 0.25f private val SPRING_BACK_ANIMATION_LENGTH_MS = 375 Loading @@ -67,11 +72,22 @@ constructor(context: Context, val changed = field != value field = value bypassController.isPulseExpanding = value if (changed && !value && !leavingLockscreen) { if (changed) { if (value) { val topEntry = headsUpManager.topEntry topEntry?.let { roundnessManager.setTrackingHeadsUp(it.row) } } else { roundnessManager.setTrackingHeadsUp(null) if (!leavingLockscreen) { bypassController.maybePerformPendingUnlock() pulseExpandAbortListener?.run() } } headsUpManager.unpinAll(true /* userUnPinned */) } } var leavingLockscreen: Boolean = false private set private val mTouchSlop: Float Loading Loading @@ -231,7 +247,7 @@ constructor(context: Context, } private fun captureStartingChild(x: Float, y: Float) { if (mStartingChild == null) { if (mStartingChild == null && !bypassController.bypassEnabled) { mStartingChild = findView(x, y) if (mStartingChild != null) { setUserLocked(mStartingChild!!, true) Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/PropertyAnimator.java +15 −2 Original line number Diff line number Diff line Loading @@ -115,7 +115,20 @@ public class PropertyAnimator { view.setTag(animationEndTag, newEndValue); } public static <T extends View> boolean isAnimating(T view, AnimatableProperty property) { public static <T extends View> void applyImmediately(T view, AnimatableProperty property, float newValue) { cancelAnimation(view, property); property.getProperty().set(view, newValue); } public static void cancelAnimation(View view, AnimatableProperty property) { ValueAnimator animator = (ValueAnimator) view.getTag(property.getAnimatorTag()); if (animator != null) { animator.cancel(); } } public static boolean isAnimating(View view, AnimatableProperty property) { return view.getTag(property.getAnimatorTag()) != null; } } Loading
packages/SystemUI/res/values/ids.xml +4 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,10 @@ <item type="id" name="top_roundess_animator_start_tag"/> <item type="id" name="top_roundess_animator_end_tag"/> <item type="id" name="keyguard_hun_animator_tag"/> <item type="id" name="keyguard_hun_animator_start_tag"/> <item type="id" name="keyguard_hun_animator_end_tag"/> <!-- Accessibility actions for the notification menu --> <item type="id" name="action_snooze_undo"/> <item type="id" name="action_snooze_shorter"/> Loading
packages/SystemUI/src/com/android/systemui/statusbar/HeadsUpStatusBarView.java +4 −10 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout { private static final String HEADS_UP_STATUS_BAR_VIEW_SUPER_PARCELABLE = "heads_up_status_bar_view_super_parcelable"; private static final String FIRST_LAYOUT = "first_layout"; private static final String PUBLIC_MODE = "public_mode"; private static final String VISIBILITY = "visibility"; private static final String ALPHA = "alpha"; private int mAbsoluteStartPadding; Loading @@ -54,7 +53,6 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout { private Rect mLayoutedIconRect = new Rect(); private int[] mTmpPosition = new int[2]; private boolean mFirstLayout = true; private boolean mPublicMode; private int mMaxWidth; private View mRootView; private int mSysWinInset; Loading Loading @@ -121,7 +119,6 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout { bundle.putParcelable(HEADS_UP_STATUS_BAR_VIEW_SUPER_PARCELABLE, super.onSaveInstanceState()); bundle.putBoolean(FIRST_LAYOUT, mFirstLayout); bundle.putBoolean(PUBLIC_MODE, mPublicMode); bundle.putInt(VISIBILITY, getVisibility()); bundle.putFloat(ALPHA, getAlpha()); Loading @@ -139,7 +136,6 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout { Parcelable superState = bundle.getParcelable(HEADS_UP_STATUS_BAR_VIEW_SUPER_PARCELABLE); super.onRestoreInstanceState(superState); mFirstLayout = bundle.getBoolean(FIRST_LAYOUT, true); mPublicMode = bundle.getBoolean(PUBLIC_MODE, false); if (bundle.containsKey(VISIBILITY)) { setVisibility(bundle.getInt(VISIBILITY)); } Loading @@ -166,11 +162,13 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout { if (entry != null) { mShowingEntry = entry; CharSequence text = entry.headsUpStatusBarText; if (mPublicMode) { if (entry.isSensitive()) { text = entry.headsUpStatusBarTextPublic; } mTextView.setText(text); } else { mShowingEntry.setOnSensitiveChangedListener(() -> setEntry(entry)); } else if (mShowingEntry != null){ mShowingEntry.setOnSensitiveChangedListener(null); mShowingEntry = null; } } Loading Loading @@ -273,10 +271,6 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout { mTextView.setTextColor(DarkIconDispatcher.getTint(area, this, tint)); } public void setPublicMode(boolean publicMode) { mPublicMode = publicMode; } public void setOnDrawingRectChangedListener(Runnable onDrawingRectChangedListener) { mOnDrawingRectChangedListener = onDrawingRectChangedListener; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -161,7 +161,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle boolean deviceSensitive = devicePublic && !mLockscreenUserManager.userAllowsPrivateNotificationsInPublic( currentUserId); ent.getRow().setSensitive(sensitive, deviceSensitive); ent.setSensitive(sensitive, deviceSensitive); ent.getRow().setNeedsRedaction(needsRedaction); if (mGroupManager.isChildInGroupWithSummary(ent.notification)) { NotificationEntry summary = mGroupManager.getGroupSummary(ent.notification); Loading
packages/SystemUI/src/com/android/systemui/statusbar/PulseExpansionHandler.kt +21 −5 Original line number Diff line number Diff line Loading @@ -36,9 +36,12 @@ import com.android.systemui.plugins.FalsingManager import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow import com.android.systemui.statusbar.notification.row.ExpandableView import com.android.systemui.statusbar.notification.stack.NotificationRoundnessManager import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout import com.android.systemui.statusbar.phone.HeadsUpManagerPhone import com.android.systemui.statusbar.phone.KeyguardBypassController import com.android.systemui.statusbar.phone.ShadeController import com.android.systemui.statusbar.policy.HeadsUpManager import javax.inject.Inject import javax.inject.Singleton Loading @@ -51,7 +54,9 @@ import kotlin.math.max class PulseExpansionHandler @Inject constructor(context: Context, private val wakeUpCoordinator: NotificationWakeUpCoordinator, private val bypassController: KeyguardBypassController) : Gefingerpoken { private val bypassController: KeyguardBypassController, private val headsUpManager: HeadsUpManagerPhone, private val roundnessManager: NotificationRoundnessManager) : Gefingerpoken { companion object { private val RUBBERBAND_FACTOR_STATIC = 0.25f private val SPRING_BACK_ANIMATION_LENGTH_MS = 375 Loading @@ -67,11 +72,22 @@ constructor(context: Context, val changed = field != value field = value bypassController.isPulseExpanding = value if (changed && !value && !leavingLockscreen) { if (changed) { if (value) { val topEntry = headsUpManager.topEntry topEntry?.let { roundnessManager.setTrackingHeadsUp(it.row) } } else { roundnessManager.setTrackingHeadsUp(null) if (!leavingLockscreen) { bypassController.maybePerformPendingUnlock() pulseExpandAbortListener?.run() } } headsUpManager.unpinAll(true /* userUnPinned */) } } var leavingLockscreen: Boolean = false private set private val mTouchSlop: Float Loading Loading @@ -231,7 +247,7 @@ constructor(context: Context, } private fun captureStartingChild(x: Float, y: Float) { if (mStartingChild == null) { if (mStartingChild == null && !bypassController.bypassEnabled) { mStartingChild = findView(x, y) if (mStartingChild != null) { setUserLocked(mStartingChild!!, true) Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/PropertyAnimator.java +15 −2 Original line number Diff line number Diff line Loading @@ -115,7 +115,20 @@ public class PropertyAnimator { view.setTag(animationEndTag, newEndValue); } public static <T extends View> boolean isAnimating(T view, AnimatableProperty property) { public static <T extends View> void applyImmediately(T view, AnimatableProperty property, float newValue) { cancelAnimation(view, property); property.getProperty().set(view, newValue); } public static void cancelAnimation(View view, AnimatableProperty property) { ValueAnimator animator = (ValueAnimator) view.getTag(property.getAnimatorTag()); if (animator != null) { animator.cancel(); } } public static boolean isAnimating(View view, AnimatableProperty property) { return view.getTag(property.getAnimatorTag()) != null; } }