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 4E87B17DC6 for ; Thu, 6 Nov 2014 21:24:08 +0000 (UTC) Received: (qmail 23813 invoked by uid 500); 6 Nov 2014 21:24:08 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 23694 invoked by uid 500); 6 Nov 2014 21:24:08 -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 23672 invoked by uid 99); 6 Nov 2014 21:24:08 -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 21:24:08 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id E079192821E; Thu, 6 Nov 2014 21:24:07 +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 21:24:08 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/3] android commit: CB-7976 Use webView's context rather than Activity's context for intent receiver CB-7976 Use webView's context rather than Activity's context for intent receiver Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/ac284fd3 Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/ac284fd3 Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/ac284fd3 Branch: refs/heads/master Commit: ac284fd39c86c4fc7b83477ad960ef20892f5e8c Parents: e78db00 Author: Andrew Grieve Authored: Thu Nov 6 16:23:32 2014 -0500 Committer: Andrew Grieve Committed: Thu Nov 6 16:23:32 2014 -0500 ---------------------------------------------------------------------- framework/src/org/apache/cordova/App.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-android/blob/ac284fd3/framework/src/org/apache/cordova/App.java ---------------------------------------------------------------------- diff --git a/framework/src/org/apache/cordova/App.java b/framework/src/org/apache/cordova/App.java index 160923c..9e8c1fe 100755 --- a/framework/src/org/apache/cordova/App.java +++ b/framework/src/org/apache/cordova/App.java @@ -287,7 +287,7 @@ public class App extends CordovaPlugin { }; // Register the receiver - this.cordova.getActivity().registerReceiver(this.telephonyReceiver, intentFilter); + webView.getContext().registerReceiver(this.telephonyReceiver, intentFilter); } /* @@ -296,6 +296,6 @@ public class App extends CordovaPlugin { */ public void onDestroy() { - this.cordova.getActivity().unregisterReceiver(this.telephonyReceiver); + webView.getContext().unregisterReceiver(this.telephonyReceiver); } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org