Loading services/core/java/com/android/server/notification/NotificationManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -444,7 +444,7 @@ public class NotificationManagerService extends SystemService { public static final class NotificationRecord { final StatusBarNotification sbn; final SingleNotificationStats stats = new SingleNotificationStats(); SingleNotificationStats stats; IBinder statusBarKey; NotificationRecord(StatusBarNotification sbn) Loading Loading @@ -1639,7 +1639,7 @@ public class NotificationManagerService extends SystemService { } else { old = mNotificationList.get(index); mNotificationList.set(index, r); mUsageStats.registerUpdatedByApp(r); mUsageStats.registerUpdatedByApp(r, old); // Make sure we don't lose the foreground service state. if (old != null) { notification.flags |= Loading services/core/java/com/android/server/notification/NotificationUsageStats.java +3 −1 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ public class NotificationUsageStats { * Called when a notification has been posted. */ public synchronized void registerPostedByApp(NotificationRecord notification) { notification.stats = new SingleNotificationStats(); notification.stats.posttimeElapsedMs = SystemClock.elapsedRealtime(); for (AggregatedStats stats : getAggregatedStatsLocked(notification)) { stats.numPostedByApp++; Loading @@ -68,7 +69,8 @@ public class NotificationUsageStats { /** * Called when a notification has been updated. */ public void registerUpdatedByApp(NotificationRecord notification) { public void registerUpdatedByApp(NotificationRecord notification, NotificationRecord old) { notification.stats = old.stats; for (AggregatedStats stats : getAggregatedStatsLocked(notification)) { stats.numUpdatedByApp++; } Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -444,7 +444,7 @@ public class NotificationManagerService extends SystemService { public static final class NotificationRecord { final StatusBarNotification sbn; final SingleNotificationStats stats = new SingleNotificationStats(); SingleNotificationStats stats; IBinder statusBarKey; NotificationRecord(StatusBarNotification sbn) Loading Loading @@ -1639,7 +1639,7 @@ public class NotificationManagerService extends SystemService { } else { old = mNotificationList.get(index); mNotificationList.set(index, r); mUsageStats.registerUpdatedByApp(r); mUsageStats.registerUpdatedByApp(r, old); // Make sure we don't lose the foreground service state. if (old != null) { notification.flags |= Loading
services/core/java/com/android/server/notification/NotificationUsageStats.java +3 −1 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ public class NotificationUsageStats { * Called when a notification has been posted. */ public synchronized void registerPostedByApp(NotificationRecord notification) { notification.stats = new SingleNotificationStats(); notification.stats.posttimeElapsedMs = SystemClock.elapsedRealtime(); for (AggregatedStats stats : getAggregatedStatsLocked(notification)) { stats.numPostedByApp++; Loading @@ -68,7 +69,8 @@ public class NotificationUsageStats { /** * Called when a notification has been updated. */ public void registerUpdatedByApp(NotificationRecord notification) { public void registerUpdatedByApp(NotificationRecord notification, NotificationRecord old) { notification.stats = old.stats; for (AggregatedStats stats : getAggregatedStatsLocked(notification)) { stats.numUpdatedByApp++; } Loading