Loading java/src/com/android/inputmethod/latin/LatinImeLogger.java +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ public class LatinImeLogger implements SharedPreferences.OnSharedPreferenceChang public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { } public static void init(Context context, SharedPreferences prefs) { public static void init(LatinIME context, SharedPreferences prefs) { } public static void commit() { Loading java/src/com/android/inputmethod/latin/Settings.java +1 −0 Original line number Diff line number Diff line Loading @@ -237,6 +237,7 @@ public class Settings extends InputMethodSettingsActivity textCorrectionGroup.removePreference(dictionaryLink); } // TODO: Following isResearcherPackage can be wrong until LatinImeLogger gets initialized. final boolean isResearcherPackage = LatinImeLogger.isResearcherPackage(); final boolean showUsabilityStudyModeOption = res.getBoolean(R.bool.config_enable_usability_study_mode_option) Loading java/src/com/android/inputmethod/latin/Utils.java +8 −3 Original line number Diff line number Diff line Loading @@ -537,6 +537,10 @@ public class Utils { mLoggingHandler.post(new Runnable() { @Override public void run() { final Date date = new Date(); date.setTime(System.currentTimeMillis()); final String currentDateTimeString = new SimpleDateFormat("yyyyMMdd-HHmmssZ").format(date); if (mFile == null) { Log.w(TAG, "No internal log file found."); return; Loading @@ -548,8 +552,8 @@ public class Utils { return; } mWriter.flush(); final String destPath = Environment.getExternalStorageDirectory() + "/" + FILENAME; final String destPath = Environment.getExternalStorageDirectory() + "/research-" + currentDateTimeString + ".log"; final File destFile = new File(destPath); try { final FileChannel src = (new FileInputStream(mFile)).getChannel(); Loading @@ -575,7 +579,8 @@ public class Utils { } intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + destPath)); intent.putExtra(Intent.EXTRA_SUBJECT, "[Research Logs]"); intent.putExtra(Intent.EXTRA_SUBJECT, "[Research Logs] " + currentDateTimeString); mIms.startActivity(intent); } }); Loading Loading
java/src/com/android/inputmethod/latin/LatinImeLogger.java +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ public class LatinImeLogger implements SharedPreferences.OnSharedPreferenceChang public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { } public static void init(Context context, SharedPreferences prefs) { public static void init(LatinIME context, SharedPreferences prefs) { } public static void commit() { Loading
java/src/com/android/inputmethod/latin/Settings.java +1 −0 Original line number Diff line number Diff line Loading @@ -237,6 +237,7 @@ public class Settings extends InputMethodSettingsActivity textCorrectionGroup.removePreference(dictionaryLink); } // TODO: Following isResearcherPackage can be wrong until LatinImeLogger gets initialized. final boolean isResearcherPackage = LatinImeLogger.isResearcherPackage(); final boolean showUsabilityStudyModeOption = res.getBoolean(R.bool.config_enable_usability_study_mode_option) Loading
java/src/com/android/inputmethod/latin/Utils.java +8 −3 Original line number Diff line number Diff line Loading @@ -537,6 +537,10 @@ public class Utils { mLoggingHandler.post(new Runnable() { @Override public void run() { final Date date = new Date(); date.setTime(System.currentTimeMillis()); final String currentDateTimeString = new SimpleDateFormat("yyyyMMdd-HHmmssZ").format(date); if (mFile == null) { Log.w(TAG, "No internal log file found."); return; Loading @@ -548,8 +552,8 @@ public class Utils { return; } mWriter.flush(); final String destPath = Environment.getExternalStorageDirectory() + "/" + FILENAME; final String destPath = Environment.getExternalStorageDirectory() + "/research-" + currentDateTimeString + ".log"; final File destFile = new File(destPath); try { final FileChannel src = (new FileInputStream(mFile)).getChannel(); Loading @@ -575,7 +579,8 @@ public class Utils { } intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + destPath)); intent.putExtra(Intent.EXTRA_SUBJECT, "[Research Logs]"); intent.putExtra(Intent.EXTRA_SUBJECT, "[Research Logs] " + currentDateTimeString); mIms.startActivity(intent); } }); Loading