diff options
| author | 2016-06-20 22:09:27 +0000 | |
|---|---|---|
| committer | 2016-06-20 22:09:30 +0000 | |
| commit | d2480ab7bb70c8150a2c663fe049370b0860553d (patch) | |
| tree | b67902081a08be07178975a211ce39bcdba8e988 | |
| parent | 2a3336813a5cde4c3f3a7c65d7eb0c38c81fcb07 (diff) | |
| parent | ea05cd57f5b2b26650276a7ff03053e7cb78c538 (diff) | |
Merge "Fix issue #29438842: Enter the "am broadcast -a..." into nyc-dev
| -rw-r--r-- | services/core/java/com/android/server/am/ActivityManagerService.java | 13 | ||||
| -rw-r--r-- | services/core/java/com/android/server/am/BroadcastQueue.java | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 28fdfd1d615d..159a1bf89800 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -17917,6 +17917,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; } diff --git a/services/core/java/com/android/server/am/BroadcastQueue.java b/services/core/java/com/android/server/am/BroadcastQueue.java index 88645c1e8afd..a279290a34be 100644 --- a/services/core/java/com/android/server/am/BroadcastQueue.java +++ b/services/core/java/com/android/server/am/BroadcastQueue.java @@ -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. |