diff --git a/src/com/android/settings/development/BluetoothAvrcpVersionPreferenceController.java b/src/com/android/settings/development/BluetoothAvrcpVersionPreferenceController.java
index 136ddad..8c307a6 100644
--- a/src/com/android/settings/development/BluetoothAvrcpVersionPreferenceController.java
+++ b/src/com/android/settings/development/BluetoothAvrcpVersionPreferenceController.java
@@ -63,7 +63,7 @@
     public void updateState(Preference preference) {
         final ListPreference listPreference = (ListPreference) preference;
         final String currentValue = SystemProperties.get(BLUETOOTH_AVRCP_VERSION_PROPERTY);
-        int index = 0; // Defaults to AVRCP 1.4
+        int index = 0; // Defaults to AVRCP 1.5
         for (int i = 0; i < mListValues.length; i++) {
             if (TextUtils.equals(currentValue, mListValues[i])) {
                 index = i;
diff --git a/src/com/android/settings/notification/SoundSettings.java b/src/com/android/settings/notification/SoundSettings.java
index 9e7f3ed..b088fe3 100644
--- a/src/com/android/settings/notification/SoundSettings.java
+++ b/src/com/android/settings/notification/SoundSettings.java
@@ -76,6 +76,7 @@
     private RingtonePreference mRequestPreference;
     private UpdatableListPreferenceDialogFragment mDialogFragment;
     private String mHfpOutputControllerKey;
+    private String mVibrationPreferencesKey = "vibration_preference_screen";
 
     @Override
     public int getMetricsCategory() {
@@ -127,6 +128,10 @@
 
     @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;
@@ -310,4 +315,4 @@
             mDialogFragment.onListPreferenceUpdated(preference);
         }
     }
-}
\ No newline at end of file
+}
