Remove duplicate preferences in Accessibility settings.
- addPreferencesFromResource() call has been added to InstrumentedPreferenceFragment, and hence sub-class should not call it again. Change-Id: Ia016d9d407ac3f838c962d1ced585647382a051a Fixes: 68820835 Test: make RunSettingsRoboTests
This commit is contained in:
@@ -59,7 +59,9 @@ public class UnrestrictedDataAccess extends SettingsPreferenceFragment
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
setAnimationAllowed(true);
|
||||
addPreferencesFromResource(R.xml.unrestricted_data_access_settings);
|
||||
if (!usePreferenceScreenTitle()) {
|
||||
addPreferencesFromResource(R.xml.unrestricted_data_access_settings);
|
||||
}
|
||||
mApplicationsState = ApplicationsState.getInstance(
|
||||
(Application) getContext().getApplicationContext());
|
||||
mDataSaverBackend = new DataSaverBackend(getContext());
|
||||
@@ -208,6 +210,11 @@ public class UnrestrictedDataAccess extends SettingsPreferenceFragment
|
||||
return MetricsEvent.DATA_USAGE_UNRESTRICTED_ACCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.unrestricted_data_access_settings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
if (preference instanceof AccessPreference) {
|
||||
|
Reference in New Issue
Block a user