diff options
author | Conley Owens <cco3@android.com> | 2011-04-28 23:52:45 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-04-28 23:52:45 -0700 |
commit | 54668b8a3599559fc007af1d75c039400a05e898 (patch) | |
tree | 055a18a0eb5397b999427b7352494e1670e6213e | |
parent | f26ec38c344af8cf91575b461028a3033b940d49 (diff) | |
parent | e17870092941cecf64956819d395ec34111cbe71 (diff) | |
download | frameworks_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.java | 4 |
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); |