summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConley Owens <cco3@android.com>2011-04-29 15:11:48 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-04-29 15:11:48 -0700
commit19b7cd95ffa9be9e2399b120cc11749b0f54c125 (patch)
tree5b6bffe86bd65baeb88ef6cade3f701dfd5c7e04
parent17f83df9604ef9239694e8fd5a9efb894fd28453 (diff)
parentc703b49eb13993c45a1cab7ea1130601fba1df3e (diff)
downloadframeworks_base-19b7cd95ffa9be9e2399b120cc11749b0f54c125.zip
frameworks_base-19b7cd95ffa9be9e2399b120cc11749b0f54c125.tar.gz
frameworks_base-19b7cd95ffa9be9e2399b120cc11749b0f54c125.tar.bz2
am c703b49e: am 54668b8a: am e1787009: Merge "Added null check on return value for getKeyDispatcherState()"
* commit 'c703b49eb13993c45a1cab7ea1130601fba1df3e': Added null check on return value for getKeyDispatcherState()
-rw-r--r--core/java/android/widget/PopupWindow.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index 72b70bc..de32c2b 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -1489,6 +1489,10 @@ public class PopupWindow {
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
+ if (getKeyDispatcherState() == null) {
+ return super.dispatchKeyEvent(event);
+ }
+
if (event.getAction() == KeyEvent.ACTION_DOWN
&& event.getRepeatCount() == 0) {
KeyEvent.DispatcherState state = getKeyDispatcherState();