Loading java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java +20 −15 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ import com.android.inputmethod.latin.StringUtils; import com.android.inputmethod.latin.SubtypeUtils; import com.android.inputmethod.latin.Utils; import com.android.inputmethod.latin.Utils.UsabilityStudyLogUtils; import com.android.inputmethod.latin.define.ProductionFlag; import java.util.Locale; import java.util.WeakHashMap; Loading Loading @@ -694,6 +695,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke + size + "," + pressure); } } if (ProductionFlag.IS_EXPERIMENTAL) { if (ResearchLogger.sIsLogging) { // TODO: remove redundant calculations of size and pressure by // removing UsabilityStudyLog code once the ResearchLogger is mature enough Loading @@ -701,8 +703,9 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke final float pressure = me.getPressure(index); if (action != MotionEvent.ACTION_MOVE) { // Skip ACTION_MOVE events as they are logged below ResearchLogger.getInstance().logMotionEvent(action, eventTime, id, x, y, size, pressure); ResearchLogger.getInstance().logMotionEvent(action, eventTime, id, x, y, size, pressure); } } } Loading Loading @@ -770,6 +773,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke + pointerId + "," + px + "," + py + "," + pointerSize + "," + pointerPressure); } if (ProductionFlag.IS_EXPERIMENTAL) { if (ResearchLogger.sIsLogging) { // TODO: earlier comment about redundant calculations applies here too final float pointerSize = me.getSize(i); Loading @@ -778,6 +782,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke px, py, pointerSize, pointerPressure); } } } } else { final PointerTracker tracker = PointerTracker.getPointerTracker(id, this); tracker.processMotionEvent(action, x, y, eventTime, this); Loading java/src/com/android/inputmethod/latin/LatinIME.java +8 −3 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ import com.android.inputmethod.keyboard.KeyboardSwitcher; import com.android.inputmethod.keyboard.KeyboardView; import com.android.inputmethod.keyboard.LatinKeyboardView; import com.android.inputmethod.latin.Utils.UsabilityStudyLogUtils; import com.android.inputmethod.latin.define.ProductionFlag; import com.android.inputmethod.latin.suggestions.SuggestionsView; import java.io.FileDescriptor; Loading Loading @@ -439,7 +440,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); mPrefs = prefs; LatinImeLogger.init(this, prefs); if (ProductionFlag.IS_EXPERIMENTAL) { ResearchLogger.init(this, prefs); } LanguageSwitcherProxy.init(this, prefs); InputMethodManagerCompatWrapper.init(this); SubtypeSwitcher.init(this); Loading Loading @@ -1264,9 +1267,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } mLastKeyTime = when; if (ProductionFlag.IS_EXPERIMENTAL) { if (ResearchLogger.sIsLogging) { ResearchLogger.getInstance().logKeyEvent(primaryCode, x, y); } } final KeyboardSwitcher switcher = mKeyboardSwitcher; // The space state depends only on the last character pressed and its own previous Loading java/src/com/android/inputmethod/latin/LatinImeLogger.java +0 −4 Original line number Diff line number Diff line Loading @@ -80,8 +80,4 @@ public class LatinImeLogger implements SharedPreferences.OnSharedPreferenceChang public static void onPrintAllUsabilityStudyLogs() { } public static boolean isResearcherPackage(Context context) { return false; } } java/src/com/android/inputmethod/latin/ResearchLogger.java +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ import java.util.Date; * This class logs operations on the IME keyboard, including what the user has typed. * Data is stored locally in a file in app-specific storage. * * This functionality is off by default. * This functionality is off by default. See {@link ProductionFlag.IS_EXPERIMENTAL}. */ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChangeListener { private static final String TAG = ResearchLogger.class.getSimpleName(); Loading java/src/com/android/inputmethod/latin/Settings.java +3 −3 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import com.android.inputmethod.compat.CompatUtils; import com.android.inputmethod.compat.InputMethodServiceCompatWrapper; import com.android.inputmethod.compat.VibratorCompatWrapper; import com.android.inputmethod.deprecated.VoiceProxy; import com.android.inputmethod.latin.define.ProductionFlag; import com.android.inputmethodcommon.InputMethodSettingsActivity; import java.util.Locale; Loading Loading @@ -238,17 +239,16 @@ public class Settings extends InputMethodSettingsActivity textCorrectionGroup.removePreference(dictionaryLink); } final boolean isResearcherPackage = LatinImeLogger.isResearcherPackage(this); final boolean showUsabilityStudyModeOption = res.getBoolean(R.bool.config_enable_usability_study_mode_option) || isResearcherPackage || ENABLE_EXPERIMENTAL_SETTINGS; || ProductionFlag.IS_EXPERIMENTAL || ENABLE_EXPERIMENTAL_SETTINGS; final Preference usabilityStudyPref = findPreference(PREF_USABILITY_STUDY_MODE); if (!showUsabilityStudyModeOption) { if (usabilityStudyPref != null) { miscSettings.removePreference(usabilityStudyPref); } } if (isResearcherPackage) { if (ProductionFlag.IS_EXPERIMENTAL) { if (usabilityStudyPref instanceof CheckBoxPreference) { CheckBoxPreference checkbox = (CheckBoxPreference)usabilityStudyPref; checkbox.setChecked(prefs.getBoolean(PREF_USABILITY_STUDY_MODE, true)); Loading Loading
java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java +20 −15 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ import com.android.inputmethod.latin.StringUtils; import com.android.inputmethod.latin.SubtypeUtils; import com.android.inputmethod.latin.Utils; import com.android.inputmethod.latin.Utils.UsabilityStudyLogUtils; import com.android.inputmethod.latin.define.ProductionFlag; import java.util.Locale; import java.util.WeakHashMap; Loading Loading @@ -694,6 +695,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke + size + "," + pressure); } } if (ProductionFlag.IS_EXPERIMENTAL) { if (ResearchLogger.sIsLogging) { // TODO: remove redundant calculations of size and pressure by // removing UsabilityStudyLog code once the ResearchLogger is mature enough Loading @@ -701,8 +703,9 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke final float pressure = me.getPressure(index); if (action != MotionEvent.ACTION_MOVE) { // Skip ACTION_MOVE events as they are logged below ResearchLogger.getInstance().logMotionEvent(action, eventTime, id, x, y, size, pressure); ResearchLogger.getInstance().logMotionEvent(action, eventTime, id, x, y, size, pressure); } } } Loading Loading @@ -770,6 +773,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke + pointerId + "," + px + "," + py + "," + pointerSize + "," + pointerPressure); } if (ProductionFlag.IS_EXPERIMENTAL) { if (ResearchLogger.sIsLogging) { // TODO: earlier comment about redundant calculations applies here too final float pointerSize = me.getSize(i); Loading @@ -778,6 +782,7 @@ public class LatinKeyboardView extends KeyboardView implements PointerTracker.Ke px, py, pointerSize, pointerPressure); } } } } else { final PointerTracker tracker = PointerTracker.getPointerTracker(id, this); tracker.processMotionEvent(action, x, y, eventTime, this); Loading
java/src/com/android/inputmethod/latin/LatinIME.java +8 −3 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ import com.android.inputmethod.keyboard.KeyboardSwitcher; import com.android.inputmethod.keyboard.KeyboardView; import com.android.inputmethod.keyboard.LatinKeyboardView; import com.android.inputmethod.latin.Utils.UsabilityStudyLogUtils; import com.android.inputmethod.latin.define.ProductionFlag; import com.android.inputmethod.latin.suggestions.SuggestionsView; import java.io.FileDescriptor; Loading Loading @@ -439,7 +440,9 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); mPrefs = prefs; LatinImeLogger.init(this, prefs); if (ProductionFlag.IS_EXPERIMENTAL) { ResearchLogger.init(this, prefs); } LanguageSwitcherProxy.init(this, prefs); InputMethodManagerCompatWrapper.init(this); SubtypeSwitcher.init(this); Loading Loading @@ -1264,9 +1267,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar } mLastKeyTime = when; if (ProductionFlag.IS_EXPERIMENTAL) { if (ResearchLogger.sIsLogging) { ResearchLogger.getInstance().logKeyEvent(primaryCode, x, y); } } final KeyboardSwitcher switcher = mKeyboardSwitcher; // The space state depends only on the last character pressed and its own previous Loading
java/src/com/android/inputmethod/latin/LatinImeLogger.java +0 −4 Original line number Diff line number Diff line Loading @@ -80,8 +80,4 @@ public class LatinImeLogger implements SharedPreferences.OnSharedPreferenceChang public static void onPrintAllUsabilityStudyLogs() { } public static boolean isResearcherPackage(Context context) { return false; } }
java/src/com/android/inputmethod/latin/ResearchLogger.java +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ import java.util.Date; * This class logs operations on the IME keyboard, including what the user has typed. * Data is stored locally in a file in app-specific storage. * * This functionality is off by default. * This functionality is off by default. See {@link ProductionFlag.IS_EXPERIMENTAL}. */ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChangeListener { private static final String TAG = ResearchLogger.class.getSimpleName(); Loading
java/src/com/android/inputmethod/latin/Settings.java +3 −3 Original line number Diff line number Diff line Loading @@ -46,6 +46,7 @@ import com.android.inputmethod.compat.CompatUtils; import com.android.inputmethod.compat.InputMethodServiceCompatWrapper; import com.android.inputmethod.compat.VibratorCompatWrapper; import com.android.inputmethod.deprecated.VoiceProxy; import com.android.inputmethod.latin.define.ProductionFlag; import com.android.inputmethodcommon.InputMethodSettingsActivity; import java.util.Locale; Loading Loading @@ -238,17 +239,16 @@ public class Settings extends InputMethodSettingsActivity textCorrectionGroup.removePreference(dictionaryLink); } final boolean isResearcherPackage = LatinImeLogger.isResearcherPackage(this); final boolean showUsabilityStudyModeOption = res.getBoolean(R.bool.config_enable_usability_study_mode_option) || isResearcherPackage || ENABLE_EXPERIMENTAL_SETTINGS; || ProductionFlag.IS_EXPERIMENTAL || ENABLE_EXPERIMENTAL_SETTINGS; final Preference usabilityStudyPref = findPreference(PREF_USABILITY_STUDY_MODE); if (!showUsabilityStudyModeOption) { if (usabilityStudyPref != null) { miscSettings.removePreference(usabilityStudyPref); } } if (isResearcherPackage) { if (ProductionFlag.IS_EXPERIMENTAL) { if (usabilityStudyPref instanceof CheckBoxPreference) { CheckBoxPreference checkbox = (CheckBoxPreference)usabilityStudyPref; checkbox.setChecked(prefs.getBoolean(PREF_USABILITY_STUDY_MODE, true)); Loading