Merge "Deprecate android.inputmethodservice.{Keyboard,KeyboardView}"

This commit is contained in:
TreeHugger Robot
2018-12-15 21:06:14 +00:00
committed by Android (Google) Code Review
5 changed files with 121 additions and 68 deletions

View File

@@ -417,7 +417,7 @@ package android {
field public static final int clipOrientation = 16843274; // 0x101020a
field public static final int clipToPadding = 16842987; // 0x10100eb
field public static final int closeIcon = 16843905; // 0x1010481
field public static final int codes = 16843330; // 0x1010242
field public static final deprecated int codes = 16843330; // 0x1010242
field public static final int collapseColumns = 16843083; // 0x101014b
field public static final int collapseContentDescription = 16843984; // 0x10104d0
field public static final int collapseIcon = 16844031; // 0x10104ff
@@ -718,7 +718,7 @@ package android {
field public static final int homeAsUpIndicator = 16843531; // 0x101030b
field public static final int homeLayout = 16843549; // 0x101031d
field public static final int horizontalDivider = 16843053; // 0x101012d
field public static final int horizontalGap = 16843327; // 0x101023f
field public static final deprecated int horizontalGap = 16843327; // 0x101023f
field public static final int horizontalScrollViewStyle = 16843603; // 0x1010353
field public static final int horizontalSpacing = 16843028; // 0x1010114
field public static final int host = 16842792; // 0x1010028
@@ -726,7 +726,7 @@ package android {
field public static final int hotSpotY = 16844056; // 0x1010518
field public static final int hyphenationFrequency = 16843998; // 0x10104de
field public static final int icon = 16842754; // 0x1010002
field public static final int iconPreview = 16843337; // 0x1010249
field public static final deprecated int iconPreview = 16843337; // 0x1010249
field public static final int iconSpaceReserved = 16844129; // 0x1010561
field public static final int iconTint = 16844126; // 0x101055e
field public static final int iconTintMode = 16844127; // 0x101055f
@@ -787,12 +787,12 @@ package android {
field public static final int isGame = 16843764; // 0x10103f4
field public static final int isIndicator = 16843079; // 0x1010147
field public static final int isLightTheme = 16844176; // 0x1010590
field public static final int isModifier = 16843334; // 0x1010246
field public static final int isRepeatable = 16843336; // 0x1010248
field public static final deprecated int isModifier = 16843334; // 0x1010246
field public static final deprecated int isRepeatable = 16843336; // 0x1010248
field public static final int isScrollContainer = 16843342; // 0x101024e
field public static final int isSplitRequired = 16844177; // 0x1010591
field public static final int isStatic = 16844122; // 0x101055a
field public static final int isSticky = 16843335; // 0x1010247
field public static final deprecated int isSticky = 16843335; // 0x1010247
field public static final int isolatedProcess = 16843689; // 0x10103a9
field public static final int isolatedSplits = 16844107; // 0x101054b
field public static final int itemBackground = 16843056; // 0x1010130
@@ -802,27 +802,27 @@ package android {
field public static final int justificationMode = 16844135; // 0x1010567
field public static final int keepScreenOn = 16843286; // 0x1010216
field public static final int key = 16843240; // 0x10101e8
field public static final int keyBackground = 16843315; // 0x1010233
field public static final int keyEdgeFlags = 16843333; // 0x1010245
field public static final int keyHeight = 16843326; // 0x101023e
field public static final int keyIcon = 16843340; // 0x101024c
field public static final int keyLabel = 16843339; // 0x101024b
field public static final int keyOutputText = 16843338; // 0x101024a
field public static final int keyPreviewHeight = 16843321; // 0x1010239
field public static final int keyPreviewLayout = 16843319; // 0x1010237
field public static final int keyPreviewOffset = 16843320; // 0x1010238
field public static final deprecated int keyBackground = 16843315; // 0x1010233
field public static final deprecated int keyEdgeFlags = 16843333; // 0x1010245
field public static final deprecated int keyHeight = 16843326; // 0x101023e
field public static final deprecated int keyIcon = 16843340; // 0x101024c
field public static final deprecated int keyLabel = 16843339; // 0x101024b
field public static final deprecated int keyOutputText = 16843338; // 0x101024a
field public static final deprecated int keyPreviewHeight = 16843321; // 0x1010239
field public static final deprecated int keyPreviewLayout = 16843319; // 0x1010237
field public static final deprecated int keyPreviewOffset = 16843320; // 0x1010238
field public static final int keySet = 16843739; // 0x10103db
field public static final int keyTextColor = 16843318; // 0x1010236
field public static final int keyTextSize = 16843316; // 0x1010234
field public static final int keyWidth = 16843325; // 0x101023d
field public static final deprecated int keyTextColor = 16843318; // 0x1010236
field public static final deprecated int keyTextSize = 16843316; // 0x1010234
field public static final deprecated int keyWidth = 16843325; // 0x101023d
field public static final int keyboardLayout = 16843691; // 0x10103ab
field public static final int keyboardMode = 16843341; // 0x101024d
field public static final deprecated int keyboardMode = 16843341; // 0x101024d
field public static final int keyboardNavigationCluster = 16844096; // 0x1010540
field public static final int keycode = 16842949; // 0x10100c5
field public static final int killAfterRestore = 16843420; // 0x101029c
field public static final int label = 16842753; // 0x1010001
field public static final int labelFor = 16843718; // 0x10103c6
field public static final int labelTextSize = 16843317; // 0x1010235
field public static final deprecated int labelTextSize = 16843317; // 0x1010235
field public static final int languageTag = 16844040; // 0x1010508
field public static final int largeHeap = 16843610; // 0x101035a
field public static final int largeScreens = 16843398; // 0x1010286
@@ -1047,12 +1047,12 @@ package android {
field public static final int pointerIcon = 16844041; // 0x1010509
field public static final int popupAnimationStyle = 16843465; // 0x10102c9
field public static final int popupBackground = 16843126; // 0x1010176
field public static final int popupCharacters = 16843332; // 0x1010244
field public static final deprecated int popupCharacters = 16843332; // 0x1010244
field public static final int popupElevation = 16843916; // 0x101048c
field public static final int popupEnterTransition = 16844063; // 0x101051f
field public static final int popupExitTransition = 16844064; // 0x1010520
field public static final int popupKeyboard = 16843331; // 0x1010243
field public static final int popupLayout = 16843323; // 0x101023b
field public static final deprecated int popupKeyboard = 16843331; // 0x1010243
field public static final deprecated int popupLayout = 16843323; // 0x101023b
field public static final int popupMenuStyle = 16843520; // 0x1010300
field public static final int popupTheme = 16843945; // 0x10104a9
field public static final int popupWindowStyle = 16842870; // 0x1010076
@@ -1151,7 +1151,7 @@ package android {
field public static final int roundIcon = 16844076; // 0x101052c
field public static final int rowCount = 16843637; // 0x1010375
field public static final int rowDelay = 16843216; // 0x10101d0
field public static final int rowEdgeFlags = 16843329; // 0x1010241
field public static final deprecated int rowEdgeFlags = 16843329; // 0x1010241
field public static final int rowHeight = 16843058; // 0x1010132
field public static final int rowOrderPreserved = 16843638; // 0x1010376
field public static final int saveEnabled = 16842983; // 0x10100e7
@@ -1287,7 +1287,7 @@ package android {
field public static final int state_focused = 16842908; // 0x101009c
field public static final int state_hovered = 16843623; // 0x1010367
field public static final int state_last = 16842918; // 0x10100a6
field public static final int state_long_pressable = 16843324; // 0x101023c
field public static final deprecated int state_long_pressable = 16843324; // 0x101023c
field public static final int state_middle = 16842917; // 0x10100a5
field public static final int state_multiline = 16843597; // 0x101034d
field public static final int state_pressed = 16842919; // 0x10100a7
@@ -1525,9 +1525,9 @@ package android {
field public static final int versionCodeMajor = 16844150; // 0x1010576
field public static final int versionMajor = 16844151; // 0x1010577
field public static final int versionName = 16843292; // 0x101021c
field public static final int verticalCorrection = 16843322; // 0x101023a
field public static final deprecated int verticalCorrection = 16843322; // 0x101023a
field public static final int verticalDivider = 16843054; // 0x101012e
field public static final int verticalGap = 16843328; // 0x1010240
field public static final deprecated int verticalGap = 16843328; // 0x1010240
field public static final int verticalScrollbarPosition = 16843572; // 0x1010334
field public static final int verticalSpacing = 16843029; // 0x1010115
field public static final int viewportHeight = 16843779; // 0x1010403
@@ -1895,7 +1895,7 @@ package android {
field public static final int input = 16908297; // 0x1020009
field public static final int inputArea = 16908318; // 0x102001e
field public static final int inputExtractEditText = 16908325; // 0x1020025
field public static final int keyboardView = 16908326; // 0x1020026
field public static final deprecated int keyboardView = 16908326; // 0x1020026
field public static final int list = 16908298; // 0x102000a
field public static final int list_container = 16908351; // 0x102003f
field public static final int mask = 16908334; // 0x102002e
@@ -2606,7 +2606,7 @@ package android {
field public static final int Widget_Holo_WebView = 16973993; // 0x10300a9
field public static final int Widget_ImageButton = 16973862; // 0x1030026
field public static final int Widget_ImageWell = 16973861; // 0x1030025
field public static final int Widget_KeyboardView = 16973911; // 0x1030057
field public static final deprecated int Widget_KeyboardView = 16973911; // 0x1030057
field public static final int Widget_ListPopupWindow = 16973957; // 0x1030085
field public static final int Widget_ListView = 16973870; // 0x103002e
field public static final int Widget_ListView_DropDown = 16973872; // 0x1030030
@@ -22382,7 +22382,7 @@ package android.inputmethodservice {
field public int visibleTopInsets;
}
public class Keyboard {
public deprecated class Keyboard {
ctor public Keyboard(android.content.Context, int);
ctor public Keyboard(android.content.Context, int, int, int, int);
ctor public Keyboard(android.content.Context, int, int);
@@ -22456,7 +22456,7 @@ package android.inputmethodservice {
field public int verticalGap;
}
public class KeyboardView extends android.view.View implements android.view.View.OnClickListener {
public deprecated class KeyboardView extends android.view.View implements android.view.View.OnClickListener {
ctor public KeyboardView(android.content.Context, android.util.AttributeSet);
ctor public KeyboardView(android.content.Context, android.util.AttributeSet, int);
ctor public KeyboardView(android.content.Context, android.util.AttributeSet, int, int);

View File

@@ -16,8 +16,6 @@
package android.inputmethodservice;
import org.xmlpull.v1.XmlPullParserException;
import android.annotation.UnsupportedAppUsage;
import android.annotation.XmlRes;
import android.content.Context;
@@ -27,10 +25,12 @@ import android.content.res.XmlResourceParser;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.util.Log;
import android.util.TypedValue;
import android.util.Xml;
import android.util.DisplayMetrics;
import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
import java.util.ArrayList;
@@ -59,7 +59,12 @@ import java.util.StringTokenizer;
* @attr ref android.R.styleable#Keyboard_keyHeight
* @attr ref android.R.styleable#Keyboard_horizontalGap
* @attr ref android.R.styleable#Keyboard_verticalGap
* @deprecated This class is deprecated because this is just a convenient UI widget class that
* application developers can re-implement on top of existing public APIs. If you have
* already depended on this class, consider copying the implementation from AOSP into
* your project or re-implementing a similar widget by yourselves
*/
@Deprecated
public class Keyboard {
static final String TAG = "Keyboard";

View File

@@ -65,7 +65,13 @@ import java.util.Map;
* @attr ref android.R.styleable#KeyboardView_keyTextColor
* @attr ref android.R.styleable#KeyboardView_verticalCorrection
* @attr ref android.R.styleable#KeyboardView_popupLayout
*
* @deprecated This class is deprecated because this is just a convenient UI widget class that
* application developers can re-implement on top of existing public APIs. If you have
* already depended on this class, consider copying the implementation from AOSP into
* your project or re-implementing a similar widget by yourselves
*/
@Deprecated
public class KeyboardView extends View implements View.OnClickListener {
/**

View File

@@ -7632,103 +7632,143 @@
<declare-styleable name="VoiceInteractionSession">
</declare-styleable>
<!-- {@deprecated Copy this definition into your own application project.} -->
<declare-styleable name="KeyboardView">
<!-- Default KeyboardView style. -->
<!-- Default KeyboardView style.
{@deprecated Copy this definition into your own application project.} -->
<attr name="keyboardViewStyle" format="reference" />
<!-- Image for the key. This image needs to be a StateListDrawable, with the following
possible states: normal, pressed, checkable, checkable+pressed, checkable+checked,
checkable+checked+pressed. -->
checkable+checked+pressed.
{@deprecated Copy this definition into your own application project.} -->
<attr name="keyBackground" format="reference" />
<!-- Size of the text for character keys. -->
<!-- Size of the text for character keys.
{@deprecated Copy this definition into your own application project.} -->
<attr name="keyTextSize" format="dimension" />
<!-- Size of the text for custom keys with some text and no icon. -->
<!-- Size of the text for custom keys with some text and no icon.
{@deprecated Copy this definition into your own application project.} -->
<attr name="labelTextSize" format="dimension" />
<!-- Color to use for the label in a key. -->
<!-- Color to use for the label in a key.
{@deprecated Copy this definition into your own application project.} -->
<attr name="keyTextColor" format="color" />
<!-- Layout resource for key press feedback.-->
<!-- Layout resource for key press feedback.
{@deprecated Copy this definition into your own application project.} -->
<attr name="keyPreviewLayout" format="reference" />
<!-- Vertical offset of the key press feedback from the key. -->
<!-- Vertical offset of the key press feedback from the key.
{@deprecated Copy this definition into your own application project.} -->
<attr name="keyPreviewOffset" format="dimension" />
<!-- Height of the key press feedback popup. -->
<!-- Height of the key press feedback popup.
{@deprecated Copy this definition into your own application project.} -->
<attr name="keyPreviewHeight" format="dimension" />
<!-- Amount to offset the touch Y coordinate by, for bias correction. -->
<!-- Amount to offset the touch Y coordinate by, for bias correction.
{@deprecated Copy this definition into your own application project.} -->
<attr name="verticalCorrection" format="dimension" />
<!-- Layout resource for popup keyboards. -->
<!-- Layout resource for popup keyboards.
{@deprecated Copy this definition into your own application project.} -->
<attr name="popupLayout" format="reference" />
<!-- {@deprecated Copy this definition into your own application project.} -->
<attr name="shadowColor" />
<!-- {@deprecated Copy this definition into your own application project.} -->
<attr name="shadowRadius" />
</declare-styleable>
<!-- {@deprecated Copy this definition into your own application project.} -->
<declare-styleable name="KeyboardViewPreviewState">
<!-- State for {@link android.inputmethodservice.KeyboardView KeyboardView}
key preview background. -->
key preview background.
{@deprecated Copy this definition into your own application project.} -->
<attr name="state_long_pressable" format="boolean" />
</declare-styleable>
<!-- {@deprecated Copy this definition into your own application project.} -->
<declare-styleable name="Keyboard">
<!-- Default width of a key, in pixels or percentage of display width. -->
<!-- Default width of a key, in pixels or percentage of display width.
{@deprecated Copy this definition into your own application project.} -->
<attr name="keyWidth" format="dimension|fraction" />
<!-- Default height of a key, in pixels or percentage of display width. -->
<!-- Default height of a key, in pixels or percentage of display width.
{@deprecated Copy this definition into your own application project.} -->
<attr name="keyHeight" format="dimension|fraction" />
<!-- Default horizontal gap between keys. -->
<!-- Default horizontal gap between keys.
{@deprecated Copy this definition into your own application project.} -->
<attr name="horizontalGap" format="dimension|fraction" />
<!-- Default vertical gap between rows of keys. -->
<!-- Default vertical gap between rows of keys.
{@deprecated Copy this definition into your own application project.} -->
<attr name="verticalGap" format="dimension|fraction" />
</declare-styleable>
<!-- {@deprecated Copy this definition into your own application project.} -->
<declare-styleable name="Keyboard_Row">
<!-- Row edge flags. -->
<!-- Row edge flags.
{@deprecated Copy this definition into your own application project.} -->
<attr name="rowEdgeFlags">
<!-- Row is anchored to the top of the keyboard. -->
<!-- Row is anchored to the top of the keyboard.
{@deprecated Copy this definition into your own application project.} -->
<flag name="top" value="4" />
<!-- Row is anchored to the bottom of the keyboard. -->
<!-- Row is anchored to the bottom of the keyboard.
{@deprecated Copy this definition into your own application project.} -->
<flag name="bottom" value="8" />
</attr>
<!-- Mode of the keyboard. If the mode doesn't match the
requested keyboard mode, the row will be skipped. -->
requested keyboard mode, the row will be skipped.
{@deprecated Copy this definition into your own application project.} -->
<attr name="keyboardMode" format="reference" />
</declare-styleable>
<!-- {@deprecated Copy this definition into your own application project.} -->
<declare-styleable name="Keyboard_Key">
<!-- The unicode value or comma-separated values that this key outputs. -->
<!-- The unicode value or comma-separated values that this key outputs.
{@deprecated Copy this definition into your own application project.} -->
<attr name="codes" format="integer|string" />
<!-- The XML keyboard layout of any popup keyboard. -->
<!-- The XML keyboard layout of any popup keyboard.
{@deprecated Copy this definition into your own application project.} -->
<attr name="popupKeyboard" format="reference" />
<!-- The characters to display in the popup keyboard. -->
<!-- The characters to display in the popup keyboard.
{@deprecated Copy this definition into your own application project.} -->
<attr name="popupCharacters" format="string" />
<!-- Key edge flags. -->
<!-- Key edge flags.
{@deprecated Copy this definition into your own application project.} -->
<attr name="keyEdgeFlags">
<!-- Key is anchored to the left of the keyboard. -->
<!-- Key is anchored to the left of the keyboard.
{@deprecated Copy this definition into your own application project.} -->
<flag name="left" value="1" />
<!-- Key is anchored to the right of the keyboard. -->
<!-- Key is anchored to the right of the keyboard.
{@deprecated Copy this definition into your own application project.} -->
<flag name="right" value="2" />
</attr>
<!-- Whether this is a modifier key such as Alt or Shift. -->
<!-- Whether this is a modifier key such as Alt or Shift.
{@deprecated Copy this definition into your own application project.} -->
<attr name="isModifier" format="boolean" />
<!-- Whether this is a toggle key. -->
<!-- Whether this is a toggle key.
{@deprecated Copy this definition into your own application project.} -->
<attr name="isSticky" format="boolean" />
<!-- Whether long-pressing on this key will make it repeat. -->
<!-- Whether long-pressing on this key will make it repeat.
{@deprecated Copy this definition into your own application project.} -->
<attr name="isRepeatable" format="boolean" />
<!-- The icon to show in the popup preview. -->
<!-- The icon to show in the popup preview.
{@deprecated Copy this definition into your own application project.} -->
<attr name="iconPreview" format="reference" />
<!-- The string of characters to output when this key is pressed. -->
<!-- The string of characters to output when this key is pressed.
{@deprecated Copy this definition into your own application project.} -->
<attr name="keyOutputText" format="string" />
<!-- The label to display on the key. -->
<!-- The label to display on the key.
{@deprecated Copy this definition into your own application project.} -->
<attr name="keyLabel" format="string" />
<!-- The icon to display on the key instead of the label. -->
<!-- The icon to display on the key instead of the label.
{@deprecated Copy this definition into your own application project.} -->
<attr name="keyIcon" format="reference" />
<!-- Mode of the keyboard. If the mode doesn't match the
requested keyboard mode, the key will be skipped. -->
requested keyboard mode, the key will be skipped.
{@deprecated Copy this definition into your own application project.} -->
<attr name="keyboardMode" />
</declare-styleable>

View File

@@ -1067,7 +1067,8 @@
<public type="id" name="inputExtractEditText" id="0x01020025" />
<!-- View ID of the {@link android.inputmethodservice.KeyboardView} within
an input method's input area. -->
an input method's input area.
{@deprecated Use Copy this definition into your own application project.} -->
<public type="id" name="keyboardView" id="0x01020026" />
<!-- View ID of a {@link android.view.View} to close a popup keyboard -->
<public type="id" name="closeButton" id="0x01020027" />
@@ -1082,6 +1083,7 @@
<public type="style" name="Theme.InputMethod" id="0x01030054" />
<public type="style" name="Theme.NoDisplay" id="0x01030055" />
<public type="style" name="Animation.InputMethod" id="0x01030056" />
<!-- {@deprecated Use Copy this definition into your own application project.} -->
<public type="style" name="Widget.KeyboardView" id="0x01030057" />
<public type="style" name="ButtonBar" id="0x01030058" />
<public type="style" name="Theme.Panel" id="0x01030059" />