magnusja / libaums

Open source library to access USB Mass Storage devices on Android without rooting your device
Apache License 2.0
1.28k stars 272 forks source link

MainActivity should use ContentResolver for browsing #287

Open ChernyshovYuriy opened 3 years ago

ChernyshovYuriy commented 3 years ago

Current implementation of adapter to the drawer conflicts with permission handling mechanism at StorageProvider. In fact, usb receiver never receives permission related event because it is handled at StorageManager. For this reason, ContentResolver should be used to get content of granted usb device. Or, to introduce less changes, to listen to root changes from content provider and get is as "device attached / detached". Otherwise, current logic doesn't work as is.