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

main
Jatin Matani 2014-09-11 03:14:57 +00:00 committed by Android (Google) Code Review
commit fd96928175
2 changed files with 20 additions and 0 deletions

View File

@ -22,6 +22,10 @@ import com.android.inputmethod.latin.settings.SettingsValues;
public final class StatsUtils { public final class StatsUtils {
private StatsUtils() {
// Intentional empty constructor.
}
public static void onCreate(final SettingsValues settingsValues, public static void onCreate(final SettingsValues settingsValues,
RichInputMethodManager richImm) { RichInputMethodManager richImm) {
} }
@ -50,4 +54,13 @@ public final class StatsUtils {
public static void onRevertSwapPunctuation() { public static void onRevertSwapPunctuation() {
} }
public static void onFinishInputView() {
}
public static void onCreateInputView() {
}
public static void onStartInputView(int inputType, int displayOrientation, boolean restarting) {
}
} }

View File

@ -740,6 +740,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
@Override @Override
public View onCreateInputView() { public View onCreateInputView() {
StatsUtils.onCreateInputView();
return mKeyboardSwitcher.onCreateInputView(mIsHardwareAcceleratedDrawingEnabled); return mKeyboardSwitcher.onCreateInputView(mIsHardwareAcceleratedDrawingEnabled);
} }
@ -772,6 +773,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
@Override @Override
public void onFinishInputView(final boolean finishingInput) { public void onFinishInputView(final boolean finishingInput) {
StatsUtils.onFinishInputView();
mHandler.onFinishInputView(finishingInput); mHandler.onFinishInputView(finishingInput);
} }
@ -849,6 +851,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
final boolean inputTypeChanged = !currentSettingsValues.isSameInputType(editorInfo); final boolean inputTypeChanged = !currentSettingsValues.isSameInputType(editorInfo);
final boolean isDifferentTextField = !restarting || inputTypeChanged; final boolean isDifferentTextField = !restarting || inputTypeChanged;
StatsUtils.onStartInputView(editorInfo.inputType,
Settings.getInstance().getCurrent().mDisplayOrientation,
!isDifferentTextField);
if (isDifferentTextField) { if (isDifferentTextField) {
mSubtypeSwitcher.updateParametersOnStartInputView(); mSubtypeSwitcher.updateParametersOnStartInputView();
} }