summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2015-05-07 20:07:47 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-07 20:07:48 +0000
commit34dd5824f5c6ffe64ddc347cbd0eb65cd9321a7d (patch)
tree9ece50ccf58a9105e88c73637fb884edea8aefb2
parent411feedf68dd52cd6e9777bb163f63eee73bfe32 (diff)
parentc8bfc68cddc15787943e7db1ba1cfeb26d4f74d3 (diff)
downloadframeworks_base-34dd5824f5c6ffe64ddc347cbd0eb65cd9321a7d.zip
frameworks_base-34dd5824f5c6ffe64ddc347cbd0eb65cd9321a7d.tar.gz
frameworks_base-34dd5824f5c6ffe64ddc347cbd0eb65cd9321a7d.tar.bz2
Merge "Only resize list popup if it's still attached to a window" into mnc-dev
-rw-r--r--core/java/android/widget/ListPopupWindow.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/widget/ListPopupWindow.java b/core/java/android/widget/ListPopupWindow.java
index 05866f0..94b9416 100644
--- a/core/java/android/widget/ListPopupWindow.java
+++ b/core/java/android/widget/ListPopupWindow.java
@@ -1791,8 +1791,9 @@ public class ListPopupWindow {
private class ResizePopupRunnable implements Runnable {
public void run() {
- if (mDropDownList != null && mDropDownList.getCount() > mDropDownList.getChildCount() &&
- mDropDownList.getChildCount() <= mListItemExpandMaximum) {
+ if (mDropDownList != null && mDropDownList.isAttachedToWindow()
+ && mDropDownList.getCount() > mDropDownList.getChildCount()
+ && mDropDownList.getChildCount() <= mListItemExpandMaximum) {
mPopup.setInputMethodMode(PopupWindow.INPUT_METHOD_NOT_NEEDED);
show();
}