Merge "Fix minor style issues in InputMethodService"
This commit is contained in:
committed by
Android (Google) Code Review
commit
04c263b99a
@@ -195,15 +195,14 @@ class IInputMethodWrapper extends IInputMethod.Stub
|
||||
case DO_START_INPUT: {
|
||||
final SomeArgs args = (SomeArgs) msg.obj;
|
||||
final IBinder startInputToken = (IBinder) args.arg1;
|
||||
final IRemoteInputConnection remoteIc =
|
||||
(IRemoteInputConnection) ((SomeArgs) args.arg2).arg1;
|
||||
final ImeOnBackInvokedDispatcher imeDispatcher =
|
||||
(ImeOnBackInvokedDispatcher) ((SomeArgs) args.arg2).arg2;
|
||||
final IRemoteInputConnection remoteIc = (IRemoteInputConnection) args.arg2;
|
||||
final EditorInfo info = (EditorInfo) args.arg3;
|
||||
final CancellationGroup cancellationGroup = (CancellationGroup) args.arg4;
|
||||
final boolean restarting = args.argi5 == 1;
|
||||
final ImeOnBackInvokedDispatcher imeDispatcher =
|
||||
(ImeOnBackInvokedDispatcher) args.arg4;
|
||||
final CancellationGroup cancellationGroup = (CancellationGroup) args.arg5;
|
||||
final boolean restarting = args.argi1 == 1;
|
||||
@InputMethodNavButtonFlags
|
||||
final int navButtonFlags = args.argi6;
|
||||
final int navButtonFlags = args.argi2;
|
||||
final InputConnection ic = remoteIc != null
|
||||
? new RemoteInputConnection(mTarget, remoteIc, cancellationGroup)
|
||||
: null;
|
||||
@@ -359,11 +358,15 @@ class IInputMethodWrapper extends IInputMethod.Stub
|
||||
Log.e(TAG, "startInput must be called after bindInput.");
|
||||
mCancellationGroup = new CancellationGroup();
|
||||
}
|
||||
SomeArgs args = SomeArgs.obtain();
|
||||
args.arg1 = inputConnection;
|
||||
args.arg2 = imeDispatcher;
|
||||
mCaller.executeOrSendMessage(mCaller.obtainMessageOOOOII(DO_START_INPUT, startInputToken,
|
||||
args, attribute, mCancellationGroup, restarting ? 1 : 0, navButtonFlags));
|
||||
final SomeArgs args = SomeArgs.obtain();
|
||||
args.arg1 = startInputToken;
|
||||
args.arg2 = inputConnection;
|
||||
args.arg3 = attribute;
|
||||
args.argi1 = restarting ? 1 : 0;
|
||||
args.argi2 = navButtonFlags;
|
||||
args.arg4 = imeDispatcher;
|
||||
args.arg5 = mCancellationGroup;
|
||||
mCaller.executeOrSendMessage(mCaller.obtainMessageO(DO_START_INPUT, args));
|
||||
}
|
||||
|
||||
@BinderThread
|
||||
|
||||
@@ -366,7 +366,7 @@ public class InputMethodService extends AbstractInputMethodService {
|
||||
**/
|
||||
private RingBuffer<MotionEvent> mPendingEvents;
|
||||
private ImeOnBackInvokedDispatcher mImeDispatcher;
|
||||
private Boolean mBackCallbackRegistered = false;
|
||||
private boolean mBackCallbackRegistered = false;
|
||||
private final CompatOnBackInvokedCallback mCompatBackCallback = this::compatHandleBack;
|
||||
private Runnable mImeSurfaceRemoverRunnable;
|
||||
private Runnable mFinishHwRunnable;
|
||||
|
||||
@@ -233,7 +233,7 @@ public interface InputMethod {
|
||||
* long as your implementation of {@link InputMethod} relies on such
|
||||
* IPCs
|
||||
* @param navButtonFlags {@link InputMethodNavButtonFlags} in the initial state of this session.
|
||||
* @param imeDispatcher The {@link ImeOnBackInvokedDispatcher }} to be set on the
|
||||
* @param imeDispatcher The {@link ImeOnBackInvokedDispatcher} to be set on the
|
||||
* IME's {@link android.window.WindowOnBackInvokedDispatcher}, so that IME
|
||||
* {@link android.window.OnBackInvokedCallback}s can be forwarded to
|
||||
* the client requesting to start input.
|
||||
|
||||
Reference in New Issue
Block a user