Loading packages/SystemUI/res/values/config.xml +8 −2 Original line number Diff line number Diff line Loading @@ -366,10 +366,16 @@ <!-- Whether or not notifications that can be expanded will always be in their expanded state. This value only affects notifications that are not a group of notifications from the same applications. If this value is false, then only the first notification will be expanded; the other notifications need to be manually expanded by the user. --> applications. If this value is false, then only the first notification will be expanded when config_autoExpandFirstNotification is true; the other notifications need to be manually expanded by the user. --> <bool name="config_alwaysExpandNonGroupedNotifications">false</bool> <!-- Whether or not the first expandable notification will be expanded automatically by the system. This value only affects notifications that are not a group of notifications from the same applications and when config_alwaysExpandNonGroupedNotifications is false. --> <bool name="config_autoExpandFirstNotification">true</bool> <!-- Whether or not an expandable notification can be manually expanded or collapsed by the user. Grouped notifications are still expandable even if this value is false. --> <bool name="config_enableNonGroupedNotificationExpand">true</bool> Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/RowAppearanceCoordinator.kt +12 −2 Original line number Diff line number Diff line Loading @@ -48,6 +48,14 @@ class RowAppearanceCoordinator @Inject internal constructor( private val mAlwaysExpandNonGroupedNotification = context.resources.getBoolean(R.bool.config_alwaysExpandNonGroupedNotifications) /** * `true` if the first non-group expandable notification should be expanded automatically * when possible. If `false`, then the first non-group expandable notification should not * be expanded. */ private val mAutoExpandFirstNotification = context.resources.getBoolean(R.bool.config_autoExpandFirstNotification) override fun attach(pipeline: NotifPipeline) { pipeline.addOnBeforeRenderListListener(::onBeforeRenderList) pipeline.addOnAfterRenderEntryListener(::onAfterRenderEntry) Loading @@ -61,8 +69,10 @@ class RowAppearanceCoordinator @Inject internal constructor( private fun onAfterRenderEntry(entry: NotificationEntry, controller: NotifRowController) { // If mAlwaysExpandNonGroupedNotification is false, then only expand the // very first notification and if it's not a child of grouped notifications. controller.setSystemExpanded(mAlwaysExpandNonGroupedNotification || entry == entryToExpand) // very first notification if it's not a child of grouped notifications and when // mAutoExpandFirstNotification is true. controller.setSystemExpanded(mAlwaysExpandNonGroupedNotification || (mAutoExpandFirstNotification && entry == entryToExpand)) // Show/hide the feedback icon controller.setFeedbackIcon(mAssistantFeedbackController.getFeedbackIcon(entry)) // Show the "alerted" bell icon Loading Loading
packages/SystemUI/res/values/config.xml +8 −2 Original line number Diff line number Diff line Loading @@ -366,10 +366,16 @@ <!-- Whether or not notifications that can be expanded will always be in their expanded state. This value only affects notifications that are not a group of notifications from the same applications. If this value is false, then only the first notification will be expanded; the other notifications need to be manually expanded by the user. --> applications. If this value is false, then only the first notification will be expanded when config_autoExpandFirstNotification is true; the other notifications need to be manually expanded by the user. --> <bool name="config_alwaysExpandNonGroupedNotifications">false</bool> <!-- Whether or not the first expandable notification will be expanded automatically by the system. This value only affects notifications that are not a group of notifications from the same applications and when config_alwaysExpandNonGroupedNotifications is false. --> <bool name="config_autoExpandFirstNotification">true</bool> <!-- Whether or not an expandable notification can be manually expanded or collapsed by the user. Grouped notifications are still expandable even if this value is false. --> <bool name="config_enableNonGroupedNotificationExpand">true</bool> Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/RowAppearanceCoordinator.kt +12 −2 Original line number Diff line number Diff line Loading @@ -48,6 +48,14 @@ class RowAppearanceCoordinator @Inject internal constructor( private val mAlwaysExpandNonGroupedNotification = context.resources.getBoolean(R.bool.config_alwaysExpandNonGroupedNotifications) /** * `true` if the first non-group expandable notification should be expanded automatically * when possible. If `false`, then the first non-group expandable notification should not * be expanded. */ private val mAutoExpandFirstNotification = context.resources.getBoolean(R.bool.config_autoExpandFirstNotification) override fun attach(pipeline: NotifPipeline) { pipeline.addOnBeforeRenderListListener(::onBeforeRenderList) pipeline.addOnAfterRenderEntryListener(::onAfterRenderEntry) Loading @@ -61,8 +69,10 @@ class RowAppearanceCoordinator @Inject internal constructor( private fun onAfterRenderEntry(entry: NotificationEntry, controller: NotifRowController) { // If mAlwaysExpandNonGroupedNotification is false, then only expand the // very first notification and if it's not a child of grouped notifications. controller.setSystemExpanded(mAlwaysExpandNonGroupedNotification || entry == entryToExpand) // very first notification if it's not a child of grouped notifications and when // mAutoExpandFirstNotification is true. controller.setSystemExpanded(mAlwaysExpandNonGroupedNotification || (mAutoExpandFirstNotification && entry == entryToExpand)) // Show/hide the feedback icon controller.setFeedbackIcon(mAssistantFeedbackController.getFeedbackIcon(entry)) // Show the "alerted" bell icon Loading