From 2dae79b1966a7970c25c8b79beec1c95c13f6c87 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Wed, 16 Jul 2014 18:41:46 -0700 Subject: [PATCH] Rename LatinImeLogger to DebugFlags Bug: 15318007 Change-Id: Ic0268fd12865c9a692a5e7110a9beb76cb8b6d7f --- .../compat/SuggestionSpanUtils.java | 4 ++-- .../keyboard/KeyboardLayoutSet.java | 4 ++-- .../inputmethod/keyboard/PointerTracker.java | 4 ++-- .../internal/BogusMoveEventDetector.java | 4 ++-- .../keyboard/internal/MoreKeySpec.java | 4 ++-- .../internal/TouchPositionCorrection.java | 6 +++--- .../inputmethod/latin/InputPointers.java | 5 +++-- .../android/inputmethod/latin/LatinIME.java | 8 +++++--- .../inputmethod/latin/SubtypeSwitcher.java | 3 ++- .../com/android/inputmethod/latin/Suggest.java | 3 ++- .../inputmethod/latin/SuggestedWords.java | 3 ++- ...ggestionSpanPickedNotificationReceiver.java | 4 +++- .../inputmethod/latin/WordComposer.java | 3 ++- .../DebugFlags.java} | 18 +++++++++++------- .../latin/inputlogic/InputLogic.java | 4 ++-- .../SuggestionStripLayoutHelper.java | 4 ++-- .../latin/suggestions/SuggestionStripView.java | 4 ++-- .../latin/utils/AutoCorrectionUtils.java | 4 ++-- .../inputmethod/latin/utils/DebugLogUtils.java | 4 ++-- 19 files changed, 53 insertions(+), 40 deletions(-) rename java/src/com/android/inputmethod/latin/{LatinImeLogger.java => define/DebugFlags.java} (58%) diff --git a/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java b/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java index 4d51821f2..4c7663527 100644 --- a/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java +++ b/java/src/com/android/inputmethod/compat/SuggestionSpanUtils.java @@ -23,9 +23,9 @@ import android.text.Spanned; import android.text.TextUtils; import android.text.style.SuggestionSpan; -import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; +import com.android.inputmethod.latin.define.DebugFlags; import com.android.inputmethod.latin.SuggestionSpanPickedNotificationReceiver; import java.lang.reflect.Field; @@ -40,7 +40,7 @@ public final class SuggestionSpanUtils { null /* receiver */, null /* defaultValue */, FIELD_FLAG_AUTO_CORRECTION); static { - if (LatinImeLogger.sDBG) { + if (DebugFlags.DEBUG_ENABLED) { if (OBJ_FLAG_AUTO_CORRECTION == null) { throw new RuntimeException("Field is accidentially null."); } diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java b/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java index d01c4cc8f..870ac86e1 100644 --- a/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java +++ b/java/src/com/android/inputmethod/keyboard/KeyboardLayoutSet.java @@ -36,9 +36,9 @@ import com.android.inputmethod.keyboard.internal.KeyboardBuilder; import com.android.inputmethod.keyboard.internal.KeyboardParams; import com.android.inputmethod.keyboard.internal.KeysCache; import com.android.inputmethod.latin.InputAttributes; -import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.SubtypeSwitcher; +import com.android.inputmethod.latin.define.DebugFlags; import com.android.inputmethod.latin.utils.InputTypeUtils; import com.android.inputmethod.latin.utils.ScriptUtils; import com.android.inputmethod.latin.utils.SubtypeLocaleUtils; @@ -60,7 +60,7 @@ import java.util.HashMap; */ public final class KeyboardLayoutSet { private static final String TAG = KeyboardLayoutSet.class.getSimpleName(); - private static final boolean DEBUG_CACHE = LatinImeLogger.sDBG; + private static final boolean DEBUG_CACHE = DebugFlags.DEBUG_ENABLED; private static final String TAG_KEYBOARD_SET = "KeyboardLayoutSet"; private static final String TAG_ELEMENT = "Element"; diff --git a/java/src/com/android/inputmethod/keyboard/PointerTracker.java b/java/src/com/android/inputmethod/keyboard/PointerTracker.java index b6905bc1c..49288ade4 100644 --- a/java/src/com/android/inputmethod/keyboard/PointerTracker.java +++ b/java/src/com/android/inputmethod/keyboard/PointerTracker.java @@ -33,8 +33,8 @@ import com.android.inputmethod.keyboard.internal.PointerTrackerQueue; import com.android.inputmethod.keyboard.internal.TypingTimeRecorder; import com.android.inputmethod.latin.Constants; import com.android.inputmethod.latin.InputPointers; -import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.R; +import com.android.inputmethod.latin.define.DebugFlags; import com.android.inputmethod.latin.settings.Settings; import com.android.inputmethod.latin.utils.CoordinateUtils; import com.android.inputmethod.latin.utils.ResourceUtils; @@ -47,7 +47,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element, private static final boolean DEBUG_EVENT = false; private static final boolean DEBUG_MOVE_EVENT = false; private static final boolean DEBUG_LISTENER = false; - private static boolean DEBUG_MODE = LatinImeLogger.sDBG || DEBUG_EVENT; + private static boolean DEBUG_MODE = DebugFlags.DEBUG_ENABLED || DEBUG_EVENT; public interface DrawingProxy { public void invalidateKey(Key key); diff --git a/java/src/com/android/inputmethod/keyboard/internal/BogusMoveEventDetector.java b/java/src/com/android/inputmethod/keyboard/internal/BogusMoveEventDetector.java index e0589fc97..6420edd7a 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/BogusMoveEventDetector.java +++ b/java/src/com/android/inputmethod/keyboard/internal/BogusMoveEventDetector.java @@ -21,13 +21,13 @@ import android.util.DisplayMetrics; import android.util.Log; import com.android.inputmethod.latin.Constants; -import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.R; +import com.android.inputmethod.latin.define.DebugFlags; // This hack is applied to certain classes of tablets. public final class BogusMoveEventDetector { private static final String TAG = BogusMoveEventDetector.class.getSimpleName(); - private static final boolean DEBUG_MODE = LatinImeLogger.sDBG; + private static final boolean DEBUG_MODE = DebugFlags.DEBUG_ENABLED; // Move these thresholds to resource. // These thresholds' unit is a diagonal length of a key. diff --git a/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java b/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java index e0d5173ac..625a0c283 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java +++ b/java/src/com/android/inputmethod/keyboard/internal/MoreKeySpec.java @@ -20,7 +20,7 @@ import android.text.TextUtils; import com.android.inputmethod.keyboard.Key; import com.android.inputmethod.latin.Constants; -import com.android.inputmethod.latin.LatinImeLogger; +import com.android.inputmethod.latin.define.DebugFlags; import com.android.inputmethod.latin.utils.CollectionUtils; import com.android.inputmethod.latin.utils.StringUtils; @@ -110,7 +110,7 @@ public final class MoreKeySpec { } } - private static final boolean DEBUG = LatinImeLogger.sDBG; + private static final boolean DEBUG = DebugFlags.DEBUG_ENABLED; // Constants for parsing. private static final char COMMA = Constants.CODE_COMMA; private static final char BACKSLASH = Constants.CODE_BACKSLASH; diff --git a/java/src/com/android/inputmethod/keyboard/internal/TouchPositionCorrection.java b/java/src/com/android/inputmethod/keyboard/internal/TouchPositionCorrection.java index a75384b78..fef97cc11 100644 --- a/java/src/com/android/inputmethod/keyboard/internal/TouchPositionCorrection.java +++ b/java/src/com/android/inputmethod/keyboard/internal/TouchPositionCorrection.java @@ -17,7 +17,7 @@ package com.android.inputmethod.keyboard.internal; import com.android.inputmethod.annotations.UsedForTesting; -import com.android.inputmethod.latin.LatinImeLogger; +import com.android.inputmethod.latin.define.DebugFlags; public final class TouchPositionCorrection { private static final int TOUCH_POSITION_CORRECTION_RECORD_SIZE = 3; @@ -30,7 +30,7 @@ public final class TouchPositionCorrection { public void load(final String[] data) { final int dataLength = data.length; if (dataLength % TOUCH_POSITION_CORRECTION_RECORD_SIZE != 0) { - if (LatinImeLogger.sDBG) { + if (DebugFlags.DEBUG_ENABLED) { throw new RuntimeException( "the size of touch position correction data is invalid"); } @@ -56,7 +56,7 @@ public final class TouchPositionCorrection { } mEnabled = dataLength > 0; } catch (NumberFormatException e) { - if (LatinImeLogger.sDBG) { + if (DebugFlags.DEBUG_ENABLED) { throw new RuntimeException( "the number format for touch position correction data is invalid"); } diff --git a/java/src/com/android/inputmethod/latin/InputPointers.java b/java/src/com/android/inputmethod/latin/InputPointers.java index 47bc6b078..790e0d830 100644 --- a/java/src/com/android/inputmethod/latin/InputPointers.java +++ b/java/src/com/android/inputmethod/latin/InputPointers.java @@ -20,6 +20,7 @@ import android.util.Log; import android.util.SparseIntArray; import com.android.inputmethod.annotations.UsedForTesting; +import com.android.inputmethod.latin.define.DebugFlags; import com.android.inputmethod.latin.utils.ResizableIntArray; // TODO: This class is not thread-safe. @@ -60,7 +61,7 @@ public final class InputPointers { mXCoordinates.addAt(index, x); mYCoordinates.addAt(index, y); mPointerIds.addAt(index, pointerId); - if (LatinImeLogger.sDBG || DEBUG_TIME) { + if (DebugFlags.DEBUG_ENABLED || DEBUG_TIME) { fillWithLastTimeUntil(index); } mTimes.addAt(index, time); @@ -145,7 +146,7 @@ public final class InputPointers { } public int[] getTimes() { - if (LatinImeLogger.sDBG || DEBUG_TIME) { + if (DebugFlags.DEBUG_ENABLED || DEBUG_TIME) { if (!isValidTimeStamps()) { throw new RuntimeException("Time stamps are invalid."); } diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index d2c4ca712..e1f34ee48 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -37,6 +37,7 @@ import android.net.ConnectivityManager; import android.os.Debug; import android.os.IBinder; import android.os.Message; +import android.preference.PreferenceManager; import android.text.InputType; import android.text.TextUtils; import android.util.Log; @@ -67,6 +68,7 @@ import com.android.inputmethod.keyboard.KeyboardSwitcher; import com.android.inputmethod.keyboard.MainKeyboardView; import com.android.inputmethod.latin.Suggest.OnGetSuggestedWordsCallback; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; +import com.android.inputmethod.latin.define.DebugFlags; import com.android.inputmethod.latin.define.ProductionFlag; import com.android.inputmethod.latin.inputlogic.InputLogic; import com.android.inputmethod.latin.personalization.ContextualDictionaryUpdater; @@ -516,7 +518,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen @Override public void onCreate() { Settings.init(this); - LatinImeLogger.init(this); + DebugFlags.init(PreferenceManager.getDefaultSharedPreferences(this)); RichInputMethodManager.init(this); mRichImm = RichInputMethodManager.getInstance(); SubtypeSwitcher.init(this); @@ -528,7 +530,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen super.onCreate(); mHandler.onCreate(); - DEBUG = LatinImeLogger.sDBG; + DEBUG = DebugFlags.DEBUG_ENABLED; // TODO: Resolve mutual dependencies of {@link #loadSettings()} and {@link #initSuggest()}. loadSettings(); @@ -764,7 +766,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (editorInfo == null) { Log.e(TAG, "Null EditorInfo in onStartInputView()"); - if (LatinImeLogger.sDBG) { + if (DebugFlags.DEBUG_ENABLED) { throw new NullPointerException("Null EditorInfo in onStartInputView()"); } return; diff --git a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java index a3d09565c..a725e1611 100644 --- a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java +++ b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java @@ -35,6 +35,7 @@ import com.android.inputmethod.annotations.UsedForTesting; import com.android.inputmethod.compat.InputMethodSubtypeCompatUtils; import com.android.inputmethod.keyboard.KeyboardSwitcher; import com.android.inputmethod.keyboard.internal.LanguageOnSpacebarHelper; +import com.android.inputmethod.latin.define.DebugFlags; import com.android.inputmethod.latin.utils.LocaleUtils; import com.android.inputmethod.latin.utils.SubtypeLocaleUtils; @@ -45,7 +46,7 @@ import java.util.Map; import java.util.Set; public final class SubtypeSwitcher { - private static boolean DBG = LatinImeLogger.sDBG; + private static boolean DBG = DebugFlags.DEBUG_ENABLED; private static final String TAG = SubtypeSwitcher.class.getSimpleName(); private static final SubtypeSwitcher sInstance = new SubtypeSwitcher(); diff --git a/java/src/com/android/inputmethod/latin/Suggest.java b/java/src/com/android/inputmethod/latin/Suggest.java index 838e34f4e..b8b6d6471 100644 --- a/java/src/com/android/inputmethod/latin/Suggest.java +++ b/java/src/com/android/inputmethod/latin/Suggest.java @@ -20,6 +20,7 @@ import android.text.TextUtils; import com.android.inputmethod.keyboard.ProximityInfo; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; +import com.android.inputmethod.latin.define.DebugFlags; import com.android.inputmethod.latin.settings.SettingsValuesForSuggestion; import com.android.inputmethod.latin.utils.AutoCorrectionUtils; import com.android.inputmethod.latin.utils.BinaryDictionaryUtils; @@ -50,7 +51,7 @@ public final class Suggest { // Close to -2**31 private static final int SUPPRESS_SUGGEST_THRESHOLD = -2000000000; - private static final boolean DBG = LatinImeLogger.sDBG; + private static final boolean DBG = DebugFlags.DEBUG_ENABLED; private final DictionaryFacilitator mDictionaryFacilitator; private float mAutoCorrectionThreshold; diff --git a/java/src/com/android/inputmethod/latin/SuggestedWords.java b/java/src/com/android/inputmethod/latin/SuggestedWords.java index e587b18c9..5231cc893 100644 --- a/java/src/com/android/inputmethod/latin/SuggestedWords.java +++ b/java/src/com/android/inputmethod/latin/SuggestedWords.java @@ -19,6 +19,7 @@ package com.android.inputmethod.latin; import android.text.TextUtils; import android.view.inputmethod.CompletionInfo; +import com.android.inputmethod.latin.define.DebugFlags; import com.android.inputmethod.latin.utils.StringUtils; import java.util.ArrayList; @@ -130,7 +131,7 @@ public class SuggestedWords { } public String getDebugString(final int pos) { - if (!LatinImeLogger.sDBG) { + if (!DebugFlags.DEBUG_ENABLED) { return null; } final SuggestedWordInfo wordInfo = getInfo(pos); diff --git a/java/src/com/android/inputmethod/latin/SuggestionSpanPickedNotificationReceiver.java b/java/src/com/android/inputmethod/latin/SuggestionSpanPickedNotificationReceiver.java index ed6fc03f9..08785f3d9 100644 --- a/java/src/com/android/inputmethod/latin/SuggestionSpanPickedNotificationReceiver.java +++ b/java/src/com/android/inputmethod/latin/SuggestionSpanPickedNotificationReceiver.java @@ -22,8 +22,10 @@ import android.content.Intent; import android.text.style.SuggestionSpan; import android.util.Log; +import com.android.inputmethod.latin.define.DebugFlags; + public final class SuggestionSpanPickedNotificationReceiver extends BroadcastReceiver { - private static final boolean DBG = LatinImeLogger.sDBG; + private static final boolean DBG = DebugFlags.DEBUG_ENABLED; private static final String TAG = SuggestionSpanPickedNotificationReceiver.class.getSimpleName(); diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java index 21fe7e0eb..cdd782244 100644 --- a/java/src/com/android/inputmethod/latin/WordComposer.java +++ b/java/src/com/android/inputmethod/latin/WordComposer.java @@ -18,6 +18,7 @@ package com.android.inputmethod.latin; import com.android.inputmethod.event.CombinerChain; import com.android.inputmethod.event.Event; +import com.android.inputmethod.latin.define.DebugFlags; import com.android.inputmethod.latin.utils.CoordinateUtils; import com.android.inputmethod.latin.utils.StringUtils; @@ -29,7 +30,7 @@ import java.util.Collections; */ public final class WordComposer { private static final int MAX_WORD_LENGTH = Constants.DICTIONARY_MAX_WORD_LENGTH; - private static final boolean DBG = LatinImeLogger.sDBG; + private static final boolean DBG = DebugFlags.DEBUG_ENABLED; public static final int CAPS_MODE_OFF = 0; // 1 is shift bit, 2 is caps bit, 4 is auto bit but this is just a convention as these bits diff --git a/java/src/com/android/inputmethod/latin/LatinImeLogger.java b/java/src/com/android/inputmethod/latin/define/DebugFlags.java similarity index 58% rename from java/src/com/android/inputmethod/latin/LatinImeLogger.java rename to java/src/com/android/inputmethod/latin/define/DebugFlags.java index 8fd36b937..c509e8322 100644 --- a/java/src/com/android/inputmethod/latin/LatinImeLogger.java +++ b/java/src/com/android/inputmethod/latin/define/DebugFlags.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 The Android Open Source Project + * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,18 @@ * limitations under the License. */ -package com.android.inputmethod.latin; +package com.android.inputmethod.latin.define; -import android.content.Context; +import android.content.SharedPreferences; -// TODO: Rename this class name to make it more relevant. -public final class LatinImeLogger { - public static final boolean sDBG = false; +public final class DebugFlags { + public static final boolean DEBUG_ENABLED = false; - public static void init(Context context) { + private DebugFlags() { + // This class is not publicly instantiable. + } + + @SuppressWarnings("unused") + public static void init(final SharedPreferences prefs) { } } diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index 929720b49..6588951df 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -37,7 +37,6 @@ import com.android.inputmethod.latin.DictionaryFacilitator; import com.android.inputmethod.latin.InputPointers; import com.android.inputmethod.latin.LastComposedWord; import com.android.inputmethod.latin.LatinIME; -import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.PrevWordsInfo; import com.android.inputmethod.latin.RichInputConnection; import com.android.inputmethod.latin.Suggest; @@ -45,6 +44,7 @@ import com.android.inputmethod.latin.Suggest.OnGetSuggestedWordsCallback; import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; import com.android.inputmethod.latin.WordComposer; +import com.android.inputmethod.latin.define.DebugFlags; import com.android.inputmethod.latin.settings.SettingsValues; import com.android.inputmethod.latin.settings.SettingsValuesForSuggestion; import com.android.inputmethod.latin.settings.SpacingAndPunctuations; @@ -1434,7 +1434,7 @@ public final class InputLogic { final int separatorLength = mLastComposedWord.mSeparatorString.length(); // TODO: should we check our saved separator against the actual contents of the text view? final int deleteLength = cancelLength + separatorLength; - if (LatinImeLogger.sDBG) { + if (DebugFlags.DEBUG_ENABLED) { if (mWordComposer.isComposingWord()) { throw new RuntimeException("revertCommit, but we are composing a word"); } diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java index ad5aad747..c5f062d5b 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripLayoutHelper.java @@ -45,11 +45,11 @@ import android.widget.LinearLayout; import android.widget.TextView; import com.android.inputmethod.accessibility.AccessibilityUtils; -import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.PunctuationSuggestions; import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; +import com.android.inputmethod.latin.define.DebugFlags; import com.android.inputmethod.latin.utils.AutoCorrectionUtils; import com.android.inputmethod.latin.utils.ResourceUtils; import com.android.inputmethod.latin.utils.SubtypeLocaleUtils; @@ -264,7 +264,7 @@ final class SuggestionStripLayoutHelper { } else { color = mColorSuggested; } - if (LatinImeLogger.sDBG && suggestedWords.size() > 1) { + if (DebugFlags.DEBUG_ENABLED && suggestedWords.size() > 1) { // If we auto-correct, then the autocorrection is in slot 0 and the typed word // is in slot 1. if (positionInStrip == mCenterPositionInStrip diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java index 8654e12a9..d151e4037 100644 --- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java +++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionStripView.java @@ -43,10 +43,10 @@ import com.android.inputmethod.keyboard.MainKeyboardView; import com.android.inputmethod.keyboard.MoreKeysPanel; import com.android.inputmethod.latin.AudioAndHapticFeedbackManager; import com.android.inputmethod.latin.Constants; -import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.SuggestedWords; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; +import com.android.inputmethod.latin.define.DebugFlags; import com.android.inputmethod.latin.settings.Settings; import com.android.inputmethod.latin.settings.SettingsValues; import com.android.inputmethod.latin.suggestions.MoreSuggestionsView.MoreSuggestionsListener; @@ -63,7 +63,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick public void onCodeInput(int primaryCode, int x, int y, boolean isKeyRepeat); } - static final boolean DBG = LatinImeLogger.sDBG; + static final boolean DBG = DebugFlags.DEBUG_ENABLED; private static final float DEBUG_INFO_TEXT_SIZE_IN_DIP = 6.0f; private final ViewGroup mSuggestionsStrip; diff --git a/java/src/com/android/inputmethod/latin/utils/AutoCorrectionUtils.java b/java/src/com/android/inputmethod/latin/utils/AutoCorrectionUtils.java index 34ee2152a..156fcf57c 100644 --- a/java/src/com/android/inputmethod/latin/utils/AutoCorrectionUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/AutoCorrectionUtils.java @@ -18,11 +18,11 @@ package com.android.inputmethod.latin.utils; import android.util.Log; -import com.android.inputmethod.latin.LatinImeLogger; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; +import com.android.inputmethod.latin.define.DebugFlags; public final class AutoCorrectionUtils { - private static final boolean DBG = LatinImeLogger.sDBG; + private static final boolean DBG = DebugFlags.DEBUG_ENABLED; private static final String TAG = AutoCorrectionUtils.class.getSimpleName(); private static final int MINIMUM_SAFETY_NET_CHAR_LENGTH = 4; diff --git a/java/src/com/android/inputmethod/latin/utils/DebugLogUtils.java b/java/src/com/android/inputmethod/latin/utils/DebugLogUtils.java index ac654fa65..1ab834fc3 100644 --- a/java/src/com/android/inputmethod/latin/utils/DebugLogUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/DebugLogUtils.java @@ -18,14 +18,14 @@ package com.android.inputmethod.latin.utils; import android.util.Log; -import com.android.inputmethod.latin.LatinImeLogger; +import com.android.inputmethod.latin.define.DebugFlags; /** * A class for logging and debugging utility methods. */ public final class DebugLogUtils { private final static String TAG = DebugLogUtils.class.getSimpleName(); - private final static boolean sDBG = LatinImeLogger.sDBG; + private final static boolean sDBG = DebugFlags.DEBUG_ENABLED; /** * Calls .toString() on its non-null argument or returns "null"