[IL41] Remove a useless call and trampoline.

No point in calling maybeRetrieveOlderSuggestions now that the
same work is done right here. The callback is also useless now.

Bug: 8636060
Change-Id: Ic14849cb6f6e6293a42cfe068f5c6b18b7677bc0
main
Jean Chalard 2013-12-24 22:46:03 +09:00
parent be147f1fdc
commit 70433efc41
1 changed files with 14 additions and 14 deletions

View File

@ -1377,20 +1377,20 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private void getSuggestedWordsGestureLocked(final InputPointers batchPointers, private void getSuggestedWordsGestureLocked(final InputPointers batchPointers,
final int sequenceNumber, final OnGetSuggestedWordsCallback callback) { final int sequenceNumber, final OnGetSuggestedWordsCallback callback) {
mLatinIme.mInputLogic.mWordComposer.setBatchInputPointers(batchPointers); mLatinIme.mInputLogic.mWordComposer.setBatchInputPointers(batchPointers);
mLatinIme.getSuggestedWordsOrOlderSuggestionsAsync(Suggest.SESSION_GESTURE, getSuggestedWords(Suggest.SESSION_GESTURE, sequenceNumber,
sequenceNumber, new OnGetSuggestedWordsCallback() { new OnGetSuggestedWordsCallback() {
@Override @Override
public void onGetSuggestedWords(SuggestedWords suggestedWords) { public void onGetSuggestedWords(SuggestedWords suggestedWords) {
if (suggestedWords.isEmpty()) { if (suggestedWords.isEmpty()) {
// Previous suggestions are found in InputLogic#mSuggestedWords. Since // Previous suggestions are found in InputLogic#mSuggestedWords.
// these are the most recent suggestions and we just recomputed new // Since these are the most recent ones and we just recomputed new
// ones to update them, it means the previous ones are there. // ones to update them, it means the previous ones are there.
callback.onGetSuggestedWords(mLatinIme.mInputLogic.mSuggestedWords); callback.onGetSuggestedWords(mLatinIme.mInputLogic.mSuggestedWords);
} else { } else {
callback.onGetSuggestedWords(suggestedWords); callback.onGetSuggestedWords(suggestedWords);
} }
} }
}); });
} }
public void getSuggestedWords(final int sessionId, final int sequenceNumber, public void getSuggestedWords(final int sessionId, final int sequenceNumber,