Allow restore of settings with nullable components
Creates a new settings validator that allows for null components, which have semantic meaning for certain settings (in this case, that no service is selected). Bug: 79925290 Test: 1) atest SettingsValidatorsTest 2) Manual: - In Settings UI, select "None" for autofill service and accessibility shortcut target - "adb backup -keyvalue -f nullsettings.ab com.android.providers.settings" - "adb restore nullsettings.ab" - Verify no crashes and that autofill service and accessibility shortcut target both have "None" in Settings UI Change-Id: I159b3f4706c6b981a30437c31724b106eb4e3f2a
Showing
- core/java/android/provider/Settings.java 4 additions, 2 deletionscore/java/android/provider/Settings.java
- core/java/android/provider/SettingsValidators.java 15 additions, 0 deletionscore/java/android/provider/SettingsValidators.java
- core/tests/coretests/src/android/provider/SettingsValidatorsTest.java 17 additions, 0 deletions...oretests/src/android/provider/SettingsValidatorsTest.java
Please register or sign in to comment