You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2016/08/22 20:41:41 UTC
cordova-plugin-inappbrowser git commit: Plugin uses Android Log class
and not Cordova LOG class
Repository: cordova-plugin-inappbrowser
Updated Branches:
refs/heads/master 4a0442b95 -> 57b50b1d6
Plugin uses Android Log class and not Cordova LOG class
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/57b50b1d
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/57b50b1d
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/57b50b1d
Branch: refs/heads/master
Commit: 57b50b1d652a8d8a6d7228eb3c7a0a95d7a4f298
Parents: 4a0442b
Author: Simon MacDonald <si...@gmail.com>
Authored: Mon Aug 22 16:41:34 2016 -0400
Committer: Simon MacDonald <si...@gmail.com>
Committed: Mon Aug 22 16:41:34 2016 -0400
----------------------------------------------------------------------
src/android/InAppBrowser.java | 45 ++++++++++++++++----------------
src/android/InAppBrowserDialog.java | 1 -
2 files changed, 22 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/57b50b1d/src/android/InAppBrowser.java
----------------------------------------------------------------------
diff --git a/src/android/InAppBrowser.java b/src/android/InAppBrowser.java
index 5a9b9af..cd4ec03 100644
--- a/src/android/InAppBrowser.java
+++ b/src/android/InAppBrowser.java
@@ -29,7 +29,6 @@ import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.text.InputType;
-import android.util.Log;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.KeyEvent;
@@ -121,7 +120,7 @@ public class InAppBrowser extends CordovaPlugin {
final String target = t;
final HashMap<String, Boolean> features = parseFeature(args.optString(2));
- Log.d(LOG_TAG, "target = " + target);
+ LOG.d(LOG_TAG, "target = " + target);
this.cordova.getActivity().runOnUiThread(new Runnable() {
@Override
@@ -129,7 +128,7 @@ public class InAppBrowser extends CordovaPlugin {
String result = "";
// SELF
if (SELF.equals(target)) {
- Log.d(LOG_TAG, "in self");
+ LOG.d(LOG_TAG, "in self");
/* This code exists for compatibility between 3.x and 4.x versions of Cordova.
* Previously the Config class had a static method, isUrlWhitelisted(). That
* responsibility has been moved to the plugins, with an aggregating method in
@@ -144,11 +143,11 @@ public class InAppBrowser extends CordovaPlugin {
Method iuw = Config.class.getMethod("isUrlWhiteListed", String.class);
shouldAllowNavigation = (Boolean)iuw.invoke(null, url);
} catch (NoSuchMethodException e) {
- Log.d(LOG_TAG, e.getLocalizedMessage());
+ LOG.d(LOG_TAG, e.getLocalizedMessage());
} catch (IllegalAccessException e) {
- Log.d(LOG_TAG, e.getLocalizedMessage());
+ LOG.d(LOG_TAG, e.getLocalizedMessage());
} catch (InvocationTargetException e) {
- Log.d(LOG_TAG, e.getLocalizedMessage());
+ LOG.d(LOG_TAG, e.getLocalizedMessage());
}
}
if (shouldAllowNavigation == null) {
@@ -158,23 +157,23 @@ public class InAppBrowser extends CordovaPlugin {
Method san = pm.getClass().getMethod("shouldAllowNavigation", String.class);
shouldAllowNavigation = (Boolean)san.invoke(pm, url);
} catch (NoSuchMethodException e) {
- Log.d(LOG_TAG, e.getLocalizedMessage());
+ LOG.d(LOG_TAG, e.getLocalizedMessage());
} catch (IllegalAccessException e) {
- Log.d(LOG_TAG, e.getLocalizedMessage());
+ LOG.d(LOG_TAG, e.getLocalizedMessage());
} catch (InvocationTargetException e) {
- Log.d(LOG_TAG, e.getLocalizedMessage());
+ LOG.d(LOG_TAG, e.getLocalizedMessage());
}
}
// load in webview
if (Boolean.TRUE.equals(shouldAllowNavigation)) {
- Log.d(LOG_TAG, "loading in webview");
+ LOG.d(LOG_TAG, "loading in webview");
webView.loadUrl(url);
}
//Load the dialer
else if (url.startsWith(WebView.SCHEME_TEL))
{
try {
- Log.d(LOG_TAG, "loading in dialer");
+ LOG.d(LOG_TAG, "loading in dialer");
Intent intent = new Intent(Intent.ACTION_DIAL);
intent.setData(Uri.parse(url));
cordova.getActivity().startActivity(intent);
@@ -184,18 +183,18 @@ public class InAppBrowser extends CordovaPlugin {
}
// load in InAppBrowser
else {
- Log.d(LOG_TAG, "loading in InAppBrowser");
+ LOG.d(LOG_TAG, "loading in InAppBrowser");
result = showWebPage(url, features);
}
}
// SYSTEM
else if (SYSTEM.equals(target)) {
- Log.d(LOG_TAG, "in system");
+ LOG.d(LOG_TAG, "in system");
result = openExternal(url);
}
// BLANK - or anything else
else {
- Log.d(LOG_TAG, "in blank");
+ LOG.d(LOG_TAG, "in blank");
result = showWebPage(url, features);
}
@@ -384,7 +383,7 @@ public class InAppBrowser extends CordovaPlugin {
this.cordova.getActivity().startActivity(intent);
return "";
} catch (android.content.ActivityNotFoundException e) {
- Log.d(LOG_TAG, "InAppBrowser: Error loading url "+url+":"+ e.toString());
+ LOG.d(LOG_TAG, "InAppBrowser: Error loading url "+url+":"+ e.toString());
return e.toString();
}
}
@@ -422,7 +421,7 @@ public class InAppBrowser extends CordovaPlugin {
obj.put("type", EXIT_EVENT);
sendUpdate(obj, false);
} catch (JSONException ex) {
- Log.d(LOG_TAG, "Should never happen");
+ LOG.d(LOG_TAG, "Should never happen");
}
}
});
@@ -945,7 +944,7 @@ public class InAppBrowser extends CordovaPlugin {
sendUpdate(obj, true);
} catch (JSONException ex) {
- Log.d(LOG_TAG, "Should never happen");
+ LOG.d(LOG_TAG, "Should never happen");
}
}
@@ -961,7 +960,7 @@ public class InAppBrowser extends CordovaPlugin {
sendUpdate(obj, true, PluginResult.Status.ERROR);
} catch (JSONException ex) {
- Log.d(LOG_TAG, "Should never happen");
+ LOG.d(LOG_TAG, "Should never happen");
}
}
@@ -977,11 +976,11 @@ public class InAppBrowser extends CordovaPlugin {
Method gpm = webView.getClass().getMethod("getPluginManager");
pluginManager = (PluginManager)gpm.invoke(webView);
} catch (NoSuchMethodException e) {
- Log.d(LOG_TAG, e.getLocalizedMessage());
+ LOG.d(LOG_TAG, e.getLocalizedMessage());
} catch (IllegalAccessException e) {
- Log.d(LOG_TAG, e.getLocalizedMessage());
+ LOG.d(LOG_TAG, e.getLocalizedMessage());
} catch (InvocationTargetException e) {
- Log.d(LOG_TAG, e.getLocalizedMessage());
+ LOG.d(LOG_TAG, e.getLocalizedMessage());
}
if (pluginManager == null) {
@@ -989,9 +988,9 @@ public class InAppBrowser extends CordovaPlugin {
Field pmf = webView.getClass().getField("pluginManager");
pluginManager = (PluginManager)pmf.get(webView);
} catch (NoSuchFieldException e) {
- Log.d(LOG_TAG, e.getLocalizedMessage());
+ LOG.d(LOG_TAG, e.getLocalizedMessage());
} catch (IllegalAccessException e) {
- Log.d(LOG_TAG, e.getLocalizedMessage());
+ LOG.d(LOG_TAG, e.getLocalizedMessage());
}
}
http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/57b50b1d/src/android/InAppBrowserDialog.java
----------------------------------------------------------------------
diff --git a/src/android/InAppBrowserDialog.java b/src/android/InAppBrowserDialog.java
index d701720..e7b212f 100644
--- a/src/android/InAppBrowserDialog.java
+++ b/src/android/InAppBrowserDialog.java
@@ -21,7 +21,6 @@ package org.apache.cordova.inappbrowser;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
-import android.util.Log;
import org.json.JSONException;
import org.json.JSONObject;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org