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

Commit 20e0a5c7 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by android-build-merger
Browse files

Merge \\\"Fix issue #29438842: Enter the \\\"am broadcast -a...\\\" into...

Merge \\\"Fix issue #29438842: Enter the \\\"am broadcast -a...\\\" into nyc-dev am: d2480ab7 am: 61923ced
am: a2391dcc

Change-Id: I060c6e600e4d27ac63bbc3b1befc7e574d12d1d7
parents f7ee0ef3 a2391dcc
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -17918,6 +17918,19 @@ public final class ActivityManagerService extends ActivityManagerNative
                    // Apps should use JobScehduler to monitor for media provider changes.
                    Slog.w(TAG, action + " no longer allowed; dropping from "
                            + UserHandle.formatUid(callingUid));
                    if (resultTo != null) {
                        final BroadcastQueue queue = broadcastQueueForIntent(intent);
                        try {
                            queue.performReceiveLocked(callerApp, resultTo, intent,
                                    Activity.RESULT_CANCELED, null, null,
                                    false, false, userId);
                        } catch (RemoteException e) {
                            Slog.w(TAG, "Failure ["
                                    + queue.mQueueName + "] sending broadcast result of "
                                    + intent, e);
                        }
                    }
                    // Lie; we don't want to crash the app.
                    return ActivityManager.BROADCAST_SUCCESS;
            }
+1 −1
Original line number Diff line number Diff line
@@ -456,7 +456,7 @@ public final class BroadcastQueue {
        }
    }

    private void performReceiveLocked(ProcessRecord app, IIntentReceiver receiver,
    void performReceiveLocked(ProcessRecord app, IIntentReceiver receiver,
            Intent intent, int resultCode, String data, Bundle extras,
            boolean ordered, boolean sticky, int sendingUser) throws RemoteException {
        // Send the intent to the receiver asynchronously using one-way binder calls.