summaryrefslogtreecommitdiffstats
path: root/src/com/android/browser/TitleBar.java
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-05-30 09:45:28 -0700
committerJohn Reck <jreck@google.com>2012-05-30 09:45:28 -0700
commitfcb6095b9140296cf3b5a4af3107500ee943bacc (patch)
treeb4753c961ce0751c61d50f7203796a2fc6aaa121 /src/com/android/browser/TitleBar.java
parente7ac37e77ad8605b5e730fe48f088bb77df4b57a (diff)
downloadpackages_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
Diffstat (limited to 'src/com/android/browser/TitleBar.java')
-rw-r--r--src/com/android/browser/TitleBar.java6
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);
}