ResearchLog refactor
- new package: com.android.inputmethod.research multi-project commit with Ic0a5744f3160d13218addd589890623c0d120ffc Bug: 6188932 Change-Id: Icf8d4a40a5725401799be6e209a640d99a5f34c4
This commit is contained in:
parent
7519091f7c
commit
6b966160ac
10 changed files with 22 additions and 12 deletions
|
@ -44,7 +44,7 @@
|
||||||
<init>(...);
|
<init>(...);
|
||||||
}
|
}
|
||||||
|
|
||||||
-keep class com.android.inputmethod.latin.ResearchLogger {
|
-keep class com.android.inputmethod.research.ResearchLogger {
|
||||||
void flush();
|
void flush();
|
||||||
void publishCurrentLogUnit(...);
|
void publishCurrentLogUnit(...);
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,13 +47,13 @@ import com.android.inputmethod.latin.Constants;
|
||||||
import com.android.inputmethod.latin.LatinIME;
|
import com.android.inputmethod.latin.LatinIME;
|
||||||
import com.android.inputmethod.latin.LatinImeLogger;
|
import com.android.inputmethod.latin.LatinImeLogger;
|
||||||
import com.android.inputmethod.latin.R;
|
import com.android.inputmethod.latin.R;
|
||||||
import com.android.inputmethod.latin.ResearchLogger;
|
|
||||||
import com.android.inputmethod.latin.StaticInnerHandlerWrapper;
|
import com.android.inputmethod.latin.StaticInnerHandlerWrapper;
|
||||||
import com.android.inputmethod.latin.StringUtils;
|
import com.android.inputmethod.latin.StringUtils;
|
||||||
import com.android.inputmethod.latin.SubtypeLocale;
|
import com.android.inputmethod.latin.SubtypeLocale;
|
||||||
import com.android.inputmethod.latin.Utils;
|
import com.android.inputmethod.latin.Utils;
|
||||||
import com.android.inputmethod.latin.Utils.UsabilityStudyLogUtils;
|
import com.android.inputmethod.latin.Utils.UsabilityStudyLogUtils;
|
||||||
import com.android.inputmethod.latin.define.ProductionFlag;
|
import com.android.inputmethod.latin.define.ProductionFlag;
|
||||||
|
import com.android.inputmethod.research.ResearchLogger;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.WeakHashMap;
|
import java.util.WeakHashMap;
|
||||||
|
|
|
@ -30,8 +30,8 @@ import com.android.inputmethod.keyboard.internal.GestureStroke;
|
||||||
import com.android.inputmethod.keyboard.internal.PointerTrackerQueue;
|
import com.android.inputmethod.keyboard.internal.PointerTrackerQueue;
|
||||||
import com.android.inputmethod.latin.InputPointers;
|
import com.android.inputmethod.latin.InputPointers;
|
||||||
import com.android.inputmethod.latin.LatinImeLogger;
|
import com.android.inputmethod.latin.LatinImeLogger;
|
||||||
import com.android.inputmethod.latin.ResearchLogger;
|
|
||||||
import com.android.inputmethod.latin.define.ProductionFlag;
|
import com.android.inputmethod.latin.define.ProductionFlag;
|
||||||
|
import com.android.inputmethod.research.ResearchLogger;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,9 @@ import android.view.MotionEvent;
|
||||||
|
|
||||||
import com.android.inputmethod.latin.LatinImeLogger;
|
import com.android.inputmethod.latin.LatinImeLogger;
|
||||||
import com.android.inputmethod.latin.R;
|
import com.android.inputmethod.latin.R;
|
||||||
import com.android.inputmethod.latin.ResearchLogger;
|
|
||||||
import com.android.inputmethod.latin.Utils;
|
import com.android.inputmethod.latin.Utils;
|
||||||
import com.android.inputmethod.latin.define.ProductionFlag;
|
import com.android.inputmethod.latin.define.ProductionFlag;
|
||||||
|
import com.android.inputmethod.research.ResearchLogger;
|
||||||
|
|
||||||
public class SuddenJumpingTouchEventHandler {
|
public class SuddenJumpingTouchEventHandler {
|
||||||
private static final String TAG = SuddenJumpingTouchEventHandler.class.getSimpleName();
|
private static final String TAG = SuddenJumpingTouchEventHandler.class.getSimpleName();
|
||||||
|
|
|
@ -71,6 +71,7 @@ import com.android.inputmethod.keyboard.LatinKeyboardView;
|
||||||
import com.android.inputmethod.latin.LocaleUtils.RunInLocale;
|
import com.android.inputmethod.latin.LocaleUtils.RunInLocale;
|
||||||
import com.android.inputmethod.latin.define.ProductionFlag;
|
import com.android.inputmethod.latin.define.ProductionFlag;
|
||||||
import com.android.inputmethod.latin.suggestions.SuggestionsView;
|
import com.android.inputmethod.latin.suggestions.SuggestionsView;
|
||||||
|
import com.android.inputmethod.research.ResearchLogger;
|
||||||
|
|
||||||
import java.io.FileDescriptor;
|
import java.io.FileDescriptor;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
|
@ -2159,7 +2160,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
showOptionDialog(builder.create());
|
showOptionDialog(builder.create());
|
||||||
}
|
}
|
||||||
|
|
||||||
/* package */ void showOptionDialog(AlertDialog dialog) {
|
public void showOptionDialog(AlertDialog dialog) {
|
||||||
final IBinder windowToken = mKeyboardSwitcher.getKeyboardView().getWindowToken();
|
final IBinder windowToken = mKeyboardSwitcher.getKeyboardView().getWindowToken();
|
||||||
if (windowToken == null) return;
|
if (windowToken == null) return;
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ import android.view.inputmethod.InputConnection;
|
||||||
|
|
||||||
import com.android.inputmethod.keyboard.Keyboard;
|
import com.android.inputmethod.keyboard.Keyboard;
|
||||||
import com.android.inputmethod.latin.define.ProductionFlag;
|
import com.android.inputmethod.latin.define.ProductionFlag;
|
||||||
|
import com.android.inputmethod.research.ResearchLogger;
|
||||||
|
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ import android.widget.SeekBar.OnSeekBarChangeListener;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.android.inputmethod.latin.define.ProductionFlag;
|
import com.android.inputmethod.latin.define.ProductionFlag;
|
||||||
|
import com.android.inputmethod.research.ResearchLogger;
|
||||||
import com.android.inputmethodcommon.InputMethodSettingsFragment;
|
import com.android.inputmethodcommon.InputMethodSettingsFragment;
|
||||||
|
|
||||||
public class Settings extends InputMethodSettingsFragment
|
public class Settings extends InputMethodSettingsFragment
|
||||||
|
|
|
@ -60,11 +60,11 @@ import com.android.inputmethod.keyboard.ViewLayoutUtils;
|
||||||
import com.android.inputmethod.latin.AutoCorrection;
|
import com.android.inputmethod.latin.AutoCorrection;
|
||||||
import com.android.inputmethod.latin.LatinImeLogger;
|
import com.android.inputmethod.latin.LatinImeLogger;
|
||||||
import com.android.inputmethod.latin.R;
|
import com.android.inputmethod.latin.R;
|
||||||
import com.android.inputmethod.latin.ResearchLogger;
|
|
||||||
import com.android.inputmethod.latin.StaticInnerHandlerWrapper;
|
import com.android.inputmethod.latin.StaticInnerHandlerWrapper;
|
||||||
import com.android.inputmethod.latin.SuggestedWords;
|
import com.android.inputmethod.latin.SuggestedWords;
|
||||||
import com.android.inputmethod.latin.Utils;
|
import com.android.inputmethod.latin.Utils;
|
||||||
import com.android.inputmethod.latin.define.ProductionFlag;
|
import com.android.inputmethod.latin.define.ProductionFlag;
|
||||||
|
import com.android.inputmethod.research.ResearchLogger;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* the License.
|
* the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.android.inputmethod.latin;
|
package com.android.inputmethod.research;
|
||||||
|
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
|
@ -23,9 +23,10 @@ import android.util.Log;
|
||||||
import android.view.inputmethod.CompletionInfo;
|
import android.view.inputmethod.CompletionInfo;
|
||||||
|
|
||||||
import com.android.inputmethod.keyboard.Key;
|
import com.android.inputmethod.keyboard.Key;
|
||||||
import com.android.inputmethod.latin.ResearchLogger.LogUnit;
|
import com.android.inputmethod.latin.SuggestedWords;
|
||||||
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
|
import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo;
|
||||||
import com.android.inputmethod.latin.define.ProductionFlag;
|
import com.android.inputmethod.latin.define.ProductionFlag;
|
||||||
|
import com.android.inputmethod.research.ResearchLogger.LogUnit;
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.File;
|
import java.io.File;
|
|
@ -14,7 +14,7 @@
|
||||||
* the License.
|
* the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.android.inputmethod.latin;
|
package com.android.inputmethod.research;
|
||||||
|
|
||||||
import static com.android.inputmethod.latin.Constants.Subtype.ExtraValue.KEYBOARD_LAYOUT_SET;
|
import static com.android.inputmethod.latin.Constants.Subtype.ExtraValue.KEYBOARD_LAYOUT_SET;
|
||||||
|
|
||||||
|
@ -40,7 +40,13 @@ import com.android.inputmethod.keyboard.Key;
|
||||||
import com.android.inputmethod.keyboard.Keyboard;
|
import com.android.inputmethod.keyboard.Keyboard;
|
||||||
import com.android.inputmethod.keyboard.KeyboardId;
|
import com.android.inputmethod.keyboard.KeyboardId;
|
||||||
import com.android.inputmethod.keyboard.KeyboardSwitcher;
|
import com.android.inputmethod.keyboard.KeyboardSwitcher;
|
||||||
|
import com.android.inputmethod.latin.Dictionary;
|
||||||
|
import com.android.inputmethod.latin.LatinIME;
|
||||||
|
import com.android.inputmethod.latin.R;
|
||||||
|
import com.android.inputmethod.latin.RichInputConnection;
|
||||||
import com.android.inputmethod.latin.RichInputConnection.Range;
|
import com.android.inputmethod.latin.RichInputConnection.Range;
|
||||||
|
import com.android.inputmethod.latin.Suggest;
|
||||||
|
import com.android.inputmethod.latin.SuggestedWords;
|
||||||
import com.android.inputmethod.latin.define.ProductionFlag;
|
import com.android.inputmethod.latin.define.ProductionFlag;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -63,7 +69,7 @@ import java.util.UUID;
|
||||||
public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChangeListener {
|
public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChangeListener {
|
||||||
private static final String TAG = ResearchLogger.class.getSimpleName();
|
private static final String TAG = ResearchLogger.class.getSimpleName();
|
||||||
private static final boolean OUTPUT_ENTIRE_BUFFER = false; // true may disclose private info
|
private static final boolean OUTPUT_ENTIRE_BUFFER = false; // true may disclose private info
|
||||||
/* package */ static final boolean DEFAULT_USABILITY_STUDY_MODE = false;
|
public static final boolean DEFAULT_USABILITY_STUDY_MODE = false;
|
||||||
/* package */ static boolean sIsLogging = false;
|
/* package */ static boolean sIsLogging = false;
|
||||||
private static final int OUTPUT_FORMAT_VERSION = 1;
|
private static final int OUTPUT_FORMAT_VERSION = 1;
|
||||||
private static final String PREF_USABILITY_STUDY_MODE = "usability_study_mode";
|
private static final String PREF_USABILITY_STUDY_MODE = "usability_study_mode";
|
||||||
|
@ -314,7 +320,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
requestIndicatorRedraw();
|
requestIndicatorRedraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* package */ void presentResearchDialog(final LatinIME latinIME) {
|
public void presentResearchDialog(final LatinIME latinIME) {
|
||||||
final CharSequence title = latinIME.getString(R.string.english_ime_research_log);
|
final CharSequence title = latinIME.getString(R.string.english_ime_research_log);
|
||||||
final boolean showEnable = mIsLoggingSuspended || !sIsLogging;
|
final boolean showEnable = mIsLoggingSuspended || !sIsLogging;
|
||||||
final CharSequence[] items = new CharSequence[] {
|
final CharSequence[] items = new CharSequence[] {
|
||||||
|
@ -770,7 +776,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang
|
||||||
values);
|
values);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* package */ static boolean getAndClearLatinIMEExpectingUpdateSelection() {
|
public static boolean getAndClearLatinIMEExpectingUpdateSelection() {
|
||||||
boolean returnValue = sLatinIMEExpectingUpdateSelection;
|
boolean returnValue = sLatinIMEExpectingUpdateSelection;
|
||||||
sLatinIMEExpectingUpdateSelection = false;
|
sLatinIMEExpectingUpdateSelection = false;
|
||||||
return returnValue;
|
return returnValue;
|
Loading…
Reference in a new issue