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,12 +3033,15 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
} }
final int N = newlyVisible.size(); final int N = newlyVisible.size();
if (N > 0) {
String[] newlyVisibleKeyAr = new String[N]; String[] newlyVisibleKeyAr = new String[N];
for (int i = 0; i < N; i++) { for (int i = 0; i < N; i++) {
newlyVisibleKeyAr[i] = newlyVisibleAr[i].key; newlyVisibleKeyAr[i] = newlyVisibleAr[i].key;
} }
setNotificationsShown(newlyVisibleKeyAr); setNotificationsShown(newlyVisibleKeyAr);
} }
}
// State logging // State logging