Merge "Fix issue #23361510: Increase assist timeout from 500ms to 1 second" into mnc-dev

This commit is contained in:
Dianne Hackborn
2015-08-20 01:56:02 +00:00
committed by Android (Google) Code Review

View File

@@ -10730,7 +10730,7 @@ public final class ActivityManagerService extends ActivityManagerNative
synchronized (this) { synchronized (this) {
buildAssistBundleLocked(pae, pae.result); buildAssistBundleLocked(pae, pae.result);
mPendingAssistExtras.remove(pae); mPendingAssistExtras.remove(pae);
mHandler.removeCallbacks(pae); mUiHandler.removeCallbacks(pae);
} }
return pae.extras; return pae.extras;
} }
@@ -10818,7 +10818,7 @@ public final class ActivityManagerService extends ActivityManagerNative
activity.app.thread.requestAssistContextExtras(activity.appToken, pae, activity.app.thread.requestAssistContextExtras(activity.appToken, pae,
requestType); requestType);
mPendingAssistExtras.add(pae); mPendingAssistExtras.add(pae);
mHandler.postDelayed(pae, timeout); mUiHandler.postDelayed(pae, timeout);
} catch (RemoteException e) { } catch (RemoteException e) {
Slog.w(TAG, "getAssistContextExtras failed: crash calling " + activity); Slog.w(TAG, "getAssistContextExtras failed: crash calling " + activity);
return null; return null;
@@ -10875,7 +10875,7 @@ public final class ActivityManagerService extends ActivityManagerNative
synchronized (this) { synchronized (this) {
buildAssistBundleLocked(pae, extras); buildAssistBundleLocked(pae, extras);
boolean exists = mPendingAssistExtras.remove(pae); boolean exists = mPendingAssistExtras.remove(pae);
mHandler.removeCallbacks(pae); mUiHandler.removeCallbacks(pae);
if (!exists) { if (!exists) {
// Timed out. // Timed out.
return; return;