Add StorageSessionController
The StorageSessionController has a StorageUserConnection to represent the binding between the StoragemanagerService and the ExternalStorageService for a user. A StorageUserConnection can have multiple Sessions each representing a mount for the user. The StorageUserConnection has an ActiveConnection representing the active binding to the ExternalStorageService. If the ExternalStorageService goes down, the ActiveConnection becomes 'inactive' but the StorageManagerService will be notified to reset the mount state of the device with the help of vold which will 're-activate' the ActiveConnection. This reset will among other things, kill any apps holding an open fd on the FUSE mount and remount the FUSE mount, getting a new FUSE fd as a result. The StorageSessionController will once again be notified of new volume mounts and start sessions for them Bug: 135341433 Test: adb shell setprop persist.sys.fuse && adb reboot && adb shell ls /sdcard Test: adb shell am crash com.android.providers.media && adb shell ls /sdcard Change-Id: I72841a1d8012b1ca1cc88f29cb75127ea627c093
Loading
Please register or sign in to comment