Commit Graph

5415 Commits

Author SHA1 Message Date
Jeff Sharkey
93c7e3553b Merge "Progress towards per-volume database separation." 2019-10-14 15:24:59 +00:00
Ivan Chiang
176b8d09e1 Merge "Allow providers block folders in ACTION_OPEN_DOCUMENT_TREE" 2019-10-14 13:15:30 +00:00
Jeff Sharkey
588c15e56e Reveal color standard, transfer, and range.
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
2019-10-10 17:44:57 -06:00
Jeff Sharkey
ff6423b27c Progress towards per-volume database separation.
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
2019-10-08 16:14:06 -06:00
Matt Pape
793b15c142 Adds DeviceConfig.getProperties method for atomic reading.
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
2019-10-07 13:17:20 -07:00
Mady Mellor
1cc77c6ebe Merge "Stop tracking the secure setting because we're in master" 2019-10-04 23:32:51 +00:00
Ivan Chiang
730b3a3a45 Allow providers block folders in ACTION_OPEN_DOCUMENT_TREE
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
2019-10-02 06:01:36 +00:00
Shafik Nassar
f40ae93714 Merge "Make DeviceConfig's storage nam space _native_boot" 2019-09-30 11:13:14 +00:00
Kevin Chyn
de57cea3c3 resolve merge conflicts of 2c712acefa to master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ie50a4cf9233732646ef340dbce54f5f51bda64cd
2019-09-26 21:09:25 -07:00
joshmccloskey
2c712acefa Added secure setting for face re enrollment.
am: cfc621518c

Change-Id: If3ed42ee2cebd112a5d243eab516f25dc3946e92
2019-09-26 20:06:54 -07:00
joshmccloskey
cfc621518c Added secure setting for face re enrollment.
Test: Verified that the flag could be modified with
adb shell settings put secure...
Bug: 141380252

Change-Id: Ifa24b688a487482e5b02689c1046d85423f73280
2019-09-26 15:54:45 -07:00
Alan Stokes
4e1a74241b Remove unused package_verifier_state setting.
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
2019-09-24 15:56:08 +01:00
shafik
91b34610ff Make DeviceConfig's storage nam space _native_boot
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
2019-09-23 16:09:46 +01:00
Stanley Wang
a6d940fc23 Update search indexable interface for dynamic indexing.
Test: manual
Fixes: 140912225
Change-Id: I1290e6569a4712169cabd3d19dffaf200cd93f4b
2019-09-23 11:27:38 +08:00
Mady Mellor
fa9556a3f4 Stop tracking the secure setting because we're in master
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
2019-09-19 11:32:14 -07:00
TreeHugger Robot
32fee770ff Merge "LOCATION_PROVIDERS_ALLOWED fixes" 2019-09-17 18:47:53 +00:00
Amit Mahajan
d0b019bf49 Merge "Fix descriptions for default SIM in global preferences" am: eeeb74a093 am: f87866ba9f am: fd8765b95e
am: 0c8c4978ab

Change-Id: I8f82a752c12dc91e8126d2ee923a560d6de2dd8a
2019-09-17 10:55:02 -07:00
Amit Mahajan
0c8c4978ab Merge "Fix descriptions for default SIM in global preferences" am: eeeb74a093 am: f87866ba9f
am: fd8765b95e

Change-Id: I1ce7fc6f311f9462f1f505ef5387b2416728c794
2019-09-17 10:49:05 -07:00
Amit Mahajan
fd8765b95e Merge "Fix descriptions for default SIM in global preferences" am: eeeb74a093
am: f87866ba9f

Change-Id: I93c5b77138ce7b23e27371a7be15f00e25b987e1
2019-09-17 10:43:02 -07:00
Amit Mahajan
f87866ba9f Merge "Fix descriptions for default SIM in global preferences"
am: eeeb74a093

