From 8783d3fe761ab943ad73e7c58252806df9e401da Mon Sep 17 00:00:00 2001 From: Jose Lima Date: Mon, 18 May 2015 14:50:23 -0700 Subject: [PATCH] Make all icon fields & extras sent to listeners backward-compatible. This also had to be done for when retrieving existing notifications. For final release, we will only be doing this for notification listeners targeting older SDKs. Bug: 21207612 Change-Id: I351f9e13cd052410e7355c956c750c3859f972cb --- core/java/android/service/notification/NotificationListenerService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java index e4cdc97ba6bf..b8493d4a05cf 100644 --- a/core/java/android/service/notification/NotificationListenerService.java +++ b/core/java/android/service/notification/NotificationListenerService.java @@ -468,6 +468,8 @@ public abstract class NotificationListenerService extends Service { for (int i = 0; i < N; i++) { Notification notification = list.get(i).getNotification(); Builder.rebuild(getContext(), notification); + // convert icon metadata to legacy format for older clients + createLegacyIconExtras(notification); } return list.toArray(new StatusBarNotification[N]); } catch (android.os.RemoteException ex) { -- 2.11.0