FileDocCategorySizeDatePackage
InputMethodSubtypeSwitchingController.javaAPI DocAndroid 5.1 API23218Thu Mar 12 22:22:10 GMT 2015com.android.internal.inputmethod

InputMethodSubtypeSwitchingController

public class InputMethodSubtypeSwitchingController extends Object
InputMethodSubtypeSwitchingController controls the switching behavior of the subtypes.

This class is designed to be used from and only from {@link InputMethodManagerService} by using {@link InputMethodManagerService#mMethodMap} as a global lock.

Fields Summary
private static final String
TAG
private static final boolean
DEBUG
private static final int
NOT_A_SUBTYPE_ID
private final com.android.internal.inputmethod.InputMethodUtils.InputMethodSettings
mSettings
private InputMethodAndSubtypeList
mSubtypeList
private ControllerImpl
mController
Constructors Summary
private InputMethodSubtypeSwitchingController(com.android.internal.inputmethod.InputMethodUtils.InputMethodSettings settings, android.content.Context context)

        mSettings = settings;
        resetCircularListLocked(context);
    
Methods Summary
private static intcalculateSubtypeId(android.view.inputmethod.InputMethodInfo imi, android.view.inputmethod.InputMethodSubtype subtype)

        return subtype != null ? InputMethodUtils.getSubtypeIdFromHashCode(imi,
                subtype.hashCode()) : NOT_A_SUBTYPE_ID;
    
public static com.android.internal.inputmethod.InputMethodSubtypeSwitchingControllercreateInstanceLocked(com.android.internal.inputmethod.InputMethodUtils.InputMethodSettings settings, android.content.Context context)

        return new InputMethodSubtypeSwitchingController(settings, context);
    
public com.android.internal.inputmethod.InputMethodSubtypeSwitchingController$ImeSubtypeListItemgetNextInputMethodLocked(boolean onlyCurrentIme, android.view.inputmethod.InputMethodInfo imi, android.view.inputmethod.InputMethodSubtype subtype)

        if (mController == null) {
            if (DEBUG) {
                Log.e(TAG, "mController shouldn't be null.");
            }
            return null;
        }
        return mController.getNextInputMethod(onlyCurrentIme, imi, subtype);
    
public java.util.ListgetSortedInputMethodAndSubtypeListLocked(boolean showSubtypes, boolean inputShown, boolean isScreenLocked)

        return mSubtypeList.getSortedInputMethodAndSubtypeList(
                showSubtypes, inputShown, isScreenLocked);
    
public voidonUserActionLocked(android.view.inputmethod.InputMethodInfo imi, android.view.inputmethod.InputMethodSubtype subtype)

        if (mController == null) {
            if (DEBUG) {
                Log.e(TAG, "mController shouldn't be null.");
            }
            return;
        }
        mController.onUserActionLocked(imi, subtype);
    
public voidresetCircularListLocked(android.content.Context context)

        mSubtypeList = new InputMethodAndSubtypeList(context, mSettings);
        mController = ControllerImpl.createFrom(mController,
                mSubtypeList.getSortedInputMethodAndSubtypeList());