Merge "Fix a regression in assist when context is disabled" into nyc-dev
am: c3c45fa * commit 'c3c45fa2e0c5779e3e847dd4878c2a9d1ba2fb36': Fix a regression in assist when context is disabled Change-Id: I6209180e67e91ac264e50be957d87c2d897bcc3c
This commit is contained in:
@@ -370,20 +370,28 @@ final class VoiceInteractionSessionConnection implements ServiceConnection {
|
||||
}
|
||||
if (mHaveAssistData) {
|
||||
AssistDataForActivity assistData;
|
||||
while (!mAssistData.isEmpty()) {
|
||||
if (mPendingAssistDataCount <= 0) {
|
||||
Slog.e(TAG, "mPendingAssistDataCount is " + mPendingAssistDataCount);
|
||||
if (mAssistData.isEmpty()) {
|
||||
// We're not actually going to get any data, deliver some nothing
|
||||
try {
|
||||
mSession.handleAssist(null, null, null, 0, 0);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
mPendingAssistDataCount--;
|
||||
assistData = mAssistData.remove(0);
|
||||
if (assistData.data == null) {
|
||||
try {
|
||||
mSession.handleAssist(null, null, null, assistData.activityIndex,
|
||||
assistData.activityCount);
|
||||
} catch (RemoteException e) {
|
||||
} else {
|
||||
while (!mAssistData.isEmpty()) {
|
||||
if (mPendingAssistDataCount <= 0) {
|
||||
Slog.e(TAG, "mPendingAssistDataCount is " + mPendingAssistDataCount);
|
||||
}
|
||||
mPendingAssistDataCount--;
|
||||
assistData = mAssistData.remove(0);
|
||||
if (assistData.data == null) {
|
||||
try {
|
||||
mSession.handleAssist(null, null, null, assistData.activityIndex,
|
||||
assistData.activityCount);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
} else {
|
||||
deliverSessionDataLocked(assistData);
|
||||
}
|
||||
} else {
|
||||
deliverSessionDataLocked(assistData);
|
||||
}
|
||||
}
|
||||
if (mPendingAssistDataCount <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user