summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConley Owens <cco3@android.com>2011-04-29 14:57:53 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-04-29 14:57:53 -0700
commitc703b49eb13993c45a1cab7ea1130601fba1df3e (patch)
tree8ec4084f69116eea462a664e45d0feb6aab2ada9
parent7dcdfd7988d1e57c7a705a2d7294e8bfa2b8afc9 (diff)
parent54668b8a3599559fc007af1d75c039400a05e898 (diff)
downloadframeworks_base-c703b49eb13993c45a1cab7ea1130601fba1df3e.zip
frameworks_base-c703b49eb13993c45a1cab7ea1130601fba1df3e.tar.gz
frameworks_base-c703b49eb13993c45a1cab7ea1130601fba1df3e.tar.bz2
am 54668b8a: am e1787009: Merge "Added null check on return value for getKeyDispatcherState()"
* commit '54668b8a3599559fc007af1d75c039400a05e898': 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();