summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-11-16 13:06:37 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-16 13:06:37 -0800
commit39bbf2e07ce6f934588de1890385d706a1adc3be (patch)
treef00d3c8a9aee96fa2537ac9e67c2be0a4ad3537e
parentc6e844739a4ed05ceb5110b313a560e9e89a57d1 (diff)
parent4eb312faf9d7850dee4a1f10a41b343a4c923c03 (diff)
downloadpackages_apps_browser-39bbf2e07ce6f934588de1890385d706a1adc3be.zip
packages_apps_browser-39bbf2e07ce6f934588de1890385d706a1adc3be.tar.gz
packages_apps_browser-39bbf2e07ce6f934588de1890385d706a1adc3be.tar.bz2
am 4eb312fa: Merge "Fix NPE in NavigationBarBase.onAction" into ics-mr1
* commit '4eb312faf9d7850dee4a1f10a41b343a4c923c03': Fix NPE in NavigationBarBase.onAction
-rw-r--r--src/com/android/browser/NavigationBarBase.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/browser/NavigationBarBase.java b/src/com/android/browser/NavigationBarBase.java
index bfdd9a0..6a1b340 100644
--- a/src/com/android/browser/NavigationBarBase.java
+++ b/src/com/android/browser/NavigationBarBase.java
@@ -27,6 +27,7 @@ import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnFocusChangeListener;
+import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.LinearLayout;
@@ -177,7 +178,10 @@ public class NavigationBarBase extends LinearLayout implements
*/
@Override
public void onAction(String text, String extra, String source) {
- mUiController.getCurrentTopWebView().requestFocus();
+ WebView currentTopWebView = mUiController.getCurrentTopWebView();
+ if (currentTopWebView != null) {
+ currentTopWebView.requestFocus();
+ }
if (UrlInputView.TYPED.equals(source)) {
String url = UrlUtils.smartUrlFilter(text, false);
Tab t = mBaseUi.getActiveTab();