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
This commit is contained in:
Alan Stokes
2019-09-24 14:15:10 +01:00
parent efb5b79fcd
commit 4e1a74241b
3 changed files with 5 additions and 19 deletions

View File

@@ -7880,14 +7880,6 @@ public final class Settings {
*/
public static final String DEVICE_PAIRED = "device_paired";
/**
* Integer state indicating whether package verifier is enabled.
* TODO(b/34259924): Remove this setting.
*
* @hide
*/
public static final String PACKAGE_VERIFIER_STATE = "package_verifier_state";
/**
* Specifies additional package name for broadcasting the CMAS messages.
* @hide

View File

@@ -2242,9 +2242,6 @@ class SettingsProtoDumpUtil {
dumpSetting(s, p,
Settings.Secure.PACKAGE_VERIFIER_USER_CONSENT,
SecureSettingsProto.PackageVerifier.USER_CONSENT);
dumpSetting(s, p,
Settings.Secure.PACKAGE_VERIFIER_STATE,
SecureSettingsProto.PackageVerifier.STATE);
p.end(packageVerifierToken);
final long parentalControlToken = p.start(SecureSettingsProto.PARENTAL_CONTROL);

View File

@@ -17,8 +17,7 @@
package android.provider;
import static com.google.android.collect.Sets.newHashSet;
import static junit.framework.Assert.assertTrue;
import static com.google.common.truth.Truth.assertWithMessage;
import static java.lang.reflect.Modifier.isFinal;
import static java.lang.reflect.Modifier.isPublic;
@@ -655,7 +654,6 @@ public class SettingsBackupTest {
Settings.Secure.NIGHT_DISPLAY_LAST_ACTIVATED_TIME,
Settings.Secure.NUM_ROTATION_SUGGESTIONS_ACCEPTED,
Settings.Secure.ODI_CAPTIONS_ENABLED,
Settings.Secure.PACKAGE_VERIFIER_STATE,
Settings.Secure.PACKAGE_VERIFIER_USER_CONSENT,
Settings.Secure.PARENTAL_CONTROL_LAST_UPDATE,
Settings.Secure.PAYMENT_SERVICE_SEARCH_URI,
@@ -754,12 +752,11 @@ public class SettingsBackupTest {
Set<String> settings, Set<String> settingsToBackup, Set<String> blacklist) {
Set<String> settingsNotBackedUp = difference(settings, settingsToBackup);
Set<String> settingsNotBackedUpOrBlacklisted = difference(settingsNotBackedUp, blacklist);
assertTrue(
"Settings not backed up or blacklisted",
settingsNotBackedUpOrBlacklisted.isEmpty());
assertWithMessage("Settings not backed up or blacklisted")
.that(settingsNotBackedUpOrBlacklisted).isEmpty();
assertTrue(
"blacklisted settings backed up", intersect(settingsToBackup, blacklist).isEmpty());
assertWithMessage("blacklisted settings backed up")
.that(intersect(settingsToBackup, blacklist)).isEmpty();
}
private static Set<String> getCandidateSettings(