Loading packages/SystemUI/res/values/dimens.xml +6 −0 Original line number Diff line number Diff line Loading @@ -880,6 +880,12 @@ <!-- Border width for avatars in the face pile shown on one-line (children of a group) conversation notifications --> <dimen name="conversation_single_line_face_pile_protection_width">1dp</dimen> <!-- The height/thickness of progress of the progress bar in ProgressStyle Notification --> <dimen name="notification_aod_progress_style_progress_thickness">2dp</dimen> <!-- The height/thickness of ahead progress of the progress bar in ProgressStyle Notification --> <dimen name="notification_aod_progress_style_ahead_progress_thickness">1dp</dimen> <!-- The minimum amount of top overscroll to go to the quick settings. --> <dimen name="min_top_overscroll_to_qs">36dp</dimen> Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/AODPromotedNotification.kt +15 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ import com.android.internal.widget.CachingIconView import com.android.internal.widget.ImageFloatingTextView import com.android.internal.widget.NotificationExpandButton import com.android.internal.widget.NotificationProgressBar import com.android.internal.widget.NotificationProgressDrawable import com.android.internal.widget.NotificationProgressModel import com.android.systemui.FontStyles import com.android.systemui.lifecycle.rememberViewModel Loading Loading @@ -333,6 +334,15 @@ private class AODPromotedNotificationViewUpdater(root: View) { ) } private val progressStyleProgressThickness: Float = root.context.resources.getDimension( systemuiR.dimen.notification_aod_progress_style_progress_thickness ) private val progressStyleProgressAheadThickness: Float = root.context.resources.getDimension( systemuiR.dimen.notification_aod_progress_style_ahead_progress_thickness ) private data class SmallIconSavedState(val background: Drawable?, val padding: Rect) private var smallIconSavedState: SmallIconSavedState? = null Loading Loading @@ -449,6 +459,11 @@ private class AODPromotedNotificationViewUpdater(root: View) { private fun updateNewProgressBar(content: PromotedNotificationContentModel) { val newProgressBar = newProgressBar ?: return (newProgressBar.notificationProgressDrawable.mutate() as? NotificationProgressDrawable) ?.setSegmentHeight(progressStyleProgressThickness) (newProgressBar.notificationProgressDrawable.mutate() as? NotificationProgressDrawable) ?.setFadedSegmentHeight(progressStyleProgressAheadThickness) if (content.newProgress != null && !content.newProgress.isIndeterminate) { newProgressBar.setProgressModel(content.newProgress.toSkeleton().toBundle()) newProgressBar.visibility = VISIBLE Loading Loading
packages/SystemUI/res/values/dimens.xml +6 −0 Original line number Diff line number Diff line Loading @@ -880,6 +880,12 @@ <!-- Border width for avatars in the face pile shown on one-line (children of a group) conversation notifications --> <dimen name="conversation_single_line_face_pile_protection_width">1dp</dimen> <!-- The height/thickness of progress of the progress bar in ProgressStyle Notification --> <dimen name="notification_aod_progress_style_progress_thickness">2dp</dimen> <!-- The height/thickness of ahead progress of the progress bar in ProgressStyle Notification --> <dimen name="notification_aod_progress_style_ahead_progress_thickness">1dp</dimen> <!-- The minimum amount of top overscroll to go to the quick settings. --> <dimen name="min_top_overscroll_to_qs">36dp</dimen> Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/promoted/AODPromotedNotification.kt +15 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ import com.android.internal.widget.CachingIconView import com.android.internal.widget.ImageFloatingTextView import com.android.internal.widget.NotificationExpandButton import com.android.internal.widget.NotificationProgressBar import com.android.internal.widget.NotificationProgressDrawable import com.android.internal.widget.NotificationProgressModel import com.android.systemui.FontStyles import com.android.systemui.lifecycle.rememberViewModel Loading Loading @@ -333,6 +334,15 @@ private class AODPromotedNotificationViewUpdater(root: View) { ) } private val progressStyleProgressThickness: Float = root.context.resources.getDimension( systemuiR.dimen.notification_aod_progress_style_progress_thickness ) private val progressStyleProgressAheadThickness: Float = root.context.resources.getDimension( systemuiR.dimen.notification_aod_progress_style_ahead_progress_thickness ) private data class SmallIconSavedState(val background: Drawable?, val padding: Rect) private var smallIconSavedState: SmallIconSavedState? = null Loading Loading @@ -449,6 +459,11 @@ private class AODPromotedNotificationViewUpdater(root: View) { private fun updateNewProgressBar(content: PromotedNotificationContentModel) { val newProgressBar = newProgressBar ?: return (newProgressBar.notificationProgressDrawable.mutate() as? NotificationProgressDrawable) ?.setSegmentHeight(progressStyleProgressThickness) (newProgressBar.notificationProgressDrawable.mutate() as? NotificationProgressDrawable) ?.setFadedSegmentHeight(progressStyleProgressAheadThickness) if (content.newProgress != null && !content.newProgress.isIndeterminate) { newProgressBar.setProgressModel(content.newProgress.toSkeleton().toBundle()) newProgressBar.visibility = VISIBLE Loading