Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A1A08116E4 for ; Tue, 14 May 2013 03:10:26 +0000 (UTC) Received: (qmail 5414 invoked by uid 500); 14 May 2013 03:02:48 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 5157 invoked by uid 500); 14 May 2013 03:02:47 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 5134 invoked by uid 99); 14 May 2013 03:02:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 May 2013 03:02:47 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bowserj@gmail.com designates 209.85.212.41 as permitted sender) Received: from [209.85.212.41] (HELO mail-vb0-f41.google.com) (209.85.212.41) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 May 2013 03:02:43 +0000 Received: by mail-vb0-f41.google.com with SMTP id w8so25514vbf.0 for ; Mon, 13 May 2013 20:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=XXqOyrxra9VGvukWKzuyAkLfMhejyO2K1ewUqfpEhu0=; b=RScgS0NCdsvYRysBybWieTu3gZWsKyndNVdtmDRrDC4dNLXFcdj+7TZo7qhQBaMGxf P33nHU3/AlHwKmjViyPEH0Mmzryr5RxBFSZPykXVMWPuCt4wRu+urCnAqYwb1F8PwAib mvi3o1D+joafhNo4GZ3/4nHWQyRNXFcKEzqw2udlAEGqwBLkKZU5JDVEPDllPdt7DG0T bISecgZ/P5A/zUDEaaJY4PFaxUv9Wt1tk6FfKZpg2S47noEd6WnFsYrdVr31dIoLdBvk lNmRpadH4CFHbqWP4EHNK4BXR+5nPalp+h8ojamZ55WP+ME5NAG3Se0kReh3Ld64YEb8 pgbA== MIME-Version: 1.0 X-Received: by 10.52.68.49 with SMTP id s17mr17328322vdt.92.1368500542451; Mon, 13 May 2013 20:02:22 -0700 (PDT) Received: by 10.221.8.196 with HTTP; Mon, 13 May 2013 20:02:22 -0700 (PDT) In-Reply-To: References: Date: Mon, 13 May 2013 20:02:22 -0700 Message-ID: Subject: Re: [Android] Deprecate HTC 2.3 Android console.log support in 3.0 From: Joe Bowser To: dev Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Yes, I want to get rid of that pretty bad piece of Java awfulness. On Mon, May 13, 2013 at 5:55 PM, Simon MacDonald wrote: > I believe Joe means this bit of code: > > // Set the nav dump for HTC 2.x devices (disabling for ICS, > deprecated entirely for Jellybean 4.2) > > try { > > Method gingerbread_getMethod = WebSettings.class.getMethod( > "setNavDump", new Class[] { boolean.class }); > > > > String manufacturer = android.os.Build.MANUFACTURER; > > Log.d(TAG, "CordovaWebView is running on device made by: " + > manufacturer); > > if(android.os.Build.VERSION.SDK_INT < android.os.Build. > VERSION_CODES.HONEYCOMB && > > android.os.Build.MANUFACTURER.contains("HTC")) > > { > > gingerbread_getMethod.invoke(settings, true); > > } > > } catch (NoSuchMethodException e) { > > Log.d(TAG, "We are on a modern version of Android, we will > deprecate HTC 2.3 devices in 2.8"); > > } catch (IllegalArgumentException e) { > > Log.d(TAG, "Doing the NavDump failed with bad arguments"); > > } catch (IllegalAccessException e) { > > Log.d(TAG, "This should never happen: IllegalAccessException > means this isn't Android anymore"); > > } catch (InvocationTargetException e) { > > Log.d(TAG, "This should never happen: InvocationTargetException > means this isn't Android anymore."); > > } > > I'm in favour of getting rid of it if that is indeed what Joe is > suggestion. > > Simon Mac Donald > http://hi.im/simonmacdonald > > > On Mon, May 13, 2013 at 8:43 PM, Andrew Grieve wrote: > >> Could you be more specific about what you'd like to get rid of? >> >> Logger plugin? >> onConsoleMessage? >> >> >> On Mon, May 13, 2013 at 5:47 PM, Jesse wrote: >> >> > console.log is pretty useful. >> > This technically isn't our API, but a polyfill for platforms where >> > console.log goes nowhere. >> > WP7+8 have this broken into the DebugConsole plugin, and clobber >> > window.console as well as navigator.console. >> > >> > modulemapper.clobbers('cordova/plugin/windowsphone/console', >> > 'navigator.console'); >> > modulemapper.clobbers('cordova/plugin/windowsphone/console', 'console'); >> > >> > The actual implementation is bare bones[1], and does not have all the >> > log-level bs in other versions. >> > >> > >> > [1] >> > >> > >> https://github.com/apache/cordova-js/blob/master/lib/windowsphone/plugin/windowsphone/console.js >> > >> > >> > @purplecabbage >> > risingj.com >> > >> > >> > On Mon, May 13, 2013 at 2:22 PM, Joe Bowser wrote: >> > >> > > Hey >> > > >> > > There's a known bug in HTC's WebView that suppressed console.log on >> > > old Gingerbread devices. This is only on devices that run HTC Sense, >> > > and not devices like the Nexus One. How do people feel about >> > > deprecating console.log in 3.0. I know that Simon hated this >> > > particular chunk of code, and wanted to toss it by the wayside a while >> > > ago. >> > > >> > > It says it was supposed to be ripped out this release, but I don't see >> > > it on the wiki, so I'm giving it until 3.0 to be removed. Does that >> > > sound reasonable? >> > > >> > > Joe >> > > >> > >>