diff options
author | Yohei Yukawa <yukawa@google.com> | 2018-06-25 11:35:19 -0700 |
---|---|---|
committer | Yohei Yukawa <yukawa@google.com> | 2018-06-25 11:35:19 -0700 |
commit | 4bc81e836c360a212c30c696c51588fa05193b6d (patch) | |
tree | 00d0b9b758e4b66f919c95f3d3fb1de69a769698 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 6d5bdf293d399d9986179ae0987e4e058a27e324 (diff) |
Use correct validator for SELECTED_SPELL_CHECKER_SUBTYPE
This CL fixes a bug that COMPONENT_NAME_VALIDATOR is mistakenly used
for SELECTED_SPELL_CHECKER_SUBTYPE secure settings due to a comment
bug. ANY_INTEGER_VALIDATOR should be used instead because it stores
the hashcode of SpellCheckerSubtype.
This CL also addresses the comment bug, which caused this issue.
Fix: 110363012
Test: atest FrameworksCoreTests:android.provider.SettingsBackupTest
Test: atest FrameworksCoreTests:android.provider.SettingsValidatorsTest
Test: manually verified as follows
1. In a source device, complete the setup wizard (without restoring
the previous settings) then run 'adb shell bmgr backupnow --all'
2. In a destination device, restore settings by choosing the option
from a cloud backup.
3. Check logcat. Make sure that the following message is not shown.
SettingsBackupAgent: Attempted restore of selected_spell_checker_subtype setting, but its value didn't pass validation, value: 0
Test: manually verified as follows
1. In a source device
1.1. complete the setup wizard without restoring the previous
settings
1.2. Open Settings -> System -> Languages & input -> Advanced
-> Spell checker -> Languages
1.3. Select 'French'
1.4. adb shell settings get secure selected_spell_checker_subtype
-> Make sure it shows '102517'
1.5. adb shell bmgr backupnow --all
2. In a destination device
2.1. Restore settings by choosing the option from a cloud backup.
2.2. adb shell settings get secure selected_spell_checker_subtype
-> Make sure it shows '102517'
Change-Id: I560395a2ccd5bcf1bf7446123b892b23ab14f9f5
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions