aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/Constants.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2012-04-19 12:42:13 +0900
committerTadashi G. Takaoka <takaoka@google.com>2012-04-19 19:45:19 +0900
commit1cb08acaf3b4d58cbf4cb65f9fc3990b39e33f00 (patch)
treef08afa5916d53c029c53b78a1703834d65c9b005 /java/src/com/android/inputmethod/latin/Constants.java
parentc27fe6253c1d8b3ad3c2f891a48ec5c54d77a3f1 (diff)
downloadlatinime-1cb08acaf3b4d58cbf4cb65f9fc3990b39e33f00.tar.gz
latinime-1cb08acaf3b4d58cbf4cb65f9fc3990b39e33f00.tar.xz
latinime-1cb08acaf3b4d58cbf4cb65f9fc3990b39e33f00.zip
Add Constants class to hold public constants
This change also gets rid of compiler warnings about "deprecations". Change-Id: Id9b83483c453a81ebac34b684656db05e3599657
Diffstat (limited to 'java/src/com/android/inputmethod/latin/Constants.java')
-rw-r--r--java/src/com/android/inputmethod/latin/Constants.java103
1 files changed, 103 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/Constants.java b/java/src/com/android/inputmethod/latin/Constants.java
new file mode 100644
index 000000000..b205cc004
--- /dev/null
+++ b/java/src/com/android/inputmethod/latin/Constants.java
@@ -0,0 +1,103 @@
+/*
+ * 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;
+
+import android.view.inputmethod.EditorInfo;
+
+public final class Constants {
+ public static final class ImeOption {
+ /**
+ * The private IME option used to indicate that no microphone should be shown for a given
+ * text field. For instance, this is specified by the search dialog when the dialog is
+ * already showing a voice search button.
+ *
+ * @deprecated Use {@link ImeOption#NO_MICROPHONE} with package name prefixed.
+ */
+ @SuppressWarnings("dep-ann")
+ public static final String NO_MICROPHONE_COMPAT = "nm";
+
+ /**
+ * The private IME option used to indicate that no microphone should be shown for a given
+ * text field. For instance, this is specified by the search dialog when the dialog is
+ * already showing a voice search button.
+ */
+ public static final String NO_MICROPHONE = "noMicrophoneKey";
+
+ /**
+ * The private IME option used to indicate that no settings key should be shown for a given
+ * text field.
+ */
+ public static final String NO_SETTINGS_KEY = "noSettingsKey";
+
+ /**
+ * The private IME option used to indicate that the given text field needs ASCII code points
+ * input.
+ *
+ * @deprecated Use {@link EditorInfo#IME_FLAG_FORCE_ASCII}.
+ */
+ @SuppressWarnings("dep-ann")
+ public static final String FORCE_ASCII = "forceAscii";
+
+ private ImeOption() {
+ // This utility class is not publicly instantiable.
+ }
+ }
+
+ public static final class Subtype {
+ /**
+ * The subtype mode used to indicate that the subtype is a keyboard.
+ */
+ public static final String KEYBOARD_MODE = "keyboard";
+
+ public static final class ExtraValue {
+ /**
+ * The subtype extra value used to indicate that the subtype keyboard layout set name.
+ */
+ public static final String KEYBOARD_LAYOUT_SET = "KeyboardLayoutSet";
+
+ /**
+ * The subtype extra value used to indicate that the subtype keyboard layout is capable
+ * for typing ASCII characters.
+ */
+ public static final String ASCII_CAPABLE = "AsciiCapable";
+
+ /**
+ * The subtype extra value used to indicate that the subtype require network connection
+ * to work.
+ */
+ public static final String REQ_NETWORK_CONNECTIVITY = "requireNetworkConnectivity";
+
+ /**
+ * The subtype extra value used to indicate that the subtype is additional subtype
+ * that the user defined. This extra value is private to LatinIME.
+ */
+ public static final String IS_ADDITIONAL_SUBTYPE = "isAdditionalSubtype";
+
+ private ExtraValue() {
+ // This utility class is not publicly instantiable.
+ }
+ }
+
+ private Subtype() {
+ // This utility class is not publicly instantiable.
+ }
+ }
+
+ private Constants() {
+ // This utility class is not publicly instantiable.
+ }
+}