You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2012/12/06 19:41:18 UTC
android commit: CB-1973: We don't need to log three damn times! If it
wasn't for HTC, I'd remove this entirely.
Updated Branches:
refs/heads/master 182843edf -> 2a42c463d
CB-1973: We don't need to log three damn times! If it wasn't for HTC, I'd remove this entirely.
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/2a42c463
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/2a42c463
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/2a42c463
Branch: refs/heads/master
Commit: 2a42c463d208d7983eb25c3f974ba96a5be3ed3d
Parents: 182843e
Author: Joe Bowser <bo...@apache.org>
Authored: Thu Dec 6 10:40:57 2012 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Thu Dec 6 10:40:57 2012 -0800
----------------------------------------------------------------------
.../org/apache/cordova/CordovaChromeClient.java | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/2a42c463/framework/src/org/apache/cordova/CordovaChromeClient.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaChromeClient.java b/framework/src/org/apache/cordova/CordovaChromeClient.java
index 44b6bba..be7c0c1 100755
--- a/framework/src/org/apache/cordova/CordovaChromeClient.java
+++ b/framework/src/org/apache/cordova/CordovaChromeClient.java
@@ -296,12 +296,17 @@ public class CordovaChromeClient extends WebChromeClient {
}
// console.log in api level 7: http://developer.android.com/guide/developing/debug-tasks.html
+ // Expect this to not compile in a future Android release!
@SuppressWarnings("deprecation")
@Override
public void onConsoleMessage(String message, int lineNumber, String sourceID)
{
- LOG.d(TAG, "%s: Line %d : %s", sourceID, lineNumber, message);
- super.onConsoleMessage(message, lineNumber, sourceID);
+ //This is only for Android 2.1
+ if(android.os.Build.VERSION.SDK_INT == android.os.Build.VERSION_CODES.ECLAIR_MR1)
+ {
+ LOG.d(TAG, "%s: Line %d : %s", sourceID, lineNumber, message);
+ super.onConsoleMessage(message, lineNumber, sourceID);
+ }
}
@TargetApi(8)