Change-Id: Ie4e492062c0c1a91b36abce43fde3506ae2cbc60
2019-09-17 10:31:23 -07:00
Taesu Lee
0399854df0 Fix descriptions for default SIM in global preferences
Test: Not required.

Change-Id: I7f32eb495b53d13aba50b07d86e63f0549e9e6bb
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
2019-09-17 13:45:54 +09:00
Mady Mellor
fd48588768 Merge "qt-r1-bubbles-dev @ build 5835883" into qt-qpr1-dev 2019-09-16 21:55:51 +00:00
Soonil Nagarkar
4052fc6795 Merge "Remove all code dealing with obsolete location status" 2019-09-16 18:38:57 +00:00
Soonil Nagarkar
fc9c7f8532 Remove all code dealing with obsolete location status
Test: manual
Change-Id: I0fde3dd9bdd418ab63c61c5afc093d8eef72e600
2019-09-13 13:03:14 -07:00
Chen Xu
b9a1eefec6 make CallerInfo as SystemAPI
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
2019-09-12 23:21:06 -07:00
Mady Mellor
a5813e0e3d qt-r1-bubbles-dev @ build 5835883
Test: presubmit setup on source branch

Bug: 126945401
Bug: 128932906
Bug: 129158983
Bug: 130237686
Bug: 130250809
Bug: 130442248
Bug: 131267438
Bug: 131609280
Bug: 131692350
Bug: 131849856
Bug: 133444037
Bug: 134064116
Bug: 134064858
Bug: 134070807
Bug: 134077101
Bug: 134090085
Bug: 134155107
Bug: 134423445
Bug: 134512898
Bug: 134514210
Bug: 134514227
Bug: 134734945
Bug: 134960381
Bug: 134989736
Bug: 135214687
Bug: 135280077
Bug: 135472021
Bug: 135475155
Bug: 135487618
Bug: 135488406
Bug: 135518045
Bug: 135633218
Bug: 136034310
Bug: 136150954
Bug: 136199542
Bug: 136538998
Bug: 137201711
Bug: 137213469
Bug: 137214359
Bug: 137214536
Bug: 137233453
Bug: 137876221
Bug: 138301618
Bug: 138445026
Bug: 138659213
Bug: 138749133
Bug: 138799651
Bug: 138801505
Bug: 138941969
Bug: 139002444
Bug: 139025304
Bug: 139816141
Change-Id: Ia7364529ea58070c8d45ecd726ab6ac7d34f2abe
Merged-In: Ic271a6a0f0803941dd5a84124dabf4d8c5fcc755
Merged-In: Ic3a4ba793db7f1361678ef51c411d9eab85d9b85
2019-09-11 22:42:54 +00:00
Mady Mellor
3e3e48e981 Merge "qt-r1-bubbles-dev @ build 5835883" into qt-qpr1-dev-plus-aosp 2019-09-11 22:40:21 +00:00
Soonil Nagarkar
10b1960160 LOCATION_PROVIDERS_ALLOWED fixes
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
2019-09-10 15:48:01 -07:00
Xin Li
d57e959e71 Merge qt-r1-dev-plus-aosp-without-vendor (5817612) into stage-aosp-master
Bug: 135460123
Change-Id: I65906d82b14125c0893d5cde0cfebb73bf9e38ab
Merged-In: I1f2564837c33cd4c6c3db6aac3cbaf8c09707da9
2019-09-10 11:16:29 -07:00
Mady Mellor
8e10394ccc qt-r1-bubbles-dev @ build 5835883
Test: presubmit setup on source branch

