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 1139517B10 for ; Thu, 6 Nov 2014 20:49:26 +0000 (UTC) Received: (qmail 5746 invoked by uid 500); 6 Nov 2014 20:49:25 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 5669 invoked by uid 500); 6 Nov 2014 20:49:25 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 5633 invoked by uid 99); 6 Nov 2014 20:49:25 -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 Nov 2014 20:49:25 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8C8978BCEF7; Thu, 6 Nov 2014 20:49:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agrieve@apache.org To: commits@cordova.apache.org Date: Thu, 06 Nov 2014 20:49:28 -0000 Message-Id: In-Reply-To: <52c13ebb3d2c4b49af93551578caf858@git.apache.org> References: <52c13ebb3d2c4b49af93551578caf858@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [4/6] android commit: CB-7974 Cancel timeout timer if view is destroyed CB-7974 Cancel timeout timer if view is destroyed Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/e78db000 Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/e78db000 Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/e78db000 Branch: refs/heads/4.0.x Commit: e78db000c611405ba35188fdf613b4d56f84516b Parents: 032ea8a Author: Andrew Grieve Authored: Thu Nov 6 15:33:10 2014 -0500 Committer: Andrew Grieve Committed: Thu Nov 6 15:33:10 2014 -0500 ---------------------------------------------------------------------- framework/src/org/apache/cordova/CordovaWebView.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-android/blob/e78db000/framework/src/org/apache/cordova/CordovaWebView.java ---------------------------------------------------------------------- diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java index 0c62b76..4d01f58 100755 --- a/framework/src/org/apache/cordova/CordovaWebView.java +++ b/framework/src/org/apache/cordova/CordovaWebView.java @@ -783,6 +783,9 @@ public class CordovaWebView extends WebView { public void handleDestroy() { + // Cancel pending timeout timer. + loadUrlTimeout++; + // Send destroy event to JavaScript this.loadUrl("javascript:try{cordova.require('cordova/channel').onDestroy.fire();}catch(e){console.log('exception firing destroy event from native');};"); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org