Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c45f914 authored by Jatin Matani's avatar Jatin Matani
Browse files

Adds StatsUtil methods for LatinIME.on{Start,Create,Finish}inputView

Change-Id: I4e7dc008b98e398c38aafea5cb31156dde7f42ea
parent 97243cea
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -22,6 +22,10 @@ import com.android.inputmethod.latin.settings.SettingsValues;

public final class StatsUtils {

    private StatsUtils() {
        // Intentional empty constructor.
    }

    public static void onCreate(final SettingsValues settingsValues,
            RichInputMethodManager richImm) {
    }
@@ -50,4 +54,13 @@ public final class StatsUtils {

    public static void onRevertSwapPunctuation() {
    }

    public static void onFinishInputView() {
    }

    public static void onCreateInputView() {
    }

    public static void onStartInputView(int inputType, int displayOrientation, boolean restarting) {
    }
}
+7 −0
Original line number Diff line number Diff line
@@ -743,6 +743,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen

    @Override
    public View onCreateInputView() {
        StatsUtils.onCreateInputView();
        return mKeyboardSwitcher.onCreateInputView(mIsHardwareAcceleratedDrawingEnabled);
    }

@@ -775,6 +776,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen

    @Override
    public void onFinishInputView(final boolean finishingInput) {
        StatsUtils.onFinishInputView();
        mHandler.onFinishInputView(finishingInput);
    }

@@ -852,6 +854,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen

        final boolean inputTypeChanged = !currentSettingsValues.isSameInputType(editorInfo);
        final boolean isDifferentTextField = !restarting || inputTypeChanged;

        StatsUtils.onStartInputView(editorInfo.inputType,
                Settings.getInstance().getCurrent().mDisplayOrientation,
                !isDifferentTextField);

        if (isDifferentTextField) {
            mSubtypeSwitcher.updateParametersOnStartInputView();
        }