Merge change 4940 into donut
* changes: Fixes #1933585. Don't dismiss ACTV's drop down when it's set to alwaysVisible.
This commit is contained in:
@@ -18,7 +18,6 @@ package android.view;
|
|||||||
|
|
||||||
import android.content.pm.ActivityInfo;
|
import android.content.pm.ActivityInfo;
|
||||||
import android.graphics.PixelFormat;
|
import android.graphics.PixelFormat;
|
||||||
import android.graphics.Rect;
|
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
@@ -805,6 +804,7 @@ public interface WindowManager extends ViewManager {
|
|||||||
screenOrientation = in.readInt();
|
screenOrientation = in.readInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings({"PointlessBitwiseExpression"})
|
||||||
public static final int LAYOUT_CHANGED = 1<<0;
|
public static final int LAYOUT_CHANGED = 1<<0;
|
||||||
public static final int TYPE_CHANGED = 1<<1;
|
public static final int TYPE_CHANGED = 1<<1;
|
||||||
public static final int FLAGS_CHANGED = 1<<2;
|
public static final int FLAGS_CHANGED = 1<<2;
|
||||||
|
|||||||
@@ -585,7 +585,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
|
|||||||
if (isPopupShowing()) {
|
if (isPopupShowing()) {
|
||||||
// special case for the back key, we do not even try to send it
|
// special case for the back key, we do not even try to send it
|
||||||
// to the drop down list but instead, consume it immediately
|
// to the drop down list but instead, consume it immediately
|
||||||
if (keyCode == KeyEvent.KEYCODE_BACK) {
|
if (keyCode == KeyEvent.KEYCODE_BACK && !mDropDownAlwaysVisible) {
|
||||||
dismissDropDown();
|
dismissDropDown();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -755,7 +755,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
|
|||||||
} else {
|
} else {
|
||||||
// drop down is automatically dismissed when enough characters
|
// drop down is automatically dismissed when enough characters
|
||||||
// are deleted from the text view
|
// are deleted from the text view
|
||||||
dismissDropDown();
|
if (!mDropDownAlwaysVisible) dismissDropDown();
|
||||||
if (mFilter != null) {
|
if (mFilter != null) {
|
||||||
mFilter.filter(null);
|
mFilter.filter(null);
|
||||||
}
|
}
|
||||||
@@ -896,7 +896,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mDropDownDismissedOnCompletion) {
|
if (mDropDownDismissedOnCompletion && !mDropDownAlwaysVisible) {
|
||||||
dismissDropDown();
|
dismissDropDown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -977,7 +977,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
|
|||||||
if (hasFocus() && hasWindowFocus()) {
|
if (hasFocus() && hasWindowFocus()) {
|
||||||
showDropDown();
|
showDropDown();
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!mDropDownAlwaysVisible) {
|
||||||
dismissDropDown();
|
dismissDropDown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -986,7 +986,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
|
|||||||
public void onWindowFocusChanged(boolean hasWindowFocus) {
|
public void onWindowFocusChanged(boolean hasWindowFocus) {
|
||||||
super.onWindowFocusChanged(hasWindowFocus);
|
super.onWindowFocusChanged(hasWindowFocus);
|
||||||
performValidation();
|
performValidation();
|
||||||
if (!hasWindowFocus) {
|
if (!hasWindowFocus && !mDropDownAlwaysVisible) {
|
||||||
dismissDropDown();
|
dismissDropDown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -995,7 +995,7 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe
|
|||||||
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
|
protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) {
|
||||||
super.onFocusChanged(focused, direction, previouslyFocusedRect);
|
super.onFocusChanged(focused, direction, previouslyFocusedRect);
|
||||||
performValidation();
|
performValidation();
|
||||||
if (!focused) {
|
if (!focused && !mDropDownAlwaysVisible) {
|
||||||
dismissDropDown();
|
dismissDropDown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -823,6 +823,7 @@ public class PopupWindow {
|
|||||||
p.flags = computeFlags(p.flags);
|
p.flags = computeFlags(p.flags);
|
||||||
p.type = WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
|
p.type = WindowManager.LayoutParams.TYPE_APPLICATION_PANEL;
|
||||||
p.token = token;
|
p.token = token;
|
||||||
|
p.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
|
||||||
p.setTitle("PopupWindow:" + Integer.toHexString(hashCode()));
|
p.setTitle("PopupWindow:" + Integer.toHexString(hashCode()));
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
|
|||||||
Reference in New Issue
Block a user