summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/View.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/view/View.java')
-rw-r--r--core/java/android/view/View.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index b0e651a..888f0c0 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -6089,7 +6089,11 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
/* Check if the VISIBLE bit has changed */
if ((changed & INVISIBLE) != 0) {
needGlobalAttributesUpdate(false);
- invalidate(true);
+ /*
+ * If this view is becoming invisible, set the DRAWN flag so that
+ * the next invalidate() will not be skipped.
+ */
+ mPrivateFlags |= DRAWN;
if (((mViewFlags & VISIBILITY_MASK) == INVISIBLE) && hasFocus()) {
// root view becoming invisible shouldn't clear focus
@@ -8736,6 +8740,10 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
}
jumpDrawablesToCurrentState();
resolveLayoutDirection();
+ if (isFocused()) {
+ InputMethodManager imm = InputMethodManager.peekInstance();
+ imm.focusIn(this);
+ }
}
/**
@@ -11701,7 +11709,7 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
/**
* Utility to return a default size. Uses the supplied size if the
- * MeasureSpec imposed no contraints. Will get larger if allowed
+ * MeasureSpec imposed no constraints. Will get larger if allowed
* by the MeasureSpec.
*
* @param size Default size for this view
@@ -11711,7 +11719,7 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
public static int getDefaultSize(int size, int measureSpec) {
int result = size;
int specMode = MeasureSpec.getMode(measureSpec);
- int specSize = MeasureSpec.getSize(measureSpec);
+ int specSize = MeasureSpec.getSize(measureSpec);
switch (specMode) {
case MeasureSpec.UNSPECIFIED: