aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2013-01-08 18:26:47 +0900
committerTadashi G. Takaoka <takaoka@google.com>2013-01-08 18:26:47 +0900
commita5ff9f0c77005769f92ca1131882bb4e3ca18980 (patch)
tree401c184c1aa8871de9ff70ff926027a73b0088c8 /java/src
parent0015ce8feafba31d441c49268f0d333604c0b945 (diff)
downloadlatinime-a5ff9f0c77005769f92ca1131882bb4e3ca18980.tar.gz
latinime-a5ff9f0c77005769f92ca1131882bb4e3ca18980.tar.xz
latinime-a5ff9f0c77005769f92ca1131882bb4e3ca18980.zip
Clean up debug related preference keys
Change-Id: Ib7129692c673b3bce253120ee709e0253aeafa52
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/keyboard/MainKeyboardView.java2
-rw-r--r--java/src/com/android/inputmethod/latin/DebugSettings.java18
2 files changed, 10 insertions, 10 deletions
diff --git a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
index 79aab9c76..130fad851 100644
--- a/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/MainKeyboardView.java
@@ -387,7 +387,7 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
final boolean forceNonDistinctMultitouch = prefs.getBoolean(
- DebugSettings.FORCE_NON_DISTINCT_MULTITOUCH_KEY, false);
+ DebugSettings.PREF_FORCE_NON_DISTINCT_MULTITOUCH, false);
final boolean hasDistinctMultitouch = context.getPackageManager()
.hasSystemFeature(PackageManager.FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT);
mHasDistinctMultitouch = hasDistinctMultitouch && !forceNonDistinctMultitouch;
diff --git a/java/src/com/android/inputmethod/latin/DebugSettings.java b/java/src/com/android/inputmethod/latin/DebugSettings.java
index f8aeb4e9f..d1792a369 100644
--- a/java/src/com/android/inputmethod/latin/DebugSettings.java
+++ b/java/src/com/android/inputmethod/latin/DebugSettings.java
@@ -32,12 +32,12 @@ import com.android.inputmethod.research.ResearchLogger;
public final class DebugSettings extends PreferenceFragment
implements SharedPreferences.OnSharedPreferenceChangeListener {
-
private static final String TAG = DebugSettings.class.getSimpleName();
- private static final String DEBUG_MODE_KEY = "debug_mode";
- public static final String FORCE_NON_DISTINCT_MULTITOUCH_KEY = "force_non_distinct_multitouch";
+
+ public static final String PREF_DEBUG_MODE = "debug_mode";
+ public static final String PREF_FORCE_NON_DISTINCT_MULTITOUCH = "force_non_distinct_multitouch";
public static final String PREF_USABILITY_STUDY_MODE = "usability_study_mode";
- private static final String PREF_STATISTICS_LOGGING_KEY = "enable_logging";
+ public static final String PREF_STATISTICS_LOGGING = "enable_logging";
private static final boolean SHOW_STATISTICS_LOGGING = false;
private boolean mServiceNeedsRestart = false;
@@ -58,7 +58,7 @@ public final class DebugSettings extends PreferenceFragment
ResearchLogger.DEFAULT_USABILITY_STUDY_MODE));
checkbox.setSummary(R.string.settings_warning_researcher_mode);
}
- final Preference statisticsLoggingPref = findPreference(PREF_STATISTICS_LOGGING_KEY);
+ final Preference statisticsLoggingPref = findPreference(PREF_STATISTICS_LOGGING);
if (statisticsLoggingPref instanceof CheckBoxPreference) {
mStatisticsLoggingPref = (CheckBoxPreference) statisticsLoggingPref;
if (!SHOW_STATISTICS_LOGGING) {
@@ -67,7 +67,7 @@ public final class DebugSettings extends PreferenceFragment
}
mServiceNeedsRestart = false;
- mDebugMode = (CheckBoxPreference) findPreference(DEBUG_MODE_KEY);
+ mDebugMode = (CheckBoxPreference) findPreference(PREF_DEBUG_MODE);
updateDebugMode();
}
@@ -79,9 +79,9 @@ public final class DebugSettings extends PreferenceFragment
@Override
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
- if (key.equals(DEBUG_MODE_KEY)) {
+ if (key.equals(PREF_DEBUG_MODE)) {
if (mDebugMode != null) {
- mDebugMode.setChecked(prefs.getBoolean(DEBUG_MODE_KEY, false));
+ mDebugMode.setChecked(prefs.getBoolean(PREF_DEBUG_MODE, false));
final boolean checked = mDebugMode.isChecked();
if (mStatisticsLoggingPref != null) {
if (checked) {
@@ -93,7 +93,7 @@ public final class DebugSettings extends PreferenceFragment
updateDebugMode();
mServiceNeedsRestart = true;
}
- } else if (key.equals(FORCE_NON_DISTINCT_MULTITOUCH_KEY)
+ } else if (key.equals(PREF_FORCE_NON_DISTINCT_MULTITOUCH)
|| key.equals(KeyboardSwitcher.PREF_KEYBOARD_LAYOUT)) {
mServiceNeedsRestart = true;
}