This source file includes following definitions.
- getInputMethodManager
- restartInput
- showSoftInput
- isActive
- hideSoftInputFromWindow
- updateSelection
- isWatchingCursor
- updateCursor
package org.chromium.content.browser.input;
import android.content.Context;
import android.os.IBinder;
import android.os.ResultReceiver;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
public class InputMethodManagerWrapper {
private final Context mContext;
public InputMethodManagerWrapper(Context context) {
mContext = context;
}
private InputMethodManager getInputMethodManager() {
return (InputMethodManager) mContext.getSystemService(Context.INPUT_METHOD_SERVICE);
}
public void restartInput(View view) {
getInputMethodManager().restartInput(view);
}
public void showSoftInput(View view, int flags, ResultReceiver resultReceiver) {
getInputMethodManager().showSoftInput(view, flags, resultReceiver);
}
public boolean isActive(View view) {
return getInputMethodManager().isActive(view);
}
public boolean hideSoftInputFromWindow(IBinder windowToken, int flags,
ResultReceiver resultReceiver) {
return getInputMethodManager().hideSoftInputFromWindow(windowToken, flags, resultReceiver);
}
public void updateSelection(View view, int selStart, int selEnd,
int candidatesStart, int candidatesEnd) {
getInputMethodManager().updateSelection(view, selStart, selEnd, candidatesStart,
candidatesEnd);
}
public boolean isWatchingCursor(View view) {
return getInputMethodManager().isWatchingCursor(view);
}
public void updateCursor(View view, int left, int top, int right, int bottom) {
getInputMethodManager().updateCursor(view, left, top, right, bottom);
}
}