Update storage volumes when user unlocks
I445528b2779bb37b9f2558e67a3cfc9f60412092 uncovered a bug where
the MediaProvider does not update it's cached volumes after a user
is unlocked because the StorageManagerService only calls
onStorageStateChanged and not onVolumeStateChanged when
StorageManagerService#completeUnlockUser.
Now, we listen to onStorageStateChanged and call updateVolumes.
This is a temporary fix and b/146563027 will be the long term fix where we call
ExternalStorageService to update or attach volumes directly from
StorageManagerService. This will allow us remove StorageEventListener
and media mount broadcasts from MediaProvider.
Test: atest FuseDaemonHostTest
Change-Id: If5cfebcdfb7da4c10ccd0c583738424192f79cdb
1 file changed