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
This commit is contained in:
Tommy Webb
2023-07-11 09:20:58 -04:00
parent 5c22f17cc5
commit 77195ba43b

View File

@@ -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")