Search in sources :

Example 6 with IInputMethodManager

use of com.android.internal.view.IInputMethodManager in project android_frameworks_base by ParanoidAndroid.

the class InputMethodManager method getInstance.

/**
     * Retrieve the global InputMethodManager instance, creating it if it
     * doesn't already exist.
     * @hide
     */
public static InputMethodManager getInstance() {
    synchronized (InputMethodManager.class) {
        if (sInstance == null) {
            IBinder b = ServiceManager.getService(Context.INPUT_METHOD_SERVICE);
            IInputMethodManager service = IInputMethodManager.Stub.asInterface(b);
            sInstance = new InputMethodManager(service, Looper.getMainLooper());
        }
        return sInstance;
    }
}
Also used : IBinder(android.os.IBinder) IInputMethodManager(com.android.internal.view.IInputMethodManager) IInputMethodManager(com.android.internal.view.IInputMethodManager)

Example 7 with IInputMethodManager

use of com.android.internal.view.IInputMethodManager in project android_frameworks_base by DirtyUnicorns.

the class UiAutomatorTestCase method setDummyIme.

private void setDummyIme() throws RemoteException {
    IInputMethodManager im = IInputMethodManager.Stub.asInterface(ServiceManager.getService(Context.INPUT_METHOD_SERVICE));
    List<InputMethodInfo> infos = im.getInputMethodList();
    String id = null;
    for (InputMethodInfo info : infos) {
        if (DUMMY_IME_PACKAGE.equals(info.getComponent().getPackageName())) {
            id = info.getId();
        }
    }
    if (id == null) {
        throw new RuntimeException(String.format("Required testing fixture missing: IME package (%s)", DUMMY_IME_PACKAGE));
    }
    im.setInputMethod(null, id);
}
Also used : IInputMethodManager(com.android.internal.view.IInputMethodManager) InputMethodInfo(android.view.inputmethod.InputMethodInfo)

Example 8 with IInputMethodManager

use of com.android.internal.view.IInputMethodManager in project android_frameworks_base by AOSPA.

the class InputMethodManager method getInstance.

/**
     * Retrieve the global InputMethodManager instance, creating it if it
     * doesn't already exist.
     * @hide
     */
public static InputMethodManager getInstance() {
    synchronized (InputMethodManager.class) {
        if (sInstance == null) {
            IBinder b = ServiceManager.getService(Context.INPUT_METHOD_SERVICE);
            IInputMethodManager service = IInputMethodManager.Stub.asInterface(b);
            sInstance = new InputMethodManager(service, Looper.getMainLooper());
        }
        return sInstance;
    }
}
Also used : IBinder(android.os.IBinder) IInputMethodManager(com.android.internal.view.IInputMethodManager) IInputMethodManager(com.android.internal.view.IInputMethodManager)

Example 9 with IInputMethodManager

use of com.android.internal.view.IInputMethodManager in project android_frameworks_base by AOSPA.

the class UiAutomatorTestCase method setDummyIme.

private void setDummyIme() throws RemoteException {
    IInputMethodManager im = IInputMethodManager.Stub.asInterface(ServiceManager.getService(Context.INPUT_METHOD_SERVICE));
    List<InputMethodInfo> infos = im.getInputMethodList();
    String id = null;
    for (InputMethodInfo info : infos) {
        if (DUMMY_IME_PACKAGE.equals(info.getComponent().getPackageName())) {
            id = info.getId();
        }
    }
    if (id == null) {
        throw new RuntimeException(String.format("Required testing fixture missing: IME package (%s)", DUMMY_IME_PACKAGE));
    }
    im.setInputMethod(null, id);
}
Also used : IInputMethodManager(com.android.internal.view.IInputMethodManager) InputMethodInfo(android.view.inputmethod.InputMethodInfo)

Example 10 with IInputMethodManager

use of com.android.internal.view.IInputMethodManager in project android_frameworks_base by ResurrectionRemix.

the class UiAutomatorTestCase method setDummyIme.

private void setDummyIme() throws RemoteException {
    IInputMethodManager im = IInputMethodManager.Stub.asInterface(ServiceManager.getService(Context.INPUT_METHOD_SERVICE));
    List<InputMethodInfo> infos = im.getInputMethodList();
    String id = null;
    for (InputMethodInfo info : infos) {
        if (DUMMY_IME_PACKAGE.equals(info.getComponent().getPackageName())) {
            id = info.getId();
        }
    }
    if (id == null) {
        throw new RuntimeException(String.format("Required testing fixture missing: IME package (%s)", DUMMY_IME_PACKAGE));
    }
    im.setInputMethod(null, id);
}
Also used : IInputMethodManager(com.android.internal.view.IInputMethodManager) InputMethodInfo(android.view.inputmethod.InputMethodInfo)

Aggregations

IInputMethodManager (com.android.internal.view.IInputMethodManager)12 IBinder (android.os.IBinder)7 InputMethodInfo (android.view.inputmethod.InputMethodInfo)5