<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>
<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" />
// 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);
}
// 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;
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);
@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) {
case HapticFeedbackConstants.CALENDAR_DATE:
pattern = mCalendarDateVibePattern;
break;
- case HapticFeedbackConstants.SAFE_MODE_DISABLED:
- pattern = mSafeModeDisabledVibePattern;
- break;
case HapticFeedbackConstants.SAFE_MODE_ENABLED:
pattern = mSafeModeEnabledVibePattern;
break;