Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60375032 authored by Julia Reynolds's avatar Julia Reynolds Committed by android-build-merger
Browse files

Merge "Don\'t get application info for the system" into nyc-dev am: f64a0fea

am: 8615cb59

* commit '8615cb59':
  Don't get application info for the system

Change-Id: Ib6562103588d88b50ef20257c1ff069291a74c17
parents 326af49e 8615cb59
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -2459,10 +2459,12 @@ public class NotificationManagerService extends SystemService {

        // Fix the notification as best we can.
        try {
            if (!"android".equals(pkg) && !"system".equals(pkg)) {
                Notification.addFieldsFromContext(getContext().createApplicationContext(
                        getContext().getPackageManager().getApplicationInfoAsUser(
                                pkg, PackageManager.MATCH_UNINSTALLED_PACKAGES, userId),
                        Context.CONTEXT_RESTRICTED), notification);
            }
        } catch (NameNotFoundException e) {
            Slog.e(TAG, "Cannot create a context for sending app", e);
            return;