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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user