Bug: 126945401
Bug: 128932906
Bug: 129158983
Bug: 130237686
Bug: 130250809
Bug: 130442248
Bug: 131267438
Bug: 131609280
Bug: 131692350
Bug: 131849856
Bug: 133444037
Bug: 134064116
Bug: 134064858
Bug: 134070807
Bug: 134077101
Bug: 134090085
Bug: 134155107
Bug: 134423445
Bug: 134512898
Bug: 134514210
Bug: 134514227
Bug: 134734945
Bug: 134960381
Bug: 134989736
Bug: 135214687
Bug: 135280077
Bug: 135472021
Bug: 135475155
Bug: 135487618
Bug: 135488406
Bug: 135518045
Bug: 135633218
Bug: 136034310
Bug: 136150954
Bug: 136199542
Bug: 136538998
Bug: 137201711
Bug: 137213469
Bug: 137214359
Bug: 137214536
Bug: 137233453
Bug: 137876221
Bug: 138301618
Bug: 138445026
Bug: 138659213
Bug: 138749133
Bug: 138799651
Bug: 138801505
Bug: 138941969
Bug: 139002444
Bug: 139025304
Bug: 139816141
Change-Id: Ic3a4ba793db7f1361678ef51c411d9eab85d9b85
Merged-In: Ic271a6a0f0803941dd5a84124dabf4d8c5fcc755
2019-09-09 21:48:30 +00:00
Jonathan Scott
7f08445f65 Merge "Add MANAGED_PROVISIONING_DPC_DOWNLOADED." into qt-dev am: b01fe73ed3
am: 719cd95a84

Change-Id: I27898e265c24dbb7c4668cb47dbcb23ebdbf2b95
2019-09-06 04:57:04 -07:00
Jonathan Scott
719cd95a84 Merge "Add MANAGED_PROVISIONING_DPC_DOWNLOADED." into qt-dev
am: b01fe73ed3

Change-Id: I800c640883b1ef9eff5fff0200a0785ccd2d18ae
2019-09-06 04:44:09 -07:00
Jonathan Scott
68f73efcb9 Merge "Add MANAGED_PROVISIONING_DPC_DOWNLOADED." into qt-dev
am: b01fe73ed3

Change-Id: Idd7424cf00a3c5d8d41e3e051d78d0ac4d6c4a19
2019-09-06 04:44:06 -07:00
Jonathan Scott
a5e4422d14 Add MANAGED_PROVISIONING_DPC_DOWNLOADED.
Test: Just adding a constant
Bug: 132261064
Change-Id: I2bce277ff8f2de4614e19d5385fe6712b076f9c9
Merged-In: I2bce277ff8f2de4614e19d5385fe6712b076f9c9
2019-09-05 17:31:12 +01:00
Long Ling
1961cf1cdc Move device config key high_refresh_rate_blacklist to display_manager
high_refresh_rate_blacklist belongs to smooth display feature. Move the
key from namespace window_manager to display_manager.

Bug: 139138964
Test: atest WmTests:HighRefreshRateBlacklistTest
Test: Manual adb shell device_config/dumpsys window
Change-Id: I3ae8ecce80ef97c4683a1c18ad81dc78456e9d57
2019-09-03 17:02:11 -07:00
Jeff Sharkey
80cdd27194 Merge "Ignore broken tests, fix flaky tests." 2019-08-30 18:53:09 +00:00
Mady Mellor
8c209679f5 Merge "qt-r1-bubbles-dev @ build 5835883" 2019-08-30 18:11:37 +00:00
Aurimas Liutikas
488d37b2d0 Merge "Add missing nullability annotations." into stage-aosp-master am: 85c0a5a2be am: ed5beec21b
am: de0ebb082e

Change-Id: I60c55b6706e8d43121e8b2c7a35efff38668f66b
2019-08-30 08:54:38 -07:00
Aurimas Liutikas
de0ebb082e Merge "Add missing nullability annotations." into stage-aosp-master am: 85c0a5a2be
am: ed5beec21b

Change-Id: I202951d51820be47b9195734601830553215bdd7
2019-08-30 08:43:01 -07:00
Aurimas Liutikas
ed5beec21b Merge "Add missing nullability annotations." into stage-aosp-master
am: 85c0a5a2be

