diff options
| author | Amith Yamasani <yamasani@google.com> | 2016-05-10 11:44:12 -0700 |
|---|---|---|
| committer | Amith Yamasani <yamasani@google.com> | 2016-05-10 12:17:51 -0700 |
| commit | 4f128e4d968b376bb7c3fa209d27b0a30202e604 (patch) | |
| tree | f38e03e4a1e0d2df79bd6e22b039e8f11ef50338 /core/java/android/app/ApplicationThreadNative.java | |
| parent | 01da140aced14162d6d1bf4a0b2bf33e23b9c2c4 (diff) | |
Fix multi-window assiststructure trashing
When multiple activities within the same process
try to handle requests for AssistStructure, the
singleton mLastAssistStructure tends to trash
the old structure when a second window's request
comes in.
This change passes in a sessionId so that the
cache is only cleared if the session id changes.
Bug: 28348867
Change-Id: I07efcd933db7e48aefd25a1c95493b71bbcffe4b
Diffstat (limited to 'core/java/android/app/ApplicationThreadNative.java')
| -rw-r--r-- | core/java/android/app/ApplicationThreadNative.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java index ea86dd0558d6..d6da3f44f4a0 100644 --- a/core/java/android/app/ApplicationThreadNative.java +++ b/core/java/android/app/ApplicationThreadNative.java @@ -621,7 +621,8 @@ public abstract class ApplicationThreadNative extends Binder IBinder activityToken = data.readStrongBinder(); IBinder requestToken = data.readStrongBinder(); int requestType = data.readInt(); - requestAssistContextExtras(activityToken, requestToken, requestType); + int sessionId = data.readInt(); + requestAssistContextExtras(activityToken, requestToken, requestType, sessionId); reply.writeNoException(); return true; } @@ -1377,12 +1378,13 @@ class ApplicationThreadProxy implements IApplicationThread { @Override public void requestAssistContextExtras(IBinder activityToken, IBinder requestToken, - int requestType) throws RemoteException { + int requestType, int sessionId) throws RemoteException { Parcel data = Parcel.obtain(); data.writeInterfaceToken(IApplicationThread.descriptor); data.writeStrongBinder(activityToken); data.writeStrongBinder(requestToken); data.writeInt(requestType); + data.writeInt(sessionId); mRemote.transact(REQUEST_ASSIST_CONTEXT_EXTRAS_TRANSACTION, data, null, IBinder.FLAG_ONEWAY); data.recycle(); |
