1 /* 2 * Copyright (C) 2012 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 5 * use this file except in compliance with the License. You may obtain a copy of 6 * the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 13 * License for the specific language governing permissions and limitations under 14 * the License. 15 */ 16 17 package com.android.inputmethod.latin; 18 19 import android.view.inputmethod.EditorInfo; 20 21 public final class Constants { 22 public static final class ImeOption { 23 /** 24 * The private IME option used to indicate that no microphone should be shown for a given 25 * text field. For instance, this is specified by the search dialog when the dialog is 26 * already showing a voice search button. 27 * 28 * @deprecated Use {@link ImeOption#NO_MICROPHONE} with package name prefixed. 29 */ 30 @SuppressWarnings("dep-ann") 31 public static final String NO_MICROPHONE_COMPAT = "nm"; 32 33 /** 34 * The private IME option used to indicate that no microphone should be shown for a given 35 * text field. For instance, this is specified by the search dialog when the dialog is 36 * already showing a voice search button. 37 */ 38 public static final String NO_MICROPHONE = "noMicrophoneKey"; 39 40 /** 41 * The private IME option used to indicate that no settings key should be shown for a given 42 * text field. 43 */ 44 public static final String NO_SETTINGS_KEY = "noSettingsKey"; 45 46 /** 47 * The private IME option used to indicate that the given text field needs ASCII code points 48 * input. 49 * 50 * @deprecated Use {@link EditorInfo#IME_FLAG_FORCE_ASCII}. 51 */ 52 @SuppressWarnings("dep-ann") 53 public static final String FORCE_ASCII = "forceAscii"; 54 ImeOption()55 private ImeOption() { 56 // This utility class is not publicly instantiable. 57 } 58 } 59 60 public static final class Subtype { 61 /** 62 * The subtype mode used to indicate that the subtype is a keyboard. 63 */ 64 public static final String KEYBOARD_MODE = "keyboard"; 65 66 public static final class ExtraValue { 67 /** 68 * The subtype extra value used to indicate that the subtype keyboard layout is capable 69 * for typing ASCII characters. 70 */ 71 public static final String ASCII_CAPABLE = "AsciiCapable"; 72 73 /** 74 * The subtype extra value used to indicate that the subtype require network connection 75 * to work. 76 */ 77 public static final String REQ_NETWORK_CONNECTIVITY = "requireNetworkConnectivity"; 78 79 /** 80 * The subtype extra value used to indicate that the subtype display name contains "%s" 81 * for replacement mark and it should be replaced by this extra value. 82 * This extra value is supported on JellyBean and later. 83 */ 84 public static final String UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME = 85 "UntranslatableReplacementStringInSubtypeName"; 86 87 /** 88 * The subtype extra value used to indicate that the subtype keyboard layout set name. 89 * This extra value is private to LatinIME. 90 */ 91 public static final String KEYBOARD_LAYOUT_SET = "KeyboardLayoutSet"; 92 93 /** 94 * The subtype extra value used to indicate that the subtype is additional subtype 95 * that the user defined. This extra value is private to LatinIME. 96 */ 97 public static final String IS_ADDITIONAL_SUBTYPE = "isAdditionalSubtype"; 98 ExtraValue()99 private ExtraValue() { 100 // This utility class is not publicly instantiable. 101 } 102 } 103 Subtype()104 private Subtype() { 105 // This utility class is not publicly instantiable. 106 } 107 } 108 109 public static class TextUtils { 110 /** 111 * Capitalization mode for {@link android.text.TextUtils#getCapsMode}: don't capitalize 112 * characters. This value may be used with 113 * {@link android.text.TextUtils#CAP_MODE_CHARACTERS}, 114 * {@link android.text.TextUtils#CAP_MODE_WORDS}, and 115 * {@link android.text.TextUtils#CAP_MODE_SENTENCES}. 116 */ 117 public static final int CAP_MODE_OFF = 0; 118 TextUtils()119 private TextUtils() { 120 // This utility class is not publicly instantiable. 121 } 122 } 123 Constants()124 private Constants() { 125 // This utility class is not publicly instantiable. 126 } 127 } 128