OSDN Git Service

Add content intent to autogroup summary.
authorJulia Reynolds <juliacr@google.com>
Fri, 15 Apr 2016 19:13:54 +0000 (15:13 -0400)
committerJulia Reynolds <juliacr@google.com>
Fri, 15 Apr 2016 19:13:54 +0000 (15:13 -0400)
Change-Id: I01afb5e9aa7d74844d6640fdc70b39b59ef2093a
Fixes: 28194709

services/core/java/com/android/server/notification/NotificationManagerService.java

index b3d6fd4..e411579 100644 (file)
@@ -2239,6 +2239,13 @@ public class NotificationManagerService extends SystemService {
                                         .setFlag(Notification.FLAG_GROUP_SUMMARY, true)
                                         .build();
                         summaryNotification.extras.putAll(extras);
+                        Intent appIntent = getContext().getPackageManager()
+                                .getLaunchIntentForPackage(adjustment.getPackage());
+                        if (appIntent != null) {
+                            summaryNotification.contentIntent = PendingIntent.getActivityAsUser(
+                                    getContext(), 0, appIntent, 0, null,
+                                    UserHandle.of(adjustedSbn.getUserId()));
+                        }
                         final StatusBarNotification summarySbn =
                                 new StatusBarNotification(adjustedSbn.getPackageName(),
                                         adjustedSbn.getOpPkg(),