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

Commit 395b519f authored by Amith Yamasani's avatar Amith Yamasani Committed by Android (Google) Code Review
Browse files

Merge "Inform PendingIntent sender if broadcast was not queued." into lmp-mr1-dev

parents 90cf41c3 83b6ef01
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -212,6 +212,13 @@ public class ActivityManager {
     */
    public static final int BROADCAST_STICKY_CANT_HAVE_PERMISSION = -1;

    /**
     * Result for IActivityManager.broadcastIntent: trying to send a broadcast
     * to a stopped user. Fail.
     * @hide
     */
    public static final int BROADCAST_FAILED_USER_STOPPED = -2;

    /**
     * Type for IActivityManaqer.getIntentSender: this PendingIntent is
     * for a sendBroadcast operation.
+1 −1
Original line number Diff line number Diff line
@@ -15576,7 +15576,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                    & Intent.FLAG_RECEIVER_BOOT_UPGRADE) == 0) {
                Slog.w(TAG, "Skipping broadcast of " + intent
                        + ": user " + userId + " is stopped");
                return ActivityManager.BROADCAST_SUCCESS;
                return ActivityManager.BROADCAST_FAILED_USER_STOPPED;
            }
        }
+4 −2
Original line number Diff line number Diff line
@@ -269,11 +269,13 @@ final class PendingIntentRecord extends IIntentSender.Stub {
                        try {
                            // If a completion callback has been requested, require
                            // that the broadcast be delivered synchronously
                            owner.broadcastIntentInPackage(key.packageName, uid,
                            int sent = owner.broadcastIntentInPackage(key.packageName, uid,
                                    finalIntent, resolvedType,
                                    finishedReceiver, code, null, null,
                                requiredPermission, (finishedReceiver != null), false, userId);
                            if (sent == ActivityManager.BROADCAST_SUCCESS) {
                                sendFinish = false;
                            }
                        } catch (RuntimeException e) {
                            Slog.w(ActivityManagerService.TAG,
                                    "Unable to send startActivity intent", e);