Refactor NotificationLockscreenUserManagerImpl
The major change here is moving as many binder calls as possible to a background thread, because sometimes they are slow, and this class is accessed from CUJs that happen frequently. Also, now we can know if a DPC policy change is changing a field we care about, or if a setting we cared about actually changed, and kick off a pipeline run if so. Also, we were previously listening to DEVICE_PROVISIONED, but I don't think there is any reason we need to; we should just listen directly to the settings that can change the lockscreen state. Lastly, there are a few behavioral changes in this change, where some of the public methods were returning incorrect results (that were mostly but not always being worked around in the caller). Specifically, shouldShowLockscreenNotifications was not including KeyguardManager.getPrivateNotificationsAllowed(). userAllowsPrivateNotificationsInPublic() was handing USER_ALL incorrectly. userAllowsNotificationsInPublic() was handling USER_ALL and work profiles incorrectly. Test: NotificationLockscreenUserManagerTest Test: see doc linked on bug for manual tests Bug: 286230167 Bug: 231976036 Change-Id: I2974876037500cb9c054626690f9d019f5245672
Loading
Please register or sign in to comment