Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9696b832 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

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
parent f9f6454c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment