Merge "Fix NPE in BaseStatusbar in onListenerConnected"

This commit is contained in:
Jason Monk
2016-02-23 13:51:22 +00:00
committed by Gerrit Code Review

View File

@@ -442,6 +442,10 @@ public abstract class BaseStatusBar extends SystemUI implements
public void onListenerConnected() {
if (DEBUG) Log.d(TAG, "onListenerConnected");
final StatusBarNotification[] notifications = getActiveNotifications();
if (notifications == null) {
Log.w(TAG, "onListenerConnected unable to get active notifications.");
return;
}
final RankingMap currentRanking = getCurrentRanking();
mHandler.post(new Runnable() {
@Override