From d99856c52b6474d6fdef0329e38e2b4d6c55a317 Mon Sep 17 00:00:00 2001 From: Andrew Grieve Date: Wed, 25 Feb 2015 12:14:39 -0500 Subject: [PATCH] CB-8510 Move requestFocusFromTouch into createViews from init() Makes more sense there since it's view-creation-related --- framework/src/org/apache/cordova/CordovaActivity.java | 3 +-- framework/src/org/apache/cordova/CordovaWebViewImpl.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/framework/src/org/apache/cordova/CordovaActivity.java b/framework/src/org/apache/cordova/CordovaActivity.java index 5f68333f..654f3b97 100755 --- a/framework/src/org/apache/cordova/CordovaActivity.java +++ b/framework/src/org/apache/cordova/CordovaActivity.java @@ -146,8 +146,6 @@ public class CordovaActivity extends Activity { if ("media".equals(volumePref.toLowerCase(Locale.ENGLISH))) { setVolumeControlStream(AudioManager.STREAM_MUSIC); } - - appView.getView().requestFocusFromTouch(); } @SuppressWarnings("deprecation") @@ -189,6 +187,7 @@ public class CordovaActivity extends Activity { int backgroundColor = preferences.getInteger("BackgroundColor", Color.BLACK); root.setBackgroundColor(backgroundColor); + appView.getView().requestFocusFromTouch(); } /** diff --git a/framework/src/org/apache/cordova/CordovaWebViewImpl.java b/framework/src/org/apache/cordova/CordovaWebViewImpl.java index aa816fbe..8efb1e08 100644 --- a/framework/src/org/apache/cordova/CordovaWebViewImpl.java +++ b/framework/src/org/apache/cordova/CordovaWebViewImpl.java @@ -278,8 +278,8 @@ public class CordovaWebViewImpl implements CordovaWebView { @Deprecated public void hideCustomView() { // This code is adapted from the original Android Browser code, licensed under the Apache License, Version 2.0 - Log.d(TAG, "Hiding Custom View"); if (mCustomView == null) return; + Log.d(TAG, "Hiding Custom View"); // Hide the custom view. mCustomView.setVisibility(View.GONE);