Ruslan Tkhakokhov da40cb8681 Special-case backup/restore of replaced settings
Bug: 153940088
Test: atest SettingsProviderTest:SettingsHelperTest

Values for some settings might be changed temporarily. If a backup happens at that moment, we want to backup the real values instead of the temporary ones. If a restore happens at that moment, we don't want to restore values for modified settings. See https://b.corp.google.com/issues/153940088#comment2 for context.

Change-Id: I4866f56376ffa393220bbef828a4b876d586146b
2020-04-27 19:50:37 +00:00

59 lines
1.7 KiB
Plaintext

android_app {
name: "SettingsProvider",
resource_dirs: ["res"],
srcs: [
"src/**/*.java",
"src/com/android/providers/settings/EventLogTags.logtags",
],
libs: [
"telephony-common",
"ims-common",
"unsupportedappusage",
],
static_libs: [
"junit",
"SettingsLibDisplayDensityUtils",
],
platform_apis: true,
certificate: "platform",
privileged: true,
}
android_test {
name: "SettingsProviderTest",
// Note we statically link several classes to do some unit tests. It's not accessible otherwise
// because this test is not an instrumentation test. (because the target runs in the system process.)
srcs: [
"test/**/*.java",
"src/android/provider/settings/backup/*",
"src/android/provider/settings/validators/*",
"src/com/android/providers/settings/SettingsBackupAgent.java",
"src/com/android/providers/settings/SettingsState.java",
"src/com/android/providers/settings/SettingsHelper.java",
"src/com/android/providers/settings/WifiSoftApConfigChangedNotifier.java",
],
static_libs: [
"androidx.test.rules",
"mockito-target-minus-junit4",
"SettingsLibDisplayDensityUtils",
"platform-test-annotations",
"truth-prebuilt",
],
libs: [
"android.test.base",
"android.test.mock",
"unsupportedappusage",
],
resource_dirs: ["res"],
aaptflags: [
"--auto-add-overlay",
"--extra-packages",
"com.android.providers.settings",
],
platform_apis: true,
certificate: "platform",
test_suites: ["device-tests"],
manifest: "test/AndroidManifest.xml",
test_config: "test/AndroidTest.xml",
}