Skip to content
Commit 42f1e9f7 authored by Zim's avatar Zim
Browse files

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
parent cd2dbe7d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment