Check MissingMethodFlags.COMMIT_CORRECTION at the right place
This is a follow up CL to my previous CL [1], which aimed to put an
early-exit check for
InputConnection#commitCorrection(CorrectionInfo)
but mistakenly put it in
InputConnection#commitCompletion(CompletionInfo).
With this CL the early-exit check will be placed at the right place.
[1]: I3c58fadd924fad72cb984f0c23d3099fd0295c64
19a80a1e80
Fix: 193907158
Test: atest CtsInputMethodTestCases:InputConnectionEndToEndTest
Change-Id: I497628165072c73d0e279f89afe0d8730531ecfc
This commit is contained in:
@@ -247,15 +247,15 @@ final class RemoteInputConnection implements InputConnection {
|
||||
|
||||
@AnyThread
|
||||
public boolean commitCompletion(CompletionInfo text) {
|
||||
if (isMethodMissing(MissingMethodFlags.COMMIT_CORRECTION)) {
|
||||
// This method is not implemented.
|
||||
return false;
|
||||
}
|
||||
return mInvoker.commitCompletion(text);
|
||||
}
|
||||
|
||||
@AnyThread
|
||||
public boolean commitCorrection(CorrectionInfo correctionInfo) {
|
||||
if (isMethodMissing(MissingMethodFlags.COMMIT_CORRECTION)) {
|
||||
// This method is not implemented.
|
||||
return false;
|
||||
}
|
||||
return mInvoker.commitCorrection(correctionInfo);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user