Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D8592E2D4 for ; Thu, 6 Dec 2012 18:41:18 +0000 (UTC) Received: (qmail 81864 invoked by uid 500); 6 Dec 2012 18:41:18 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 81839 invoked by uid 500); 6 Dec 2012 18:41:18 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 81831 invoked by uid 99); 6 Dec 2012 18:41:18 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2012 18:41:18 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 27536819B6B; Thu, 6 Dec 2012 18:41:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bowserj@apache.org To: commits@cordova.apache.org X-Mailer: ASF-Git Admin Mailer Subject: android commit: CB-1973: We don't need to log three damn times! If it wasn't for HTC, I'd remove this entirely. Message-Id: <20121206184118.27536819B6B@tyr.zones.apache.org> Date: Thu, 6 Dec 2012 18:41:18 +0000 (UTC) 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 Authored: Thu Dec 6 10:40:57 2012 -0800 Committer: Joe Bowser 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)