blob: c0e9f58f3b8ef03627af59af905fbe2c30cff0d2 [file] [log] [blame]
Todd Kennedyb8a279e2015-11-18 09:59:47 -08001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.server.pm;
18
Patrick Baumann9c4aa5c2018-02-28 14:08:29 -080019import android.annotation.AnyThread;
20import android.annotation.WorkerThread;
Todd Kennedy1fb34042017-03-01 13:56:58 -080021import android.app.IInstantAppResolver;
22import android.app.InstantAppResolverService;
Todd Kennedyb8a279e2015-11-18 09:59:47 -080023import android.content.ComponentName;
24import android.content.Context;
25import android.content.Intent;
26import android.content.ServiceConnection;
Todd Kennedy1fb34042017-03-01 13:56:58 -080027import android.content.pm.InstantAppResolveInfo;
Tony Makf2645402017-05-12 16:11:43 +010028import android.os.Binder;
Todd Kennedyb8a279e2015-11-18 09:59:47 -080029import android.os.Build;
30import android.os.Bundle;
Todd Kennedy01ad0c72016-11-11 15:33:12 -080031import android.os.Handler;
Todd Kennedyb8a279e2015-11-18 09:59:47 -080032import android.os.IBinder;
Todd Kennedy16c3a3e2017-04-03 12:03:35 -070033import android.os.IBinder.DeathRecipient;
Todd Kennedyb8a279e2015-11-18 09:59:47 -080034import android.os.IRemoteCallback;
35import android.os.RemoteException;
36import android.os.SystemClock;
37import android.os.UserHandle;
Todd Kennedy7cf918e2017-04-10 15:10:56 -070038import android.util.Slog;
Todd Kennedyb8a279e2015-11-18 09:59:47 -080039import android.util.TimedRemoteCaller;
40
Todd Kennedy46b4f2b2017-04-21 12:20:03 -070041import com.android.internal.annotations.GuardedBy;
Patrick Baumann9c4aa5c2018-02-28 14:08:29 -080042import com.android.internal.os.BackgroundThread;
Jeff Sharkey850c83e2016-11-09 12:25:44 -070043
Todd Kennedyb8a279e2015-11-18 09:59:47 -080044import java.util.ArrayList;
45import java.util.List;
Todd Kennedy34f5b422017-05-03 16:38:44 -070046import java.util.NoSuchElementException;
Todd Kennedyb8a279e2015-11-18 09:59:47 -080047import java.util.concurrent.TimeoutException;
48
49/**
Patrick Baumann43c97a02018-01-31 20:09:03 +000050 * Represents a remote instant app resolver. It is responsible for binding to the remote
Todd Kennedyb8a279e2015-11-18 09:59:47 -080051 * service and handling all interactions in a timely manner.
52 * @hide
53 */
Patrick Baumann43c97a02018-01-31 20:09:03 +000054final class InstantAppResolverConnection implements DeathRecipient {
Todd Kennedy7cf918e2017-04-10 15:10:56 -070055 private static final String TAG = "PackageManager";
Todd Kennedyb8a279e2015-11-18 09:59:47 -080056 // This is running in a critical section and the timeout must be sufficiently low
57 private static final long BIND_SERVICE_TIMEOUT_MS =
Jeff Sharkey5ab02432017-06-27 11:01:36 -060058 Build.IS_ENG ? 500 : 300;
Todd Kennedy46b4f2b2017-04-21 12:20:03 -070059 private static final long CALL_SERVICE_TIMEOUT_MS =
Jeff Sharkey5ab02432017-06-27 11:01:36 -060060 Build.IS_ENG ? 200 : 100;
Patrick Baumann43c97a02018-01-31 20:09:03 +000061 private static final boolean DEBUG_INSTANT = Build.IS_DEBUGGABLE;
Todd Kennedyb8a279e2015-11-18 09:59:47 -080062
63 private final Object mLock = new Object();
Patrick Baumann43c97a02018-01-31 20:09:03 +000064 private final GetInstantAppResolveInfoCaller mGetInstantAppResolveInfoCaller =
65 new GetInstantAppResolveInfoCaller();
Todd Kennedyb8a279e2015-11-18 09:59:47 -080066 private final ServiceConnection mServiceConnection = new MyServiceConnection();
67 private final Context mContext;
68 /** Intent used to bind to the service */
69 private final Intent mIntent;
70
Snild Dolkowe2612eb2017-06-14 09:57:36 +020071 private static final int STATE_IDLE = 0; // no bind operation is ongoing
72 private static final int STATE_BINDING = 1; // someone is binding and waiting
73 private static final int STATE_PENDING = 2; // a bind is pending, but the caller is not waiting
Patrick Baumann9c4aa5c2018-02-28 14:08:29 -080074 private final Handler mBgHandler;
Snild Dolkowe2612eb2017-06-14 09:57:36 +020075
Todd Kennedy46b4f2b2017-04-21 12:20:03 -070076 @GuardedBy("mLock")
Snild Dolkowe2612eb2017-06-14 09:57:36 +020077 private int mBindState = STATE_IDLE;
Todd Kennedy46b4f2b2017-04-21 12:20:03 -070078 @GuardedBy("mLock")
Todd Kennedy1fb34042017-03-01 13:56:58 -080079 private IInstantAppResolver mRemoteInstance;
Todd Kennedyb8a279e2015-11-18 09:59:47 -080080
Patrick Baumann43c97a02018-01-31 20:09:03 +000081 public InstantAppResolverConnection(
Todd Kennedy02a6b732017-04-05 14:24:58 -070082 Context context, ComponentName componentName, String action) {
Todd Kennedyb8a279e2015-11-18 09:59:47 -080083 mContext = context;
Todd Kennedy02a6b732017-04-05 14:24:58 -070084 mIntent = new Intent(action).setComponent(componentName);
Patrick Baumann9c4aa5c2018-02-28 14:08:29 -080085 mBgHandler = BackgroundThread.getHandler();
Todd Kennedyb8a279e2015-11-18 09:59:47 -080086 }
87
Hai Zhangbfa4f902018-08-21 11:33:33 -070088 public List<InstantAppResolveInfo> getInstantAppResolveInfoList(Intent sanitizedIntent,
89 int[] hashPrefix, int userId, String token) throws ConnectionException {
Todd Kennedyb8a279e2015-11-18 09:59:47 -080090 throwIfCalledOnMainThread();
Todd Kennedy46b4f2b2017-04-21 12:20:03 -070091 IInstantAppResolver target = null;
Todd Kennedyb8a279e2015-11-18 09:59:47 -080092 try {
Todd Kennedybdf2a802017-05-08 16:09:42 -070093 try {
94 target = getRemoteInstanceLazy(token);
95 } catch (TimeoutException e) {
96 throw new ConnectionException(ConnectionException.FAILURE_BIND);
97 } catch (InterruptedException e) {
98 throw new ConnectionException(ConnectionException.FAILURE_INTERRUPTED);
99 }
100 try {
Patrick Baumann43c97a02018-01-31 20:09:03 +0000101 return mGetInstantAppResolveInfoCaller
Hai Zhangbfa4f902018-08-21 11:33:33 -0700102 .getInstantAppResolveInfoList(target, sanitizedIntent, hashPrefix, userId,
103 token);
Todd Kennedybdf2a802017-05-08 16:09:42 -0700104 } catch (TimeoutException e) {
Todd Kennedye6393c92017-05-16 15:47:01 -0700105 throw new ConnectionException(ConnectionException.FAILURE_CALL);
Todd Kennedybdf2a802017-05-08 16:09:42 -0700106 } catch (RemoteException ignore) {
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700107 }
Todd Kennedye5195dd2016-10-19 15:29:19 -0700108 } finally {
109 synchronized (mLock) {
110 mLock.notifyAll();
111 }
112 }
113 return null;
114 }
115
Hai Zhangbfa4f902018-08-21 11:33:33 -0700116 public void getInstantAppIntentFilterList(Intent sanitizedIntent, int[] hashPrefix, int userId,
Patrick Baumann577d4022018-01-31 16:55:10 +0000117 String token, PhaseTwoCallback callback, Handler callbackHandler, final long startTime)
118 throws ConnectionException {
Todd Kennedy01ad0c72016-11-11 15:33:12 -0800119 final IRemoteCallback remoteCallback = new IRemoteCallback.Stub() {
120 @Override
121 public void sendResult(Bundle data) throws RemoteException {
Todd Kennedy1fb34042017-03-01 13:56:58 -0800122 final ArrayList<InstantAppResolveInfo> resolveList =
123 data.getParcelableArrayList(
124 InstantAppResolverService.EXTRA_RESOLVE_INFO);
Patrick Baumann577d4022018-01-31 16:55:10 +0000125 callbackHandler.post(() -> callback.onPhaseTwoResolved(resolveList, startTime));
Todd Kennedy01ad0c72016-11-11 15:33:12 -0800126 }
127 };
Todd Kennedye5195dd2016-10-19 15:29:19 -0700128 try {
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700129 getRemoteInstanceLazy(token)
Hai Zhangbfa4f902018-08-21 11:33:33 -0700130 .getInstantAppIntentFilterList(sanitizedIntent, hashPrefix, userId, token,
Patrick Baumann577d4022018-01-31 16:55:10 +0000131 remoteCallback);
Todd Kennedybdf2a802017-05-08 16:09:42 -0700132 } catch (TimeoutException e) {
133 throw new ConnectionException(ConnectionException.FAILURE_BIND);
134 } catch (InterruptedException e) {
135 throw new ConnectionException(ConnectionException.FAILURE_INTERRUPTED);
136 } catch (RemoteException ignore) {
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800137 }
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800138 }
139
Patrick Baumann9c4aa5c2018-02-28 14:08:29 -0800140 @WorkerThread
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700141 private IInstantAppResolver getRemoteInstanceLazy(String token)
Todd Kennedybdf2a802017-05-08 16:09:42 -0700142 throws ConnectionException, TimeoutException, InterruptedException {
Snild Dolkowe2612eb2017-06-14 09:57:36 +0200143 long binderToken = Binder.clearCallingIdentity();
144 try {
145 return bind(token);
146 } finally {
147 Binder.restoreCallingIdentity(binderToken);
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800148 }
149 }
150
Andreas Gampea36dc622018-02-05 17:19:22 -0800151 @GuardedBy("mLock")
Todd Kennedybdf2a802017-05-08 16:09:42 -0700152 private void waitForBindLocked(String token) throws TimeoutException, InterruptedException {
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800153 final long startMillis = SystemClock.uptimeMillis();
Snild Dolkowe2612eb2017-06-14 09:57:36 +0200154 while (mBindState != STATE_IDLE) {
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800155 if (mRemoteInstance != null) {
156 break;
157 }
158 final long elapsedMillis = SystemClock.uptimeMillis() - startMillis;
159 final long remainingMillis = BIND_SERVICE_TIMEOUT_MS - elapsedMillis;
160 if (remainingMillis <= 0) {
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700161 throw new TimeoutException("[" + token + "] Didn't bind to resolver in time!");
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800162 }
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700163 mLock.wait(remainingMillis);
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800164 }
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700165 }
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800166
Patrick Baumann9c4aa5c2018-02-28 14:08:29 -0800167 @WorkerThread
Snild Dolkowe2612eb2017-06-14 09:57:36 +0200168 private IInstantAppResolver bind(String token)
Todd Kennedybdf2a802017-05-08 16:09:42 -0700169 throws ConnectionException, TimeoutException, InterruptedException {
Snild Dolkowe2612eb2017-06-14 09:57:36 +0200170 boolean doUnbind = false;
171 synchronized (mLock) {
172 if (mRemoteInstance != null) {
173 return mRemoteInstance;
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700174 }
Snild Dolkowe2612eb2017-06-14 09:57:36 +0200175
176 if (mBindState == STATE_PENDING) {
177 // there is a pending bind, let's see if we can use it.
Patrick Baumann43c97a02018-01-31 20:09:03 +0000178 if (DEBUG_INSTANT) {
Snild Dolkowe2612eb2017-06-14 09:57:36 +0200179 Slog.i(TAG, "[" + token + "] Previous bind timed out; waiting for connection");
180 }
181 try {
182 waitForBindLocked(token);
183 if (mRemoteInstance != null) {
184 return mRemoteInstance;
185 }
186 } catch (TimeoutException e) {
187 // nope, we might have to try a rebind.
188 doUnbind = true;
189 }
190 }
191
192 if (mBindState == STATE_BINDING) {
193 // someone was binding when we called bind(), or they raced ahead while we were
194 // waiting in the PENDING case; wait for their result instead. Last chance!
Patrick Baumann43c97a02018-01-31 20:09:03 +0000195 if (DEBUG_INSTANT) {
Snild Dolkowe2612eb2017-06-14 09:57:36 +0200196 Slog.i(TAG, "[" + token + "] Another thread is binding; waiting for connection");
197 }
198 waitForBindLocked(token);
199 // if the other thread's bindService() returned false, we could still have null.
200 if (mRemoteInstance != null) {
201 return mRemoteInstance;
202 }
203 throw new ConnectionException(ConnectionException.FAILURE_BIND);
204 }
205 mBindState = STATE_BINDING; // our time to shine! :)
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700206 }
Snild Dolkowe2612eb2017-06-14 09:57:36 +0200207
208 // only one thread can be here at a time (the one that set STATE_BINDING)
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700209 boolean wasBound = false;
Snild Dolkowe2612eb2017-06-14 09:57:36 +0200210 IInstantAppResolver instance = null;
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700211 try {
Snild Dolkowe2612eb2017-06-14 09:57:36 +0200212 if (doUnbind) {
Patrick Baumann43c97a02018-01-31 20:09:03 +0000213 if (DEBUG_INSTANT) {
Snild Dolkowe2612eb2017-06-14 09:57:36 +0200214 Slog.i(TAG, "[" + token + "] Previous connection never established; rebinding");
215 }
216 mContext.unbindService(mServiceConnection);
217 }
Patrick Baumann43c97a02018-01-31 20:09:03 +0000218 if (DEBUG_INSTANT) {
Snild Dolkowe2612eb2017-06-14 09:57:36 +0200219 Slog.v(TAG, "[" + token + "] Binding to instant app resolver");
220 }
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700221 final int flags = Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE;
222 wasBound = mContext
223 .bindServiceAsUser(mIntent, mServiceConnection, flags, UserHandle.SYSTEM);
224 if (wasBound) {
Snild Dolkowe2612eb2017-06-14 09:57:36 +0200225 synchronized (mLock) {
226 waitForBindLocked(token);
227 instance = mRemoteInstance;
228 return instance;
229 }
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700230 } else {
231 Slog.w(TAG, "[" + token + "] Failed to bind to: " + mIntent);
Todd Kennedybdf2a802017-05-08 16:09:42 -0700232 throw new ConnectionException(ConnectionException.FAILURE_BIND);
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700233 }
234 } finally {
Snild Dolkowe2612eb2017-06-14 09:57:36 +0200235 synchronized (mLock) {
236 if (wasBound && instance == null) {
237 mBindState = STATE_PENDING;
238 } else {
239 mBindState = STATE_IDLE;
240 }
241 mLock.notifyAll();
242 }
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700243 }
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800244 }
245
246 private void throwIfCalledOnMainThread() {
247 if (Thread.currentThread() == mContext.getMainLooper().getThread()) {
248 throw new RuntimeException("Cannot invoke on the main thread");
249 }
250 }
251
Patrick Baumann9c4aa5c2018-02-28 14:08:29 -0800252 @AnyThread
253 void optimisticBind() {
254 mBgHandler.post(() -> {
255 try {
256 if (bind("Optimistic Bind") != null && DEBUG_INSTANT) {
257 Slog.i(TAG, "Optimistic bind succeeded.");
258 }
259 } catch (ConnectionException | TimeoutException | InterruptedException e) {
260 Slog.e(TAG, "Optimistic bind failed.", e);
261 }
262 });
263 }
264
Todd Kennedy16c3a3e2017-04-03 12:03:35 -0700265 @Override
266 public void binderDied() {
Patrick Baumann43c97a02018-01-31 20:09:03 +0000267 if (DEBUG_INSTANT) {
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700268 Slog.d(TAG, "Binder to instant app resolver died");
Todd Kennedy7cf918e2017-04-10 15:10:56 -0700269 }
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700270 synchronized (mLock) {
271 handleBinderDiedLocked();
272 }
Patrick Baumann9c4aa5c2018-02-28 14:08:29 -0800273 optimisticBind();
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700274 }
275
Andreas Gampea36dc622018-02-05 17:19:22 -0800276 @GuardedBy("mLock")
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700277 private void handleBinderDiedLocked() {
Todd Kennedy16c3a3e2017-04-03 12:03:35 -0700278 if (mRemoteInstance != null) {
Todd Kennedy34f5b422017-05-03 16:38:44 -0700279 try {
280 mRemoteInstance.asBinder().unlinkToDeath(this, 0 /*flags*/);
281 } catch (NoSuchElementException ignore) { }
Todd Kennedy16c3a3e2017-04-03 12:03:35 -0700282 }
283 mRemoteInstance = null;
Todd Kennedy16c3a3e2017-04-03 12:03:35 -0700284 }
285
Todd Kennedy01ad0c72016-11-11 15:33:12 -0800286 /**
287 * Asynchronous callback when results come back from ephemeral resolution phase two.
288 */
289 public abstract static class PhaseTwoCallback {
Todd Kennedy1fb34042017-03-01 13:56:58 -0800290 abstract void onPhaseTwoResolved(
Todd Kennedy50d946c12017-03-17 13:55:38 -0700291 List<InstantAppResolveInfo> instantAppResolveInfoList, long startTime);
Todd Kennedy01ad0c72016-11-11 15:33:12 -0800292 }
293
Todd Kennedybdf2a802017-05-08 16:09:42 -0700294 public static class ConnectionException extends Exception {
295 public static final int FAILURE_BIND = 1;
296 public static final int FAILURE_CALL = 2;
297 public static final int FAILURE_INTERRUPTED = 3;
298
299 public final int failure;
300 public ConnectionException(int _failure) {
301 failure = _failure;
302 }
303 }
304
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800305 private final class MyServiceConnection implements ServiceConnection {
306 @Override
307 public void onServiceConnected(ComponentName name, IBinder service) {
Patrick Baumann43c97a02018-01-31 20:09:03 +0000308 if (DEBUG_INSTANT) {
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700309 Slog.d(TAG, "Connected to instant app resolver");
Todd Kennedy7cf918e2017-04-10 15:10:56 -0700310 }
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800311 synchronized (mLock) {
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700312 mRemoteInstance = IInstantAppResolver.Stub.asInterface(service);
Snild Dolkowe2612eb2017-06-14 09:57:36 +0200313 if (mBindState == STATE_PENDING) {
314 mBindState = STATE_IDLE;
315 }
Todd Kennedy16c3a3e2017-04-03 12:03:35 -0700316 try {
Patrick Baumann43c97a02018-01-31 20:09:03 +0000317 service.linkToDeath(InstantAppResolverConnection.this, 0 /*flags*/);
Todd Kennedy16c3a3e2017-04-03 12:03:35 -0700318 } catch (RemoteException e) {
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700319 handleBinderDiedLocked();
Todd Kennedy16c3a3e2017-04-03 12:03:35 -0700320 }
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800321 mLock.notifyAll();
322 }
323 }
324
325 @Override
326 public void onServiceDisconnected(ComponentName name) {
Patrick Baumann43c97a02018-01-31 20:09:03 +0000327 if (DEBUG_INSTANT) {
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700328 Slog.d(TAG, "Disconnected from instant app resolver");
Todd Kennedy7cf918e2017-04-10 15:10:56 -0700329 }
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800330 synchronized (mLock) {
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700331 handleBinderDiedLocked();
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800332 }
333 }
334 }
335
Patrick Baumann43c97a02018-01-31 20:09:03 +0000336 private static final class GetInstantAppResolveInfoCaller
Todd Kennedy1fb34042017-03-01 13:56:58 -0800337 extends TimedRemoteCaller<List<InstantAppResolveInfo>> {
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800338 private final IRemoteCallback mCallback;
339
Patrick Baumann43c97a02018-01-31 20:09:03 +0000340 public GetInstantAppResolveInfoCaller() {
Todd Kennedy46b4f2b2017-04-21 12:20:03 -0700341 super(CALL_SERVICE_TIMEOUT_MS);
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800342 mCallback = new IRemoteCallback.Stub() {
343 @Override
344 public void sendResult(Bundle data) throws RemoteException {
Todd Kennedy1fb34042017-03-01 13:56:58 -0800345 final ArrayList<InstantAppResolveInfo> resolveList =
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800346 data.getParcelableArrayList(
Todd Kennedy1fb34042017-03-01 13:56:58 -0800347 InstantAppResolverService.EXTRA_RESOLVE_INFO);
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800348 int sequence =
Todd Kennedy1fb34042017-03-01 13:56:58 -0800349 data.getInt(InstantAppResolverService.EXTRA_SEQUENCE, -1);
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800350 onRemoteMethodResult(resolveList, sequence);
351 }
352 };
353 }
354
Patrick Baumann43c97a02018-01-31 20:09:03 +0000355 public List<InstantAppResolveInfo> getInstantAppResolveInfoList(
Hai Zhangbfa4f902018-08-21 11:33:33 -0700356 IInstantAppResolver target, Intent sanitizedIntent, int[] hashPrefix, int userId,
357 String token) throws RemoteException, TimeoutException {
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800358 final int sequence = onBeforeRemoteCall();
Hai Zhangbfa4f902018-08-21 11:33:33 -0700359 target.getInstantAppResolveInfoList(sanitizedIntent, hashPrefix, userId, token,
360 sequence, mCallback);
Todd Kennedye5195dd2016-10-19 15:29:19 -0700361 return getResultTimed(sequence);
362 }
363 }
Todd Kennedyb8a279e2015-11-18 09:59:47 -0800364}