summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2015-07-13 22:45:29 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-13 22:45:29 +0000
commit8117c2f8e491d9b48769139c5bca685e88106ae5 (patch)
tree215e945c138b8972406aace7424caea90639ba5f /packages
parent0a66123f62f5d28bbef4f88a32c6de97caab3cfe (diff)
parent5449ee078620255ce9bea60c0a4dbece36e6acf9 (diff)
downloadframeworks_base-8117c2f8e491d9b48769139c5bca685e88106ae5.zip
frameworks_base-8117c2f8e491d9b48769139c5bca685e88106ae5.tar.gz
frameworks_base-8117c2f8e491d9b48769139c5bca685e88106ae5.tar.bz2
am 5449ee07: Merge "Avoid IPC call with an empty array" into mnc-dev
* commit '5449ee078620255ce9bea60c0a4dbece36e6acf9': Avoid IPC call with an empty array
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 2f5c6e1..891cc73 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -3033,11 +3033,14 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
}
final int N = newlyVisible.size();
- String[] newlyVisibleKeyAr = new String[N];
- for (int i = 0; i < N; i++) {
- newlyVisibleKeyAr[i] = newlyVisibleAr[i].key;
+ if (N > 0) {
+ String[] newlyVisibleKeyAr = new String[N];
+ for (int i = 0; i < N; i++) {
+ newlyVisibleKeyAr[i] = newlyVisibleAr[i].key;
+ }
+
+ setNotificationsShown(newlyVisibleKeyAr);
}
- setNotificationsShown(newlyVisibleKeyAr);
}
// State logging