Change-Id: Ic9ea2b9840fbb678bbb6ab77038415581feba918
2019-08-30 08:35:52 -07:00
Mady Mellor
06b770cf14 qt-r1-bubbles-dev @ build 5835883
Test: presubmit setup on source branch

Bug: 126945401
Bug: 128932906
Bug: 129158983
Bug: 130237686
Bug: 130250809
Bug: 130442248
Bug: 131267438
Bug: 131609280
Bug: 131692350
Bug: 131849856
Bug: 133444037
Bug: 134064116
Bug: 134064858
Bug: 134070807
Bug: 134077101
Bug: 134090085
Bug: 134155107
Bug: 134423445
Bug: 134512898
Bug: 134514210
Bug: 134514227
Bug: 134734945
Bug: 134960381
Bug: 134989736
Bug: 135214687
Bug: 135280077
Bug: 135472021
Bug: 135475155
Bug: 135487618
Bug: 135488406
Bug: 135518045
Bug: 135633218
Bug: 136034310
Bug: 136150954
Bug: 136199542
Bug: 136538998
Bug: 137201711
Bug: 137213469
Bug: 137214359
Bug: 137214536
Bug: 137233453
Bug: 137876221
Bug: 138301618
Bug: 138445026
Bug: 138659213
Bug: 138749133
Bug: 138799651
Bug: 138801505
Bug: 138941969
Bug: 139002444
Bug: 139025304
Bug: 139816141
Change-Id: Ic271a6a0f0803941dd5a84124dabf4d8c5fcc755
2019-08-29 20:24:52 -07:00
Aurimas Liutikas
4d1699da48 Add missing nullability annotations.
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
2019-08-29 17:15:44 -07:00
Aurimas Liutikas
00be951a08 Add missing nullability annotations.
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
2019-08-30 00:14:44 +00:00
Jeff Sharkey
9857135126 Ignore broken tests, fix flaky tests.
Bug: 112545973
Test: atest --test-mapping frameworks/base/core/java/android/provider/
Change-Id: I0d7635b165826fda9e590b24d17f9bcffaab1cc8
2019-08-29 14:13:09 -06:00
Dave Mankoff
10b34a5a9c Merge "Use a testable version of DeviceConfig in the FalsingManager." 2019-08-29 19:58:37 +00:00
Ian Kasprzak
1a5bb83588 [DO NOT MERGE] Cleanup TEST_MAPPING disables from ag/9285495
- 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
2019-08-29 10:38:56 -07:00
Al Sutton
d4299771ec Add test mappings to ensure settings backup tests run on appropriate changes.
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
2019-08-29 07:13:57 +01:00
Raman Tenneti
f997c75d69 [DO NOT MERGE] Disabled the following tests in TEST_MAPPING:
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

Disabling in preparation for merge to aosp-master (Q release).

Test: Forrest (atest)
L55600000358896983, L81400000359164936
BUG: 139704630
BUG: 139535570
BUG: 139536812
BUG: 139535125
BUG: 139305203
Change-Id: I9be2efd464fe031a0269fa5a3913ddb4959ba05d
Exempt-From-Owner-Approval: Disabling known failing TEST_MAPPING tests for AOSP push to Q.
2019-08-28 23:48:13 +00:00
Dave Mankoff
186bd74665 Use a testable version of DeviceConfig in the FalsingManager.
Clean up the listeners in the test (and elswhere).

Bug: 139051615
Test: atest SystemUITests
Change-Id: I35fa49f9aeeac98da9e4dafa7ae50d67262b2a0b
2019-08-28 12:34:42 -04:00
Al Sutton
0833b2e6f8 Move the list of settings to backup out of the Settings class
Bug: 139449903
Test: atest SettingsProviderTest
Change-Id: Ia1636732e4b6458fd874a6748dddfcaf7d967545
2019-08-28 14:51:20 +01:00