Merge "Updated haptic effect for success" into pi-dev am: d6dbebf7ba
am: f015c6d04c

Change-Id: I9a33d58b2b9d9af17e9aa3082cf7ab63b7e5d0d5
diff --git a/services/core/java/com/android/server/fingerprint/ClientMonitor.java b/services/core/java/com/android/server/fingerprint/ClientMonitor.java
index 4100a9a..b935ba2 100644
--- a/services/core/java/com/android/server/fingerprint/ClientMonitor.java
+++ b/services/core/java/com/android/server/fingerprint/ClientMonitor.java
@@ -80,7 +80,7 @@
         mGroupId = groupId;
         mIsRestricted = restricted;
         mOwner = owner;
-        mSuccessVibrationEffect = getSuccessVibrationEffect(context);
+        mSuccessVibrationEffect = VibrationEffect.get(VibrationEffect.EFFECT_CLICK);
         mErrorVibrationEffect = VibrationEffect.get(VibrationEffect.EFFECT_DOUBLE_CLICK);
         try {
             if (token != null) {
@@ -239,25 +239,4 @@
             vibrator.vibrate(mErrorVibrationEffect, FINGERPRINT_SONFICATION_ATTRIBUTES);
         }
     }
-
-    private static VibrationEffect getSuccessVibrationEffect(Context ctx) {
-        int[] arr = ctx.getResources().getIntArray(
-                com.android.internal.R.array.config_longPressVibePattern);
-        final long[] vibePattern;
-        if (arr == null || arr.length == 0) {
-            vibePattern = DEFAULT_SUCCESS_VIBRATION_PATTERN;
-        } else {
-            vibePattern = new long[arr.length];
-            for (int i = 0; i < arr.length; i++) {
-                vibePattern[i] = arr[i];
-            }
-        }
-        if (vibePattern.length == 1) {
-            return VibrationEffect.createOneShot(
-                    vibePattern[0], VibrationEffect.DEFAULT_AMPLITUDE);
-        } else {
-            return VibrationEffect.createWaveform(vibePattern, -1);
-        }
-    }
-
 }