Use super method for Vibration preferences
onDisplayPreferenceDialog is overriden to handle BT related preferences
but VibrationPreferences require the super method of
onDisplayPreferenceDialog. Therefore if VibrationPreferences wants to
display a dialog, use the super method instead of the overriden method.
Bug: 150661723
Change-Id: I3f8e86e1d1f32fa6eae2798d3bad3cb48402db7b
Merged-In: I3f8e86e1d1f32fa6eae2798d3bad3cb48402db7b
(cherry picked from commit eb27aefa32
)
This commit is contained in:
@@ -76,6 +76,7 @@ public class SoundSettings extends DashboardFragment implements OnActivityResult
|
||||
private RingtonePreference mRequestPreference;
|
||||
private UpdatableListPreferenceDialogFragment mDialogFragment;
|
||||
private String mHfpOutputControllerKey;
|
||||
private String mVibrationPreferencesKey = "vibration_preference_screen";
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
@@ -127,6 +128,10 @@ public class SoundSettings extends DashboardFragment implements OnActivityResult
|
||||
|
||||
@Override
|
||||
public void onDisplayPreferenceDialog(Preference preference) {
|
||||
if (TextUtils.equals(mVibrationPreferencesKey, preference.getKey())) {
|
||||
super.onDisplayPreferenceDialog(preference);
|
||||
return;
|
||||
}
|
||||
final int metricsCategory;
|
||||
if (mHfpOutputControllerKey.equals(preference.getKey())) {
|
||||
metricsCategory = SettingsEnums.DIALOG_SWITCH_HFP_DEVICES;
|
||||
@@ -311,4 +316,4 @@ public class SoundSettings extends DashboardFragment implements OnActivityResult
|
||||
mDialogFragment.onListPreferenceUpdated(preference);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user