Merge "Avoid IPC call with an empty array" into mnc-dev

This commit is contained in:
Amith Yamasani
2015-07-11 02:27:31 +00:00
committed by Android (Google) Code Review

View File

@ -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