Merge "Fix a regression in assist when context is disabled" into nyc-dev am: c3c45fa
am: 40411c1
* commit '40411c158c8b071ba9175f514b1fa370ff438cc5':
Fix a regression in assist when context is disabled
Change-Id: I5beebccebd76317f06e545bbea57e999b8cdbe06
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