Skip to content

Commit

Permalink
SystemUI: Tweak number of notifications detection method
Browse files Browse the repository at this point in the history
Change-Id: Ibd46fa5039e1d3062dcdb8f3c4dbd9ec1bdc73b0
  • Loading branch information
DvTonder committed Dec 12, 2012
1 parent 1b9117f commit e2a2d16
Showing 1 changed file with 5 additions and 8 deletions.
Expand Up @@ -2617,8 +2617,7 @@ public boolean skipToSettingsPanel() {
}

int N = mNotificationData.size();
int thisUsersNotifications = 0;
for (int i=0; i<N; i++) {
for (int i = 0; i < N; i++) {
Entry ent = mNotificationData.get(N-i-1);
if(ent != null
&& ent.notification != null
Expand All @@ -2628,14 +2627,12 @@ && notificationIsForCurrentUser(ent.notification)) {
case com.android.internal.R.drawable.stat_sys_adb:
continue;
}
thisUsersNotifications++;
// We have at least one notification, we cannot skip
return false;
}
}
if(thisUsersNotifications == 0) {
return true;
}

return false;
// No notifications for current user, lets skip to Settings panel
return true;
}

private static class FastColorDrawable extends Drawable {
Expand Down

0 comments on commit e2a2d16

Please sign in to comment.