Update user cache when coming from isAppCloneUserPair().

When we start a new user that shares media with its parent, we first ask
vold to mount the FUSE filesystem and issue bind mounts. These bind
mounts are for user 10, which causes isAppCloneUserPair(0, 10) to be
invoked. At this point, we haven't updated our user cache yet, because
StorageManagerService hasn't told us about this volume yet.

The simplest fix here is to update the user cache by default if we can't
find a user. The only place where we can't update the cache is when
we're handling a binder transaction, but that should be ok, since we
wouldn't expect any binder transactions for this volume until it is
mounted anyway.

Bug: 187904310
Bug: 192013761
Test: atest CtsAppCloningHostTest
Change-Id: I927d80b23b1568012436ab87df4460e92893e8e8
2 files changed