diff options
author | Conley Owens <cco3@android.com> | 2011-04-29 14:57:53 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-04-29 14:57:53 -0700 |
commit | c703b49eb13993c45a1cab7ea1130601fba1df3e (patch) | |
tree | 8ec4084f69116eea462a664e45d0feb6aab2ada9 | |
parent | 7dcdfd7988d1e57c7a705a2d7294e8bfa2b8afc9 (diff) | |
parent | 54668b8a3599559fc007af1d75c039400a05e898 (diff) | |
download | frameworks_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.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 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(); |