Merge "Pass in the correct binder token when calling AMS.finishReceiver()." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
0ffb527e5f
@@ -1668,10 +1668,13 @@ public final class LoadedApk {
|
||||
static final class ReceiverDispatcher {
|
||||
|
||||
final static class InnerReceiver extends IIntentReceiver.Stub {
|
||||
final IApplicationThread mApplicationThread;
|
||||
final WeakReference<LoadedApk.ReceiverDispatcher> mDispatcher;
|
||||
final LoadedApk.ReceiverDispatcher mStrongRef;
|
||||
|
||||
InnerReceiver(LoadedApk.ReceiverDispatcher rd, boolean strong) {
|
||||
InnerReceiver(IApplicationThread thread, LoadedApk.ReceiverDispatcher rd,
|
||||
boolean strong) {
|
||||
mApplicationThread = thread;
|
||||
mDispatcher = new WeakReference<LoadedApk.ReceiverDispatcher>(rd);
|
||||
mStrongRef = strong ? rd : null;
|
||||
}
|
||||
@@ -1718,7 +1721,8 @@ public final class LoadedApk {
|
||||
if (extras != null) {
|
||||
extras.setAllowFds(false);
|
||||
}
|
||||
mgr.finishReceiver(this, resultCode, data, extras, false, intent.getFlags());
|
||||
mgr.finishReceiver(mApplicationThread.asBinder(), resultCode, data,
|
||||
extras, false, intent.getFlags());
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
@@ -1825,7 +1829,7 @@ public final class LoadedApk {
|
||||
}
|
||||
|
||||
mAppThread = appThread;
|
||||
mIIntentReceiver = new InnerReceiver(this, !registered);
|
||||
mIIntentReceiver = new InnerReceiver(mAppThread, this, !registered);
|
||||
mReceiver = receiver;
|
||||
mContext = context;
|
||||
mActivityThread = activityThread;
|
||||
|
||||
Reference in New Issue
Block a user