Fix only add unlocked users in UserCache
Change update() method in UserCache to only add unlocked users.
The previous fix(ag/16622274) fails for devices running SDK version
below T. This is due to UserManager#isUserUnlocked() not being
UserHandleAware in earlier versions.
Bug: 214187744
Test: Tested manually on Pixel 4A. Create a CLONE usertype(Do not start
it) and take few pictures through camera. Without the fix, Camera insert
record to database fails with an exception.
Change-Id: Ic893b315d45991b57735a2f98333bc5a78c51020
1 file changed