Up until now, the FUSE mount logic has made two assumptions:
1. The primary external volume is an emulated volume on /data/media
2. Only the primary user is running, as user zero
With this change, we are able to handle the following cases:
1. Mount new external storage volumes as as portable storage
(PublicVolume) managed by FUSE. The PublicVolume originally mounted on
/mnt/media_rw/<uuid> is availabe on /storage/<uuid> as a FUSE mount
2. Mount new external storage volumes as adoptable storage
(PrivateVolume) with a stacked EmulatedVolume managed by FUSE. The
EmulatedVolume orignally mounted on /mnt/expand/<uuid>/media will be
available on /storage/emulated if set as the primary storage
3. Run the MediaProvider as a secondary user handling requests on
/mnt/user/<userid>/<volid>
Test: atest AdoptableHostTest
Bug: 135341433
Bug: 140120303
Change-Id: I5fb48616b4143277ea14c6846037e2fd176e16db
This takes the Context#getFeatureId from the calling context and pipes
it all way through to the noteOp calls done by the content provider.
Bug: 136595429
Test: atest CtsAppOpsTestCases (new test added to capture this case)
TelecomUnitTests:CallLogManagerTest
ContentProviderClientTest
TelecomUnitTests:MissedCallNotifierImplTest
TelecomUnitTests:BasicCallTests
MediaInserterTest
PreferencesHelperTest
RankingHelperTest
PinnedSliceStateTest
FrameworksCoreTests:ContentResolverTest
Change-Id: I53b1035626229c920b353509a5bece157b52fb51
DocumentsContract
- Add new flag FLAG_DIR_BLOCKS_TREE in Document
ExternalStorageProvider
- Add flag into DocumentInfo for blocking folder
Change-Id: Ib557fe99d330788a3bd968bffd43b6658761514f
Bug: 32370759
Test: atest DocumentsTest
We need to return visible paths for MediaProvider to work with,
instead of internal paths.
Bug: 133730441
Test: atest android.providerui.cts.MediaStoreUiTest
Change-Id: If06dc635b22032761626cf54b37b7bc15ace7b2e
Hide eject icon of removable media on the root list of Files app when
primary shared storage is in adopted media due to the following reasons.
- Primary shared storage should not be easily ejected because that
causes the situation that there's no primary shared storage
- To align with the Storage settings (Settings > Storage), eject icon
is disabled in this menu when the removable media is adopted
- Eject action from Files app can only unmount primary shared storage
Bug: 117252468
Test: manual
Change-Id: Idd76229fb10db621a817afd60295787c761345b1
1. Add the key of query arguments and match method
in DocumentsContract.
2. Implement new querySearchDocuments method in
DocumentsProvider, ExternalStoragProvider and
FileSystemProvider.
Bug: 111786939
Test: Manual Test
Change-Id: I04e9f2be971f10ac1e9584a3486c948aaddea0a4
Bug: 110380403
Test: Tested in ARC++ (with Settings and vold changes in separate CLS)
- able to see the external storage under StorageSettings. Also tested
the sm command to print stubvolumes.
Change-Id: I7517260a40399bd9800424bb394512601f6af617
Upcoming changes will prevent apps from reading "_data" columns
directly, which is required to convert between DocumentsProvider and
MediaProvider Uris. To solve this, delegate the call() through
MediaProvider, where it can perform the "_data" lookup on behalf
of the caller.
Also add new getMediaUri() call to offer symmetry.
Bug: 111960973, 117627072, 110961701
Test: atest android.provider.cts.MediaStoreUiTest
Change-Id: I53c640704d86047d7a4bf1702aca027873395abf
Add @GuardedBy for simple functions that require locks and have a name in
one of the frameworks naming styles for locks ("^.*(Locked|LPw|LPr|L[a-zA-Z]|UL|AL|NL)$").
Derived by errorprone.
Bug: 73000847
Test: m
Change-Id: Id14322b0a6206152cd2933c968e0a6f470fcee09
We thought we could push everyone through sdcardfs, but secondary
devices mounted in a stable location don't give full write access to
apps holding WRITE_EXTERNAL_STORAGE, so system internals still need
to reach behind sdcardfs.
To keep sdcardfs in the loop about changes that we make behind its
back, we issue access(2) calls which should be enough for it to
invalidate any cached details.
Bug: 74132243
Test: manual
Change-Id: I727cd179a5a825b16ec4df6e2f41a079758d41c5
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.
Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.
Test: make relevant packages
Bug: 73535841
Change-Id: I4233b9091d9066c4fa69f3d24aaf367ea500f760
If we have a policy that says DISALLOW_USB_FILE_TRANSFER, then block
file transfers for that user through common ContentProviders.
Test: builds, boots
Bug: 64672411
Change-Id: I502b10c2c229727bc6b421f9db6d2d9e2e03845c
For volumes where the OS manages cached data, use the "free space" as
reported by StorageStatsManager, which is the same value shown in
the Settings app and other UI elements.
Also, when the storage space changes significantly, invalidate anyone
who was holding a cached "free space" value.
Test: builds, boots
Bug: 38146029
Change-Id: I4b3a484a8bf32cd137a83f1ea441beca6dc6719a
It's confusing, but f_bsize is not the value you're looking for; the
real block size is f_frsize. Fix all those bugs.
Also, the vast majority of clients are interested in the usable
disk space, not including reserved space.
Test: builds, boots
Bug: 36840579
Change-Id: Ib1470389afd49c14cab62282ec1e978ebb2c4791