From 5a5ee95faead8a2ae749067716481e86faf5f113 Mon Sep 17 00:00:00 2001 From: "Tadashi G. Takaoka" Date: Wed, 16 Jul 2014 19:22:35 -0700 Subject: Rename ProductionFlag to ProductionFlags Change-Id: I5da2dbf8828fa0e176e7c2496392a5f561ebfe20 --- .../compat/InputMethodServiceCompatUtils.java | 4 +-- .../com/android/inputmethod/latin/LatinIME.java | 6 ++-- .../inputmethod/latin/define/ProductionFlag.java | 37 ---------------------- .../inputmethod/latin/define/ProductionFlags.java | 37 ++++++++++++++++++++++ .../latin/settings/SettingsFragment.java | 4 +-- .../inputmethod/latin/utils/SuggestionResults.java | 4 +-- 6 files changed, 46 insertions(+), 46 deletions(-) delete mode 100644 java/src/com/android/inputmethod/latin/define/ProductionFlag.java create mode 100644 java/src/com/android/inputmethod/latin/define/ProductionFlags.java (limited to 'java/src') diff --git a/java/src/com/android/inputmethod/compat/InputMethodServiceCompatUtils.java b/java/src/com/android/inputmethod/compat/InputMethodServiceCompatUtils.java index 81df17127..cbae6952c 100644 --- a/java/src/com/android/inputmethod/compat/InputMethodServiceCompatUtils.java +++ b/java/src/com/android/inputmethod/compat/InputMethodServiceCompatUtils.java @@ -17,7 +17,7 @@ package com.android.inputmethod.compat; import android.inputmethodservice.InputMethodService; -import com.android.inputmethod.latin.define.ProductionFlag; +import com.android.inputmethod.latin.define.ProductionFlags; import java.lang.reflect.Method; @@ -37,7 +37,7 @@ public final class InputMethodServiceCompatUtils { } public static void setCursorAnchorMonitorMode(final InputMethodService ims, final int mode) { - if (ProductionFlag.USES_CURSOR_ANCHOR_MONITOR) { + if (ProductionFlags.USES_CURSOR_ANCHOR_MONITOR) { ExperimentalAPIUtils.setCursorAnchorMonitorMode(ims, mode); } } diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index e1f34ee48..dd0060f4a 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -69,7 +69,7 @@ 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.define.ProductionFlags; import com.android.inputmethod.latin.inputlogic.InputLogic; import com.android.inputmethod.latin.personalization.ContextualDictionaryUpdater; import com.android.inputmethod.latin.personalization.DictionaryDecayBroadcastReciever; @@ -413,7 +413,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen if (latinIme != null) { executePendingImsCallback(latinIme, editorInfo, restarting); latinIme.onStartInputInternal(editorInfo, restarting); - if (ProductionFlag.USES_CURSOR_ANCHOR_MONITOR) { + if (ProductionFlags.USES_CURSOR_ANCHOR_MONITOR) { // Currently we need to call this every time when the IME is attached to // new application. // TODO: Consider if we can do this automatically in the framework. @@ -1564,7 +1564,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // Hooks for hardware keyboard @Override public boolean onKeyDown(final int keyCode, final KeyEvent keyEvent) { - if (!ProductionFlag.IS_HARDWARE_KEYBOARD_SUPPORTED) { + if (!ProductionFlags.IS_HARDWARE_KEYBOARD_SUPPORTED) { return super.onKeyDown(keyCode, keyEvent); } final Event event = getHardwareKeyEventDecoder( diff --git a/java/src/com/android/inputmethod/latin/define/ProductionFlag.java b/java/src/com/android/inputmethod/latin/define/ProductionFlag.java deleted file mode 100644 index 972580298..000000000 --- a/java/src/com/android/inputmethod/latin/define/ProductionFlag.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2012 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.inputmethod.latin.define; - -public final class ProductionFlag { - private ProductionFlag() { - // This class is not publicly instantiable. - } - - public static final boolean IS_HARDWARE_KEYBOARD_SUPPORTED = false; - - // When true, enable {@link InputMethodService#onUpdateCursor} callback with - // {@link InputMethodService#setCursorAnchorMonitorMode}, which is not yet available in - // API level 19. Do not turn this on in production until the new API becomes publicly - // available. - public static final boolean USES_CURSOR_ANCHOR_MONITOR = false; - - // Include all suggestions from all dictionaries in {@link SuggestedWords#mRawSuggestions}. - public static final boolean INCLUDE_RAW_SUGGESTIONS = false; - - // When false, the metrics logging is not yet ready to be enabled. - public static final boolean IS_METRICS_LOGGING_SUPPORTED = false; -} diff --git a/java/src/com/android/inputmethod/latin/define/ProductionFlags.java b/java/src/com/android/inputmethod/latin/define/ProductionFlags.java new file mode 100644 index 000000000..6dccd789d --- /dev/null +++ b/java/src/com/android/inputmethod/latin/define/ProductionFlags.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2012 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.inputmethod.latin.define; + +public final class ProductionFlags { + private ProductionFlags() { + // This class is not publicly instantiable. + } + + public static final boolean IS_HARDWARE_KEYBOARD_SUPPORTED = false; + + // When true, enable {@link InputMethodService#onUpdateCursor} callback with + // {@link InputMethodService#setCursorAnchorMonitorMode}, which is not yet available in + // API level 19. Do not turn this on in production until the new API becomes publicly + // available. + public static final boolean USES_CURSOR_ANCHOR_MONITOR = false; + + // Include all suggestions from all dictionaries in {@link SuggestedWords#mRawSuggestions}. + public static final boolean INCLUDE_RAW_SUGGESTIONS = false; + + // When false, the metrics logging is not yet ready to be enabled. + public static final boolean IS_METRICS_LOGGING_SUPPORTED = false; +} diff --git a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java index 5a26a77cf..a9d95fc82 100644 --- a/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java +++ b/java/src/com/android/inputmethod/latin/settings/SettingsFragment.java @@ -43,7 +43,7 @@ import com.android.inputmethod.keyboard.KeyboardTheme; import com.android.inputmethod.latin.AudioAndHapticFeedbackManager; import com.android.inputmethod.latin.R; import com.android.inputmethod.latin.SubtypeSwitcher; -import com.android.inputmethod.latin.define.ProductionFlag; +import com.android.inputmethod.latin.define.ProductionFlags; import com.android.inputmethod.latin.setup.LauncherIconVisibilityManager; import com.android.inputmethod.latin.userdictionary.UserDictionaryList; import com.android.inputmethod.latin.userdictionary.UserDictionarySettings; @@ -199,7 +199,7 @@ public final class SettingsFragment extends InputMethodSettingsFragment correctionScreen.removePreference(dictionaryLink); } - if (ProductionFlag.IS_METRICS_LOGGING_SUPPORTED) { + if (ProductionFlags.IS_METRICS_LOGGING_SUPPORTED) { final Preference enableMetricsLogging = findPreference(Settings.PREF_ENABLE_METRICS_LOGGING); if (enableMetricsLogging != null) { diff --git a/java/src/com/android/inputmethod/latin/utils/SuggestionResults.java b/java/src/com/android/inputmethod/latin/utils/SuggestionResults.java index 5c109a68c..7170bd789 100644 --- a/java/src/com/android/inputmethod/latin/utils/SuggestionResults.java +++ b/java/src/com/android/inputmethod/latin/utils/SuggestionResults.java @@ -17,7 +17,7 @@ package com.android.inputmethod.latin.utils; import com.android.inputmethod.latin.SuggestedWords.SuggestedWordInfo; -import com.android.inputmethod.latin.define.ProductionFlag; +import com.android.inputmethod.latin.define.ProductionFlags; import java.util.ArrayList; import java.util.Collection; @@ -43,7 +43,7 @@ public final class SuggestionResults extends TreeSet { super(comparator); mLocale = locale; mCapacity = capacity; - if (ProductionFlag.INCLUDE_RAW_SUGGESTIONS) { + if (ProductionFlags.INCLUDE_RAW_SUGGESTIONS) { mRawSuggestions = new ArrayList<>(); } else { mRawSuggestions = null; -- cgit v1.2.3-83-g751a