We've already been parsing them for many years, and they're well
defined by other public APIs, so let's reveal them in MediaStore.
Also get some storage-related documentation updated to guide
developers towards replacements in a post-scoped-storage world.
Bug: 140247264, 139185855, 141523097, 139185322
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Id39a74a9972a330b3f83913b2eef5100ec59627d
After lots of feedback from a diverse set of stakeholders, the
following goals have become clear for MediaProvider:
-- When an SD card is ejected, we shouldn't be leaving "stale"
metadata around, such as artists, albums, or genres that are no
longer relevant.
-- We need to avoid heavy full re-indexing of content when an SD card
is only temporarily ejected and reinserted within a week.
-- We need to support "merged" queries against the virtual
VOLUME_EXTERNAL view of all currently mounted volumes. For example,
developers should be able to quickly list all available artists
without needing to manually merge cursors.
With these goals in mind, we spent a lot of time pondering various
approaches, and landed upon defining "ID" columns using stable
values that enable instant merging between databases. This is
implemented by running the 64-bit version of FarmHash against the
relevant KEY values, which have already been stripped to aid
clustering of equal values. (These keys are how "The Beatles" and
"Beatles, The" and "Beatles" are already merged together today.)
The approach above now lets us define our artists, albums, and
genres in terms of the underlying audio table/view, meaning they're
always accurate.
Note that the above approach means that developers no longer have
dynamic control over genre membership, since it's now always derived
from the underlying media files. This follows the design principle
we've been using for the last year of saying the source of truth is
the underlying media files, to ensure that we can accurately
reconstruct the database after corruption or wiping. Developers
that want to edit artist, album, or genre information should edit
the metadata in the underlying file, which will trigger a rescan.
This change also deprecates the various _KEY constants, since
they're not reliable for sorting; developers should be using COLLATE
LOCALIZED or other methods. (This places us in an awkward position
where we're adding newly-deprecated GENRE_KEY columns, but they're
needed for completeness.)
Fix keyFor() generation to use a consistent Locale.ROOT.
Bug: 136964095, 141520122, 140850497, 140127429, 138130722
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Id4945a04c6996c6ea4a909dda32aa1dd02759d08
This fetches multiple flags atomically, either the entire contents of
the namespace, or just a list of flags specified by the caller. This
update also enables the local Settings class to fetch and cache the entire namespace
whenever any flags from that namespace are read so that we only incur the cost of the
IPC once.
Test: atest FrameworksCoreTests:DeviceConfigTest
atest FrameworksCoreTests:SettingsProviderTest
atest SettingsProviderTest:DeviceConfigServiceTest
Bug: 136135417
Change-Id: I0be7c4b51c37590f5001e53b074b06246851a198
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
Test: Verified that the flag could be modified with
adb shell settings put secure...
Bug: 141380252
Change-Id: Ifa24b688a487482e5b02689c1046d85423f73280
This was added during O development but never used. (It was going to
be used to store whether GPP was enabled, but the relevant settings
screen was implemented in GMS Core instead. See b/31002801, especially
comment 7 onwards.)
It now serves no purpose other than misinformation.
I also updated the test so when backup of settings is misconfigured
the error message tells you which ones.
Change-Id: Ib5e9a9ced1d1a43844889192cefddeec335f9f78
Fix: 34259924
Bug: 135751498
Test: Builds
Test: atest SettingsProviderTest
Replace all uses of DeviceConfig#NAMESPACE_STORAGE with
DeviceConfig#NAMESPACE_STORAGE_NATIVE_BOOT.
Keep DeviceConfig#NAMESPACE_STORAGE (to keep api checks happy) and mark
it as @Deprecated.
Test: build and flash - device successfully boots
Bug: 140803239
Change-Id: I9b1f0d1fd1996fe12cad67374d9a321c272e1da5
For the QPR we needed to move to global setting, to not break CTS we had
some weird code to keep both global & secure setting in sync (ag/8708041).
This is no longer needed in R/master so this CL removes those code paths
and updates the tests to rely on the global setting.
Test: atest NotificationManagerTest NotificationManagerServiceTest
Fixes: 138398470
Change-Id: Iebb6d59baf2ec3c90816c3f9ba2d1b2e1aa8675a
1. move CallerInfo from telephony.internal to andorid.telephony package
2. expose APIs inside CallerInfo which are consumed by non-telephony
code.
Bug: 140908357
Test: Build
Change-Id: Ie95897c77e97e40f5357c107aede82edfea44d5a
Remove unnecessary lock from Settings and fix very old race condition
bug with LOCATION_PROVIDERS_ALLOWED, far too late for the fix to
actually help.
Test: presubmits
Bug: 139487787
Change-Id: I50a597291e589b3cb9bdd616808409a0421a0bfb
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.
This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi
Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
To prepare for enabling MissingNullability Metalava check this CL
works on adding missing nullability issues that metalava flags if
we tell it to flag new things since API 29.
This is not a complete CL, mostly addresses public api and
toString/equals for @SystemApi
Exempt-From-Owner-Approval: Large scale nullability clean up
Bug: 124515653
Test: make -j checkapi
Merged-In: I109260842cfc25f06e40694997fcbb4afa02c867
Change-Id: I109260842cfc25f06e40694997fcbb4afa02c867
- Moved exclude filters to existing stanzas
- Removed new stanzas added w/ filters
- Removed un-needed filters because existing "include-filter"
already excludes failing tests.
Disabling in preparation for merge to aosp-master (Q release).
Disabling the following tests:
FrameworksCoreTests:android.view.textclassifier.TextClassifierTest#testSuggetsConversationActions_deduplicate
CtsAppTestCases:android.app.cts.ServiceTest#testAppZygoteServices
CtsAppTestCases:android.app.cts.SystemFeaturesTest#testLocationFeatures
CtsProviderTestCases:android.provider.cts.MediaStore_Images_ThumbnailsTest
Test: Forrest
Exempt-From-Owner-Approval: Disabling known failing TEST_MAPPING tests
for AOSP push to Q.
Change-Id: I4dc2408c5bc6d421654f871c5d63d402c1d96d91
In core/java/android/provider we want to run the tests which were being run
before they were moved into the SettingsProviderTest suite. To do this I've
followed the existing pattern of running tests marked with the @Presubmit
annotation.
In packages/SettingsProvider we want to run the whole suite on any changes,
which is why there is no filter on that change.
Bug: 139449903
Test: atest and manual verification the moved tests run
Change-Id: If7fd3978a96b979e1cf340803f5a36412de36f65