And add unit tests for common validators as atonement...
Test: atest frameworks/base/core/tests/coretests/src/android/provider/SettingsValidatorsTest.java
Bug: 64988620
Change-Id: I561319356cbca70da326586c2a762293c4ade9ed
Applications typically use this action to ask the user to revert the
"Do not ask again" status of directory access requested made by
StorageVolume.createAccessIntent(directory).
Test: atest CtsAppSecurityHostTestCases:ScopedDirectoryAccessTest#testResetDoNotAskAgain
Test: adb shell am start -a android.settings.STORAGE_VOLUME_ACCESS_SETTINGS
Bug: 63720392
Change-Id: I1ed1a018a54013d88260e11ef9646aaed3a3a318
Add app info to crash dialog. Show close (aka force stop) on all dialogs,
not just the repeat dialog.
Remove showing restart and mute by default. Add Settings.Global
configuration parameters for both in case we want to show those options again.
Also some minor cleanup (converting some members to locals).
Bug: 63703353
Bug: 70640329
Test: manual
Change-Id: I83a2b1a5ea0f6a2a9765d7648dab7c184bfbc43f
1. Mark public fields as deprecated: LOCATION_MODE, LOCATION_MODE_HIGH_ACCURACY, LOCATION_MODE_SENSORS_ONLY,
LOCATION_MODE_BATTERY_SAVING, LOCATION_MODE_OFF.
2. Add new public methods to LocationManager:
setLocationEnabled(boolean)
isLocationEnabled()
setLocationProviderEnabled(String, boolean)
3. Remove LOCATION_PREVIOUS_MODE and constant
LOCATION_MODE_PREVIOUS. Refactor code that references
LOCATION_MODE_PREVIOUS to use LocationManager.setLocationEnabled or
LOCATION_MODE_HIGH_ACCURACY.
4. Mark deprecated fields and methods as removed: LOCATION_PROVIDERS_ALLOWED, setLocationProviderEnabled(), isLocationProviderEnabled()
5. Refactor logic in Settings app and Quick Settings to call
LocationManager.setLocationEnabled() instead of setting location mode.
Bug: 70990911
Test: Manual
Change-Id: Ia49b385f8b6a358b62291983eb0146af0ecf8e02
This also adds a feature flag to read to see if the feature is enabled
on a given device.
Bug: 66679618
Test: Used in Settings Robotest
Change-Id: Idb892aa78f244d026a8d4b7dc104d47e0f611085
SettingsBackupAgent.RESTORE_FROM_HIGHER_SDK_INT_SUPPORTED_KEYS
Now that we have validators in place for all settings that are
backed up.
Also, add a setting to override restoreAnyVersion, which can be
modified by Phenotype.
Bug: 64988620
Bug: 72162887
Test: manual (P->P - master without changes to master with changes)
Test: manual (Q->P = API29 -> API28)
Test: a lot of other scenarios covered by our end-to-end tests
Test: a GTS test with both settings that don't have validators
and have values that wouldn't pass validation will be added
in vendor/xts
Change-Id: Ifaf94306984b5204c79648d48fd4056ad403196e
Enabling/disabling the connected mac randomization toggle in developer options will change Settings.Global.WIFI_CONNECTED_MAC_RANDOMIZATION_ENABLE, which the wifi framework can look at to decide whether or not to randomized mac addresses. Also added descriptions for the toggle in developer options.
Bug: 67908229
Bug: 71548421
Test: manual testing of checking that the option correctly displays and
logs to check that the toggle correctly changes values.
Change-Id: I48a2dc34d772b0e4ce7637df904b274c9fe1218f
This is used to activate the feature and show the settings.
Remove @hide from the public APIS.
Design doc:
go/assisted-dialing-dd-v1
Test: manual
Bug: 63934304
Change-Id: I09ea52720bf2439537e2f4ad32afb14f5df25f71
Add P/H experiment flags for Android P power model. The flags will share
the existing Settings.Global.BATTERY_STATS_CONSTANTS. Key
"track_cpu_active_cluster_time" controls KernelUidCpuActiveTimeReader
and KernelUidCpuClusterTimeReader. Key "read_binary_cpu_time" will be
used in a future optimization.
Bug: 68982314
Test: local build and manual test
Change-Id: Ie84fd5265dc65dd0d46ac347cefa32ad92d643ee
all forced app standby enabled except for when the device
is charging.
Reverting the revert of this CL. The only change is to use
EXTRA_PLUGGED instead of EXTRA_STATUS in detecting charging
state. Verified that this passes CTS test for battery saver.
Bug: 69259147
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/ForceAppStandbyTrackerTest.java
Test: atest CtsBatterySavingTestCases
Change-Id: I4f3ffc0c865a1a3a035b6d9d6838b5056b666eb9
A few no longer used settings were removed from SETTINGS_TO_BACKUP.
And extend the unit test to fail if new ones are added without
a validator. Also fail to boot in that case.
Ref: go/android-p-backed-up-settings
Test: atest frameworks/base/core/tests/coretests/src/android/provider/SettingsValidatorsTest.java
Bug: 64988620
Change-Id: I94b4039c9f54c341aec72b62579be3dd8bd84dbb
And extend the unit test to fail if new ones are added without
a validator. Also fail to boot in that case.
Ref: go/android-p-backed-up-settings
Test: atest frameworks/base/core/tests/coretests/src/android/provider/SettingsValidatorsTest.java
Bug: 64988620
Change-Id: Ibd4a2bad0c6a1f2a9e1beec1a4ec8e6972fd86a4
Common validators have been moved out to SettingsValidators class,
as they'll be now shared between Settings.System, Settings.Secure
and Settings.Global.
All validators of Settings.System settings have been verified to be
correct and the missing ones were added.
A unit test that verifies that all settings on SETTINGS_TO_BACKUP
list in Settings.System have validators on VALIDATORS list has been
added. This test will also cover Settings.Secure and Settings.Global
once validators are added for those settings. Also, fail to boot
in that case.
Ref: go/android-p-backed-up-settings
Test: atest frameworks/base/core/tests/coretests/src/android/provider/SettingsValidatorsTest.java
Bug: 64988620
Change-Id: I1fe951604010ab0c3f68a66296885a9766690d69
By default, no longer show the crash dialog the first time an app
crashes. Instead, only multiple crashes will show by default.
Add Settings.Global and Settings.Secure flags to toggle this behavior.
Settings.Secure value is controlled via a setting in developer options.
Ensure Settings.Secure is backed up but Global value is not.
Bug: 63703353, 70640329
Test: SettingsBackupTest, manual crashing with a test app
Change-Id: Ib0a66cabdf60aad5e60eded9bfb96e3126bf032f
This will allow us to toggle and experiment with the feature.
Bug: 67765414
Test: atest SettingsBackupTest
Change-Id: I28d0a817561cb6811966d229e8367adb4eb6d40b
all forced app standby enabled except for when the device
is charging.
Bug: 69259147
Test: Manual test
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/ForceAppStandbyTrackerTest.java
Change-Id: Ica3fe6835958f186269413519ee82bc19fb83275
This will help us run P/H experiments by controlling the VDSO
system property through P/H.
Bug: 70518189
Test: Will manually test it later through opt-in P/H experiment.
Change-Id: I95fd51085aed229358e2cefd472da1116c6073b3