Conditionally skip volume validation when attaching volume
We only need to validate a volume is valid when handling binder
requests. In other cases, when we generated the volume internally in
the MediaProvider, we can skip the validation step.
With some races at boot, trying to validate a mounted volume may throw
an exception even though the volume is truly mounted.
Additionally, bring back listening for StorageVolumeCallback events
which can be sent for volumes after user unlocks. This allows us
refresh our cache in case we missed anything at
notifyVolumeStateChanged
Bug: 158059178
Test: Manual
Change-Id: I0f3fcdee93a5b7c10bb289a1fc9bba4a4db67fea
3 files changed