Loading src/com/android/settings/notification/NotificationBackend.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -397,9 +397,9 @@ public class NotificationBackend { return false; return false; } } public NotificationHistory getNotificationHistory(String pkg) { public NotificationHistory getNotificationHistory(String pkg, String attributionTag) { try { try { return sINM.getNotificationHistory(pkg); return sINM.getNotificationHistory(pkg, attributionTag); } catch (Exception e) { } catch (Exception e) { Log.w(TAG, "Error calling NoMan", e); Log.w(TAG, "Error calling NoMan", e); } } Loading src/com/android/settings/notification/history/HistoryLoader.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -50,7 +50,8 @@ public class HistoryLoader { try { try { Map<String, NotificationHistoryPackage> historicalNotifications = new HashMap<>(); Map<String, NotificationHistoryPackage> historicalNotifications = new HashMap<>(); NotificationHistory history = NotificationHistory history = mBackend.getNotificationHistory(mContext.getPackageName()); mBackend.getNotificationHistory(mContext.getPackageName(), mContext.getAttributionTag()); while (history.hasNextNotification()) { while (history.hasNextNotification()) { HistoricalNotification hn = history.getNextNotification(); HistoricalNotification hn = history.getNextNotification(); Loading src/com/android/settings/notification/history/NotificationHistoryActivity.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -246,8 +246,9 @@ public class NotificationHistoryActivity extends Activity { StatusBarNotification[] dismissed = null; StatusBarNotification[] dismissed = null; try { try { snoozed = getSnoozedNotifications(); snoozed = getSnoozedNotifications(); dismissed = mNm.getHistoricalNotifications( dismissed = mNm.getHistoricalNotificationsWithAttribution( NotificationHistoryActivity.this.getPackageName(), 6, false); NotificationHistoryActivity.this.getPackageName(), NotificationHistoryActivity.this.getAttributionTag(), 6, false); } catch (SecurityException | RemoteException e) { } catch (SecurityException | RemoteException e) { Log.d(TAG, "OnPaused called while trying to retrieve notifications"); Log.d(TAG, "OnPaused called while trying to retrieve notifications"); } } Loading src/com/android/settings/notification/history/NotificationStation.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -372,10 +372,10 @@ public class NotificationStation extends SettingsPreferenceFragment { */ */ private void loadNotifications() { private void loadNotifications() { try { try { StatusBarNotification[] active = mNoMan.getActiveNotifications( StatusBarNotification[] active = mNoMan.getActiveNotificationsWithAttribution( mContext.getPackageName()); mContext.getPackageName(), mContext.getAttributionTag()); StatusBarNotification[] dismissed = mNoMan.getHistoricalNotifications( StatusBarNotification[] dismissed = mNoMan.getHistoricalNotificationsWithAttribution( mContext.getPackageName(), 50, false); mContext.getPackageName(), mContext.getAttributionTag(), 50, false); List<HistoricalNotificationInfo> list List<HistoricalNotificationInfo> list = new ArrayList<>(active.length + dismissed.length); = new ArrayList<>(active.length + dismissed.length); Loading Loading
src/com/android/settings/notification/NotificationBackend.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -397,9 +397,9 @@ public class NotificationBackend { return false; return false; } } public NotificationHistory getNotificationHistory(String pkg) { public NotificationHistory getNotificationHistory(String pkg, String attributionTag) { try { try { return sINM.getNotificationHistory(pkg); return sINM.getNotificationHistory(pkg, attributionTag); } catch (Exception e) { } catch (Exception e) { Log.w(TAG, "Error calling NoMan", e); Log.w(TAG, "Error calling NoMan", e); } } Loading
src/com/android/settings/notification/history/HistoryLoader.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -50,7 +50,8 @@ public class HistoryLoader { try { try { Map<String, NotificationHistoryPackage> historicalNotifications = new HashMap<>(); Map<String, NotificationHistoryPackage> historicalNotifications = new HashMap<>(); NotificationHistory history = NotificationHistory history = mBackend.getNotificationHistory(mContext.getPackageName()); mBackend.getNotificationHistory(mContext.getPackageName(), mContext.getAttributionTag()); while (history.hasNextNotification()) { while (history.hasNextNotification()) { HistoricalNotification hn = history.getNextNotification(); HistoricalNotification hn = history.getNextNotification(); Loading
src/com/android/settings/notification/history/NotificationHistoryActivity.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -246,8 +246,9 @@ public class NotificationHistoryActivity extends Activity { StatusBarNotification[] dismissed = null; StatusBarNotification[] dismissed = null; try { try { snoozed = getSnoozedNotifications(); snoozed = getSnoozedNotifications(); dismissed = mNm.getHistoricalNotifications( dismissed = mNm.getHistoricalNotificationsWithAttribution( NotificationHistoryActivity.this.getPackageName(), 6, false); NotificationHistoryActivity.this.getPackageName(), NotificationHistoryActivity.this.getAttributionTag(), 6, false); } catch (SecurityException | RemoteException e) { } catch (SecurityException | RemoteException e) { Log.d(TAG, "OnPaused called while trying to retrieve notifications"); Log.d(TAG, "OnPaused called while trying to retrieve notifications"); } } Loading
src/com/android/settings/notification/history/NotificationStation.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -372,10 +372,10 @@ public class NotificationStation extends SettingsPreferenceFragment { */ */ private void loadNotifications() { private void loadNotifications() { try { try { StatusBarNotification[] active = mNoMan.getActiveNotifications( StatusBarNotification[] active = mNoMan.getActiveNotificationsWithAttribution( mContext.getPackageName()); mContext.getPackageName(), mContext.getAttributionTag()); StatusBarNotification[] dismissed = mNoMan.getHistoricalNotifications( StatusBarNotification[] dismissed = mNoMan.getHistoricalNotificationsWithAttribution( mContext.getPackageName(), 50, false); mContext.getPackageName(), mContext.getAttributionTag(), 50, false); List<HistoricalNotificationInfo> list List<HistoricalNotificationInfo> list = new ArrayList<>(active.length + dismissed.length); = new ArrayList<>(active.length + dismissed.length); Loading