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(); final int N = newlyVisible.size();
String[] newlyVisibleKeyAr = new String[N]; if (N > 0) {
for (int i = 0; i < N; i++) { String[] newlyVisibleKeyAr = new String[N];
newlyVisibleKeyAr[i] = newlyVisibleAr[i].key; for (int i = 0; i < N; i++) {
newlyVisibleKeyAr[i] = newlyVisibleAr[i].key;
}
setNotificationsShown(newlyVisibleKeyAr);
} }
setNotificationsShown(newlyVisibleKeyAr);
} }
// State logging // State logging