Remove non-safe mode boot vibration.

Ding, dong the BZZZT is dead.

Bug: 22414771
Test: manual
Change-Id: I011a9b475a6497db6e9440647d6d5c60dcf171b7
This commit is contained in:
Michael Wright
2017-07-21 16:40:58 +01:00
parent cb423e42b3
commit 33d6c08aa6
5 changed files with 6 additions and 28 deletions

View File

@@ -69,12 +69,7 @@ public class HapticFeedbackConstants {
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
*/

View File

@@ -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>

View File

@@ -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" />

View File

@@ -154,7 +154,7 @@ public class AccessibilityShortcutController {
// 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);
}

View File

@@ -431,9 +431,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
// 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 @@ public class PhoneWindowManager implements WindowManagerPolicy {
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);
@@ -7226,9 +7221,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
@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) {
@@ -7747,9 +7742,6 @@ public class PhoneWindowManager implements WindowManagerPolicy {
case HapticFeedbackConstants.CALENDAR_DATE:
pattern = mCalendarDateVibePattern;
break;
case HapticFeedbackConstants.SAFE_MODE_DISABLED:
pattern = mSafeModeDisabledVibePattern;
break;
case HapticFeedbackConstants.SAFE_MODE_ENABLED:
pattern = mSafeModeEnabledVibePattern;
break;