Merge "Remove non-safe mode boot vibration." into oc-dr1-dev
diff --git a/core/java/android/view/HapticFeedbackConstants.java b/core/java/android/view/HapticFeedbackConstants.java
index 71a3f7e..c431323 100644
--- a/core/java/android/view/HapticFeedbackConstants.java
+++ b/core/java/android/view/HapticFeedbackConstants.java
@@ -69,12 +69,7 @@
public static final int TEXT_HANDLE_MOVE = 8;
/**
- * This is a private constant. Feel free to renumber as desired.
- * @hide
- */
- public static final int SAFE_MODE_DISABLED = 10000;
-
- /**
+ * The phone has booted with safe mode enabled.
* This is a private constant. Feel free to renumber as desired.
* @hide
*/
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index f817ab3..f56abc3 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -959,15 +959,7 @@
<item>30</item>
</integer-array>
- <!-- Vibrator pattern for feedback about booting with safe mode disabled -->
- <integer-array name="config_safeModeDisabledVibePattern">
- <item>0</item>
- <item>1</item>
- <item>20</item>
- <item>21</item>
- </integer-array>
-
- <!-- Vibrator pattern for feedback about booting with safe mode disabled -->
+ <!-- Vibrator pattern for feedback about booting with safe mode enabled -->
<integer-array name="config_safeModeEnabledVibePattern">
<item>0</item>
<item>1</item>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index df508f2..a3b7ee8 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1557,7 +1557,6 @@
<java-symbol type="array" name="config_autoRotationTiltTolerance" />
<java-symbol type="array" name="config_keyboardTapVibePattern" />
<java-symbol type="array" name="config_longPressVibePattern" />
- <java-symbol type="array" name="config_safeModeDisabledVibePattern" />
<java-symbol type="array" name="config_safeModeEnabledVibePattern" />
<java-symbol type="array" name="config_virtualKeyVibePattern" />
<java-symbol type="attr" name="actionModePopupWindowStyle" />
diff --git a/services/core/java/com/android/server/policy/AccessibilityShortcutController.java b/services/core/java/com/android/server/policy/AccessibilityShortcutController.java
index 5090083..0b54e5e 100644
--- a/services/core/java/com/android/server/policy/AccessibilityShortcutController.java
+++ b/services/core/java/com/android/server/policy/AccessibilityShortcutController.java
@@ -154,7 +154,7 @@
// Don't check if haptics are disabled, as we need to alert the user that their
// way of interacting with the phone may change if they activate the shortcut
long[] vibePattern = PhoneWindowManager.getLongIntArray(mContext.getResources(),
- R.array.config_safeModeDisabledVibePattern);
+ R.array.config_longPressVibePattern);
vibrator.vibrate(vibePattern, -1, VIBRATION_ATTRIBUTES);
}
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index d36d2f1..66f9c57 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -431,9 +431,6 @@
// Vibrator pattern for a short vibration when tapping on a day/month/year date of a Calendar.
long[] mCalendarDateVibePattern;
- // Vibrator pattern for haptic feedback during boot when safe mode is disabled.
- long[] mSafeModeDisabledVibePattern;
-
// Vibrator pattern for haptic feedback during boot when safe mode is enabled.
long[] mSafeModeEnabledVibePattern;
@@ -2076,8 +2073,6 @@
com.android.internal.R.array.config_longPressVibePattern);
mCalendarDateVibePattern = getLongIntArray(mContext.getResources(),
com.android.internal.R.array.config_calendarDateVibePattern);
- mSafeModeDisabledVibePattern = getLongIntArray(mContext.getResources(),
- com.android.internal.R.array.config_safeModeDisabledVibePattern);
mSafeModeEnabledVibePattern = getLongIntArray(mContext.getResources(),
com.android.internal.R.array.config_safeModeEnabledVibePattern);
@@ -7220,9 +7215,9 @@
@Override
public void setSafeMode(boolean safeMode) {
mSafeMode = safeMode;
- performHapticFeedbackLw(null, safeMode
- ? HapticFeedbackConstants.SAFE_MODE_ENABLED
- : HapticFeedbackConstants.SAFE_MODE_DISABLED, true);
+ if (safeMode) {
+ performHapticFeedbackLw(null, HapticFeedbackConstants.SAFE_MODE_ENABLED, true);
+ }
}
static long[] getLongIntArray(Resources r, int resid) {
@@ -7741,9 +7736,6 @@
case HapticFeedbackConstants.CALENDAR_DATE:
pattern = mCalendarDateVibePattern;
break;
- case HapticFeedbackConstants.SAFE_MODE_DISABLED:
- pattern = mSafeModeDisabledVibePattern;
- break;
case HapticFeedbackConstants.SAFE_MODE_ENABLED:
pattern = mSafeModeEnabledVibePattern;
break;