Move date/time prefs to PreferenceController and add tests.

Bug: 32996243
Test: RunSettingsRoboTests
Change-Id: Ie537bbcc35a96a63251e46f84b57c0a861b9d013
This commit is contained in:
Fan Zhang
2016-11-18 11:10:05 -08:00
parent 9a35bc6552
commit beddff82b0
17 changed files with 1155 additions and 263 deletions

View File

@@ -58,8 +58,7 @@ public class TimeFormatPreferenceController extends PreferenceController {
@Override
public void updateState(Preference preference) {
if (!(preference instanceof TwoStatePreference)
|| !TextUtils.equals(KEY_TIME_FORMAT, preference.getKey())) {
if (!(preference instanceof TwoStatePreference)) {
return;
}
((TwoStatePreference) preference).setChecked(is24Hour());