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

Commit 8615cb59 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

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

Change-Id: I5e7dea17acbc06f48a8f3bfcf258f4261d13b066
parents f6e1f775 f64a0fea
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -2459,10 +2459,12 @@ public class NotificationManagerService extends SystemService {


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