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
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
Currently the validators static initialiser gets triggered when the
relevant settings class is accessed. Moving them out to the
SettingsBackupAgent (which is the only place they're used) has two
main advantages;
1) All apps accessing the Settings classes no longer trigger the
static initialisers and so are faster.
2) Putting them in SettingsBackupAgent gets them off the
bootclasspath of all apps and makes the framework jars smaller.
Bug: 139449903
Test: atest SettingsProviderTest RunBackupFrameworksServicesRoboTests CtsBackupTestCases CtsBackupHostTestCases GtsBackupTestCases GtsBackupHostTestCases
Change-Id: Ie740c1ea25a01c715964175094677af2e3328732
We have getContentUri() for entire collections of items, but we
only have ID-specific overloads for some of the MediaStore classes;
let's get them all added for consistency.
Remove primary/secondary directory logic, which was replaced by
new RELATIVE_PATH column before Q launched.
Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Exempt-From-Owner-Approval: trivial API refactoring
Change-Id: Iae4e7fe57adff071c35af459e31223a1fd05fef2
Some MediaProvider events (such as thumbnail invalidation) are
handled on a background thread. To reduce flaky tests, wait until
all background events have been processed, which is more robust
than sleep.
Bug: 134879702
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: Ia032b19c1b0e5c0096c55bf3d46a5153525e89fa
(cherry picked from commit efad242f35)
As part of getting MediaProvider to compile against supported APIs,
we're moving to the call() method instead of IMediaScannerService.
Bug: 137890034
Test: atest --test-mapping packages/providers/MediaProvider
Test: atest cts/tests/tests/media/src/android/media/cts/MediaScanner*
Change-Id: Ie959daa7576214024150faf84b44cdba00119257
Move the settings validators out to their own package so we can
reason about them more easily. This is the first step in a journey
which will end up with us not initialising them inside the Settings
object which, in turn, will reduce boot times.
Bug: 139449903
Test: atest RunBackupFrameworksServicesRoboTests CtsBackupTestCases CtsBackupHostTestCases GtsBackupTestCases GtsBackupHostTestCases
Change-Id: I611d9855fa91bbbbb6b0996e8ed6d765dca74717
Adding the device information to the backup will allow us to restore
data which is device specific if it's appropriate to do so (e.g. device
density)
The device specific settings which will be backed up are;
Settings.Secure.DISPLAY_DENSITY_FORCED
Test: atest SettingsProviderTest SettingsBackupTest
Test: Manual - Density changes during SUW when setting is restored
Fixes: 28437818
Change-Id: Ibc3595cdece3f1ccb4fccaff8212c1c3cb5c9756