diff options
author | John Reck <jreck@google.com> | 2012-05-30 09:45:28 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2012-05-30 09:45:28 -0700 |
commit | fcb6095b9140296cf3b5a4af3107500ee943bacc (patch) | |
tree | b4753c961ce0751c61d50f7203796a2fc6aaa121 | |
parent | e7ac37e77ad8605b5e730fe48f088bb77df4b57a (diff) | |
download | packages_apps_Browser-fcb6095b9140296cf3b5a4af3107500ee943bacc.zip packages_apps_Browser-fcb6095b9140296cf3b5a4af3107500ee943bacc.tar.gz packages_apps_Browser-fcb6095b9140296cf3b5a4af3107500ee943bacc.tar.bz2 |
Make sure focusSearch doesn't return a detached webview
Bug: 6535227
Change-Id: I18bf24117d8ffcbbd440b2a47b2db422e41894f4
-rw-r--r-- | src/com/android/browser/TitleBar.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/browser/TitleBar.java b/src/com/android/browser/TitleBar.java index ffe5553..d3e8f7c 100644 --- a/src/com/android/browser/TitleBar.java +++ b/src/com/android/browser/TitleBar.java @@ -405,8 +405,10 @@ public class TitleBar extends RelativeLayout { @Override public View focusSearch(View focused, int dir) { - if (FOCUS_DOWN == dir && hasFocus()) { - return getCurrentWebView(); + WebView web = getCurrentWebView(); + if (FOCUS_DOWN == dir && hasFocus() + && web.hasFocusable() && web.getParent() != null) { + return web; } return super.focusSearch(focused, dir); } |