summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathew Inwood <mathewi@google.com>2018-08-06 10:14:20 +0100
committerMathew Inwood <mathewi@google.com>2018-08-06 10:14:20 +0100
commita1c24bf8af7c069c4a93c082716ab4422fe19a11 (patch)
treed2f55db1a84d68249330177d603ca997311ef8ad
parent2ea36ff2ef0885166159a0ca9cdabab4364727ae (diff)
parentd609a403426118498ea17ec4ca3bc4ab9d4d057b (diff)
downloadbase-a1c24bf8af7c069c4a93c082716ab4422fe19a11.tar.gz
resolve merge conflicts of d609a403426118498ea17ec4ca3bc4ab9d4d057b to stage-aosp-master
Bug: None Test: I solemnly swear I tested this conflict resolution. Change-Id: I0049d94802b5e6801789e733847be4cfdabb0040
-rw-r--r--config/hiddenapi-light-greylist.txt20
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java11
-rw-r--r--core/java/android/inputmethodservice/Keyboard.java5
-rw-r--r--core/java/android/inputmethodservice/KeyboardView.java7
4 files changed, 23 insertions, 20 deletions
diff --git a/config/hiddenapi-light-greylist.txt b/config/hiddenapi-light-greylist.txt
index 8c320e07e793..0c886e9b6343 100644
--- a/config/hiddenapi-light-greylist.txt
+++ b/config/hiddenapi-light-greylist.txt
@@ -2376,26 +2376,6 @@ Landroid/icu/util/UResourceBundle;->getString()Ljava/lang/String;
Landroid/icu/util/UResourceBundle;->getType()I
Landroid/icu/util/UResourceBundleIterator;->hasNext()Z
Landroid/icu/util/UResourceBundleIterator;->next()Landroid/icu/util/UResourceBundle;
-Landroid/inputmethodservice/InputMethodService$SettingsObserver;->shouldShowImeWithHardKeyboard()Z
-Landroid/inputmethodservice/InputMethodService;->mExtractEditText:Landroid/inputmethodservice/ExtractEditText;
-Landroid/inputmethodservice/InputMethodService;->mExtractView:Landroid/view/View;
-Landroid/inputmethodservice/InputMethodService;->mRootView:Landroid/view/View;
-Landroid/inputmethodservice/InputMethodService;->mSettingsObserver:Landroid/inputmethodservice/InputMethodService$SettingsObserver;
-Landroid/inputmethodservice/InputMethodService;->mTheme:I
-Landroid/inputmethodservice/InputMethodService;->mTmpInsets:Landroid/inputmethodservice/InputMethodService$Insets;
-Landroid/inputmethodservice/InputMethodService;->onExtractedDeleteText(II)V
-Landroid/inputmethodservice/InputMethodService;->onExtractedReplaceText(IILjava/lang/CharSequence;)V
-Landroid/inputmethodservice/InputMethodService;->onExtractedSetSpan(Ljava/lang/Object;III)V
-Landroid/inputmethodservice/Keyboard;->mModifierKeys:Ljava/util/List;
-Landroid/inputmethodservice/Keyboard;->mTotalHeight:I
-Landroid/inputmethodservice/Keyboard;->mTotalWidth:I
-Landroid/inputmethodservice/Keyboard;->resize(II)V
-Landroid/inputmethodservice/KeyboardView;->mKeyBackground:Landroid/graphics/drawable/Drawable;
-Landroid/inputmethodservice/KeyboardView;->mLabelTextSize:I
-Landroid/inputmethodservice/KeyboardView;->mPreviewText:Landroid/widget/TextView;
-Landroid/inputmethodservice/KeyboardView;->openPopupIfRequired(Landroid/view/MotionEvent;)Z
-Landroid/inputmethodservice/KeyboardView;->repeatKey()Z
-Landroid/inputmethodservice/KeyboardView;->showKey(I)V
Landroid/location/Country;-><init>(Ljava/lang/String;I)V
Landroid/location/Country;->getCountryIso()Ljava/lang/String;
Landroid/location/Country;->getSource()I
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index b4c8a5e504bc..acaaf07984f0 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -28,6 +28,7 @@ import android.annotation.IntDef;
import android.annotation.MainThread;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UnsupportedAppUsage;
import android.app.ActivityManager;
import android.app.Dialog;
import android.content.Context;
@@ -343,10 +344,12 @@ public class InputMethodService extends AbstractInputMethodService {
InputMethodManager mImm;
+ @UnsupportedAppUsage
int mTheme = 0;
LayoutInflater mInflater;
TypedArray mThemeAttrs;
+ @UnsupportedAppUsage
View mRootView;
SoftInputWindow mWindow;
boolean mInitialized;
@@ -391,8 +394,10 @@ public class InputMethodService extends AbstractInputMethodService {
boolean mFullscreenApplied;
boolean mIsFullscreen;
+ @UnsupportedAppUsage
View mExtractView;
boolean mExtractViewHidden;
+ @UnsupportedAppUsage
ExtractEditText mExtractEditText;
ViewGroup mExtractAccessories;
View mExtractAction;
@@ -415,6 +420,7 @@ public class InputMethodService extends AbstractInputMethodService {
*/
boolean mShouldClearInsetOfPreviousIme;
+ @UnsupportedAppUsage
final Insets mTmpInsets = new Insets();
final int[] mTmpLocation = new int[2];
@@ -824,6 +830,7 @@ public class InputMethodService extends AbstractInputMethodService {
mService.getContentResolver().unregisterContentObserver(this);
}
+ @UnsupportedAppUsage
private boolean shouldShowImeWithHardKeyboard() {
// Lazily initialize as needed.
if (mShowImeWithHardKeyboard == ShowImeWithHardKeyboardType.UNKNOWN) {
@@ -863,6 +870,7 @@ public class InputMethodService extends AbstractInputMethodService {
return "SettingsObserver{mShowImeWithHardKeyboard=" + mShowImeWithHardKeyboard + "}";
}
}
+ @UnsupportedAppUsage
private SettingsObserver mSettingsObserver;
/**
@@ -2507,6 +2515,7 @@ public class InputMethodService extends AbstractInputMethodService {
/**
* @hide
*/
+ @UnsupportedAppUsage
public void onExtractedDeleteText(int start, int end) {
InputConnection conn = getCurrentInputConnection();
if (conn != null) {
@@ -2519,6 +2528,7 @@ public class InputMethodService extends AbstractInputMethodService {
/**
* @hide
*/
+ @UnsupportedAppUsage
public void onExtractedReplaceText(int start, int end, CharSequence text) {
InputConnection conn = getCurrentInputConnection();
if (conn != null) {
@@ -2530,6 +2540,7 @@ public class InputMethodService extends AbstractInputMethodService {
/**
* @hide
*/
+ @UnsupportedAppUsage
public void onExtractedSetSpan(Object span, int start, int end, int flags) {
InputConnection conn = getCurrentInputConnection();
if (conn != null) {
diff --git a/core/java/android/inputmethodservice/Keyboard.java b/core/java/android/inputmethodservice/Keyboard.java
index a5490eff0899..ec5f05067120 100644
--- a/core/java/android/inputmethodservice/Keyboard.java
+++ b/core/java/android/inputmethodservice/Keyboard.java
@@ -18,6 +18,7 @@ package android.inputmethodservice;
import org.xmlpull.v1.XmlPullParserException;
+import android.annotation.UnsupportedAppUsage;
import android.annotation.XmlRes;
import android.content.Context;
import android.content.res.Resources;
@@ -110,18 +111,21 @@ public class Keyboard {
private int mKeyHeight;
/** Total height of the keyboard, including the padding and keys */
+ @UnsupportedAppUsage
private int mTotalHeight;
/**
* Total width of the keyboard, including left side gaps and keys, but not any gaps on the
* right side.
*/
+ @UnsupportedAppUsage
private int mTotalWidth;
/** List of keys in this keyboard */
private List<Key> mKeys;
/** List of modifier keys such as Shift & Alt, if any */
+ @UnsupportedAppUsage
private List<Key> mModifierKeys;
/** Width of the screen available to fit the keyboard */
@@ -623,6 +627,7 @@ public class Keyboard {
rows.add(row);
}
+ @UnsupportedAppUsage
final void resize(int newWidth, int newHeight) {
int numRows = rows.size();
for (int rowIndex = 0; rowIndex < numRows; ++rowIndex) {
diff --git a/core/java/android/inputmethodservice/KeyboardView.java b/core/java/android/inputmethodservice/KeyboardView.java
index 16c1f6d59ca3..9ca804975b7a 100644
--- a/core/java/android/inputmethodservice/KeyboardView.java
+++ b/core/java/android/inputmethodservice/KeyboardView.java
@@ -16,6 +16,7 @@
package android.inputmethodservice;
+import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
@@ -133,6 +134,7 @@ public class KeyboardView extends View implements View.OnClickListener {
private Keyboard mKeyboard;
private int mCurrentKeyIndex = NOT_A_KEY;
+ @UnsupportedAppUsage
private int mLabelTextSize;
private int mKeyTextSize;
private int mKeyTextColor;
@@ -140,6 +142,7 @@ public class KeyboardView extends View implements View.OnClickListener {
private int mShadowColor;
private float mBackgroundDimAmount;
+ @UnsupportedAppUsage
private TextView mPreviewText;
private PopupWindow mPreviewPopup;
private int mPreviewTextSizeLarge;
@@ -217,6 +220,7 @@ public class KeyboardView extends View implements View.OnClickListener {
private float mOldPointerX;
private float mOldPointerY;
+ @UnsupportedAppUsage
private Drawable mKeyBackground;
private static final int REPEAT_INTERVAL = 50; // ~20 keys per second
@@ -910,6 +914,7 @@ public class KeyboardView extends View implements View.OnClickListener {
}
}
+ @UnsupportedAppUsage
private void showKey(final int keyIndex) {
final PopupWindow previewPopup = mPreviewPopup;
final Key[] keys = mKeys;
@@ -1052,6 +1057,7 @@ public class KeyboardView extends View implements View.OnClickListener {
key.x + key.width + mPaddingLeft, key.y + key.height + mPaddingTop);
}
+ @UnsupportedAppUsage
private boolean openPopupIfRequired(MotionEvent me) {
// Check if we have a popup layout specified first.
if (mPopupLayout == 0) {
@@ -1357,6 +1363,7 @@ public class KeyboardView extends View implements View.OnClickListener {
return true;
}
+ @UnsupportedAppUsage
private boolean repeatKey() {
Key key = mKeys[mRepeatKeyIndex];
detectAndSendKey(mCurrentKey, key.x, key.y, mLastTapTime);