Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63b79f23 authored by Michael Wright's avatar Michael Wright Committed by android-build-merger
Browse files

Merge "Remove non-safe mode boot vibration." into oc-dr1-dev

am: 149ff697

Change-Id: I8339730c21619c4249826a5b855657c01757147c
parents d1a05995 149ff697
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -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
     */
+1 −9
Original line number Diff line number Diff line
@@ -968,15 +968,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>
+0 −1
Original line number Diff line number Diff line
@@ -1555,7 +1555,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" />
+1 −1
Original line number Diff line number Diff line
@@ -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);
        }

+3 −11
Original line number Diff line number Diff line
@@ -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;