Refactor DefaultAppPicker to a general radio button picker

Bug: 36557316
Test: make RunSettingsRoboTests
Change-Id: I52985e527e55697cf29f8d97d775d4bbed025beb
This commit is contained in:
Fan Zhang
2017-03-23 11:03:29 -07:00
parent b3f13f9f32
commit a278962dbc
37 changed files with 580 additions and 398 deletions

View File

@@ -43,12 +43,12 @@ public class DefaultNotificationAssistantPicker extends DefaultAppPickerFragment
}
@Override
protected String getDefaultAppKey() {
protected String getDefaultKey() {
return Settings.Secure.getString(getContext().getContentResolver(), mConfig.setting);
}
@Override
protected boolean setDefaultAppKey(String value) {
protected boolean setDefaultKey(String value) {
Settings.Secure.putString(getContext().getContentResolver(), mConfig.setting, value);
return true;
}
@@ -75,7 +75,7 @@ public class DefaultNotificationAssistantPicker extends DefaultAppPickerFragment
continue;
}
candidates.add(new DefaultAppInfo(
candidates.add(new DefaultAppInfo(mPm,
mUserId, new ComponentName(info.packageName, info.name)));
}
return candidates;