From 77195ba43ba7d74f4496a96b22494e7f334b1f09 Mon Sep 17 00:00:00 2001 From: Tommy Webb Date: Tue, 11 Jul 2023 09:20:58 -0400 Subject: Fix multi-user silent notifications on lockscreen Read the current user's setting for showing silent notifications on the lockscreen whenever user switching occurs. Otherwise, when switching to another user, the former user's setting will be in effect for the new user, which may cause silent notifications to be unexpectedly hidden or visible on the lockscreen. Change-Id: I65b10f82307cf8eecaafcd1a76ddb5f98bd7c326 --- .../notification/interruption/KeyguardNotificationVisibilityProvider.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/KeyguardNotificationVisibilityProvider.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/KeyguardNotificationVisibilityProvider.kt index 7513aa7fa2a2..7b654545183a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/KeyguardNotificationVisibilityProvider.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/KeyguardNotificationVisibilityProvider.kt @@ -87,6 +87,7 @@ private class KeyguardNotificationVisibilityProviderImpl @Inject constructor( private val userTrackerCallback = object : UserTracker.Callback { override fun onUserChanged(newUser: Int, userContext: Context) { + readShowSilentNotificationSetting() if (isLockedOrLocking) { // maybe public mode changed notifyStateChanged("onUserSwitched") -- cgit v1.2.3-59-g8ed1b