Merge "Remove non-safe mode boot vibration." into oc-dr1-dev
am: 149ff697ff
Change-Id: Ie8964116ffb3dccd6b683f0fff764d128107ac4f
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
@@ -994,15 +994,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>
|
||||
|
||||
@@ -1541,7 +1541,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" />
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -7220,9 +7215,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) {
|
||||
@@ -7741,9 +7736,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;
|
||||
|
||||
Reference in New Issue
Block a user