diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 3b7d73a44cbc1..ea28a51fe5476 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -1000,4 +1000,25 @@
provisioning on some carriers, working around a bug (7305641)
where if the preferred is used we don't try the others. -->
false
+
+
+
+ - 0
+ - 150
+ - 200
+ - 250
+
+
+
+
+ - 0
+ - 33
+ - 150
+ - 50
+
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 68a0289756816..68587321b2078 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1525,6 +1525,8 @@
+
+
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index f3a38f0c7cdba..70d37bfc82851 100755
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -101,6 +101,7 @@ public class NotificationManagerService extends INotificationManager.Stub
private static final int SHORT_DELAY = 2000; // 2 seconds
private static final long[] DEFAULT_VIBRATE_PATTERN = {0, 250, 250, 250};
+ private static final int VIBRATE_PATTERN_MAXLEN = 8 * 2 + 1; // up to eight bumps
private static final int DEFAULT_STREAM_TYPE = AudioManager.STREAM_NOTIFICATION;
private static final boolean SCORE_ONGOING_HIGHER = false;
@@ -125,6 +126,9 @@ public class NotificationManagerService extends INotificationManager.Stub
private int mDefaultNotificationLedOn;
private int mDefaultNotificationLedOff;
+ private long[] mDefaultVibrationPattern;
+ private long[] mFallbackVibrationPattern;
+
private boolean mSystemReady;
private int mDisabledNotifications;
@@ -596,6 +600,19 @@ public class NotificationManagerService extends INotificationManager.Stub
}
}
+ static long[] getLongArray(Resources r, int resid, int maxlen, long[] def) {
+ int[] ar = r.getIntArray(resid);
+ if (ar == null) {
+ return def;
+ }
+ final int len = ar.length > maxlen ? maxlen : ar.length;
+ long[] out = new long[len];
+ for (int i=0; i 1) {
+ // If you want your own vibration pattern, you need the VIBRATE permission
+ mVibrator.vibrate(notification.vibrate,
+ ((notification.flags & Notification.FLAG_INSISTENT) != 0) ? 0: -1);
+ }
}
}