summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConley Owens <cco3@android.com>2011-04-28 23:52:45 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-04-28 23:52:45 -0700
commit54668b8a3599559fc007af1d75c039400a05e898 (patch)
tree055a18a0eb5397b999427b7352494e1670e6213e
parentf26ec38c344af8cf91575b461028a3033b940d49 (diff)
parente17870092941cecf64956819d395ec34111cbe71 (diff)
downloadframeworks_base-54668b8a3599559fc007af1d75c039400a05e898.zip
frameworks_base-54668b8a3599559fc007af1d75c039400a05e898.tar.gz
frameworks_base-54668b8a3599559fc007af1d75c039400a05e898.tar.bz2
am e1787009: Merge "Added null check on return value for getKeyDispatcherState()"
* commit 'e17870092941cecf64956819d395ec34111cbe71': 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 76755de..66524ab 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -1421,6 +1421,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) {
getKeyDispatcherState().startTracking(event, this);