Loading core/java/android/provider/Settings.java +8 −0 Original line number Diff line number Diff line Loading @@ -13018,6 +13018,14 @@ public final class Settings { public static final String ACCESSIBILITY_MAGNIFICATION_TWO_FINGER_TRIPLE_TAP_ENABLED = "accessibility_magnification_two_finger_triple_tap_enabled"; /** * Whether to always expand notification bundles in the notification shade. * 1 = expand, 0 = collapse. * @hide */ public static final String NOTIFICATION_BUNDLES_ALWAYS_EXPAND = "notification_bundles_always_expand"; /** * Whether the magnify navigation bar and keyboard feature is enabled. * Loading packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -324,5 +324,6 @@ public class SecureSettings { Settings.Secure.IDENTITY_CHECK_ENABLED_V1, Settings.Secure.IDENTITY_CHECK_PROMO_CARD_SHOWN, Settings.Secure.IDENTITY_CHECK_NOTIFICATION_VIEW_DETAILS_CLICKED, Settings.Secure.NOTIFICATION_BUNDLES_ALWAYS_EXPAND, }; } packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +1 −0 Original line number Diff line number Diff line Loading @@ -279,6 +279,7 @@ public class SecureSettingsValidators { VALIDATORS.put(Secure.LOCK_SCREEN_NOTIFICATION_MINIMALISM, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.SHOW_NOTIFICATION_SNOOZE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.NOTIFICATION_HISTORY_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.NOTIFICATION_BUNDLES_ALWAYS_EXPAND, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ZEN_DURATION, ANY_INTEGER_VALIDATOR); VALIDATORS.put(Secure.CHARGING_SOUNDS_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.CHARGING_VIBRATION_ENABLED, BOOLEAN_VALIDATOR); Loading packages/SystemUI/customization/src/com/android/systemui/shared/notifications/data/repository/NotificationSettingsRepository.kt +13 −8 Original line number Diff line number Diff line Loading @@ -44,12 +44,21 @@ class NotificationSettingsRepository( .map { it == 1 } .distinctUntilChanged() val shouldExpandBundles: StateFlow<Boolean> = secureSettingsRepository .intSetting(name = Settings.Secure.NOTIFICATION_BUNDLES_ALWAYS_EXPAND) .map { it == 1 } .flowOn(backgroundDispatcher) .stateIn( scope = backgroundScope, started = SharingStarted.Eagerly, initialValue = false, ) /** The current state of the notification setting. */ suspend fun isShowNotificationsOnLockScreenEnabled(): StateFlow<Boolean> = secureSettingsRepository .intSetting( name = Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, ) .intSetting(name = Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS) .map { it == 1 } .flowOn(backgroundDispatcher) .stateIn(scope = backgroundScope) Loading @@ -68,11 +77,7 @@ class NotificationSettingsRepository( .intSetting(name = Settings.System.NOTIFICATION_COOLDOWN_ENABLED) .map { it == 1 } .flowOn(backgroundDispatcher) .stateIn( scope = backgroundScope, started = SharingStarted.Eagerly, initialValue = true, ) .stateIn(scope = backgroundScope, started = SharingStarted.Eagerly, initialValue = true) /** The default duration for DND mode when enabled. See [Settings.Secure.ZEN_DURATION]. */ val zenDuration: StateFlow<Int> = Loading packages/SystemUI/customization/src/com/android/systemui/shared/notifications/domain/interactor/NotificationSettingsInteractor.kt +5 −4 Original line number Diff line number Diff line Loading @@ -20,9 +20,7 @@ import com.android.systemui.shared.notifications.data.repository.NotificationSet import kotlinx.coroutines.flow.StateFlow /** Encapsulates business logic for interacting with notification settings. */ class NotificationSettingsInteractor( private val repository: NotificationSettingsRepository, ) { class NotificationSettingsInteractor(private val repository: NotificationSettingsRepository) { val isNotificationHistoryEnabled = repository.isNotificationHistoryEnabled /** Should notifications be visible on the lockscreen? */ Loading @@ -39,4 +37,7 @@ class NotificationSettingsInteractor( repository.setShowNotificationsOnLockscreenEnabled(!current) } val isCooldownEnabled = repository.isCooldownEnabled} val isCooldownEnabled = repository.isCooldownEnabled val shouldExpandBundles = repository.shouldExpandBundles } Loading
core/java/android/provider/Settings.java +8 −0 Original line number Diff line number Diff line Loading @@ -13018,6 +13018,14 @@ public final class Settings { public static final String ACCESSIBILITY_MAGNIFICATION_TWO_FINGER_TRIPLE_TAP_ENABLED = "accessibility_magnification_two_finger_triple_tap_enabled"; /** * Whether to always expand notification bundles in the notification shade. * 1 = expand, 0 = collapse. * @hide */ public static final String NOTIFICATION_BUNDLES_ALWAYS_EXPAND = "notification_bundles_always_expand"; /** * Whether the magnify navigation bar and keyboard feature is enabled. * Loading
packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java +1 −0 Original line number Diff line number Diff line Loading @@ -324,5 +324,6 @@ public class SecureSettings { Settings.Secure.IDENTITY_CHECK_ENABLED_V1, Settings.Secure.IDENTITY_CHECK_PROMO_CARD_SHOWN, Settings.Secure.IDENTITY_CHECK_NOTIFICATION_VIEW_DETAILS_CLICKED, Settings.Secure.NOTIFICATION_BUNDLES_ALWAYS_EXPAND, }; }
packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +1 −0 Original line number Diff line number Diff line Loading @@ -279,6 +279,7 @@ public class SecureSettingsValidators { VALIDATORS.put(Secure.LOCK_SCREEN_NOTIFICATION_MINIMALISM, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.SHOW_NOTIFICATION_SNOOZE, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.NOTIFICATION_HISTORY_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.NOTIFICATION_BUNDLES_ALWAYS_EXPAND, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.ZEN_DURATION, ANY_INTEGER_VALIDATOR); VALIDATORS.put(Secure.CHARGING_SOUNDS_ENABLED, BOOLEAN_VALIDATOR); VALIDATORS.put(Secure.CHARGING_VIBRATION_ENABLED, BOOLEAN_VALIDATOR); Loading
packages/SystemUI/customization/src/com/android/systemui/shared/notifications/data/repository/NotificationSettingsRepository.kt +13 −8 Original line number Diff line number Diff line Loading @@ -44,12 +44,21 @@ class NotificationSettingsRepository( .map { it == 1 } .distinctUntilChanged() val shouldExpandBundles: StateFlow<Boolean> = secureSettingsRepository .intSetting(name = Settings.Secure.NOTIFICATION_BUNDLES_ALWAYS_EXPAND) .map { it == 1 } .flowOn(backgroundDispatcher) .stateIn( scope = backgroundScope, started = SharingStarted.Eagerly, initialValue = false, ) /** The current state of the notification setting. */ suspend fun isShowNotificationsOnLockScreenEnabled(): StateFlow<Boolean> = secureSettingsRepository .intSetting( name = Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, ) .intSetting(name = Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS) .map { it == 1 } .flowOn(backgroundDispatcher) .stateIn(scope = backgroundScope) Loading @@ -68,11 +77,7 @@ class NotificationSettingsRepository( .intSetting(name = Settings.System.NOTIFICATION_COOLDOWN_ENABLED) .map { it == 1 } .flowOn(backgroundDispatcher) .stateIn( scope = backgroundScope, started = SharingStarted.Eagerly, initialValue = true, ) .stateIn(scope = backgroundScope, started = SharingStarted.Eagerly, initialValue = true) /** The default duration for DND mode when enabled. See [Settings.Secure.ZEN_DURATION]. */ val zenDuration: StateFlow<Int> = Loading
packages/SystemUI/customization/src/com/android/systemui/shared/notifications/domain/interactor/NotificationSettingsInteractor.kt +5 −4 Original line number Diff line number Diff line Loading @@ -20,9 +20,7 @@ import com.android.systemui.shared.notifications.data.repository.NotificationSet import kotlinx.coroutines.flow.StateFlow /** Encapsulates business logic for interacting with notification settings. */ class NotificationSettingsInteractor( private val repository: NotificationSettingsRepository, ) { class NotificationSettingsInteractor(private val repository: NotificationSettingsRepository) { val isNotificationHistoryEnabled = repository.isNotificationHistoryEnabled /** Should notifications be visible on the lockscreen? */ Loading @@ -39,4 +37,7 @@ class NotificationSettingsInteractor( repository.setShowNotificationsOnLockscreenEnabled(!current) } val isCooldownEnabled = repository.isCooldownEnabled} val isCooldownEnabled = repository.isCooldownEnabled val shouldExpandBundles = repository.shouldExpandBundles }