Prevent IndexOutOfBoundsException on toString() if vibrate array is empty (non null)

example: notification.vibrate = new long[0];
This commit is contained in:
Simon Schoar
2009-06-10 21:53:53 +02:00
parent 734bc9bacb
commit bdf78247d6

View File

@@ -460,7 +460,9 @@ public class Notification implements Parcelable
sb.append(this.vibrate[i]);
sb.append(',');
}
sb.append(this.vibrate[N]);
if (N != -1) {
sb.append(this.vibrate[N]);
}
sb.append("]");
} else if ((this.defaults & DEFAULT_VIBRATE) != 0) {
sb.append("default");