cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@apache.org
Subject [3/3] cordova-amazon-fireos git commit: CB-7976 Use webView's context rather than Activity's context for intent receiver
Date Sat, 22 Nov 2014 19:39:07 GMT
CB-7976 Use webView's context rather than Activity's context for intent receiver


Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/4142cbb5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/4142cbb5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/4142cbb5

Branch: refs/heads/master
Commit: 4142cbb57cc63c15f5fed1719a981cec75a71251
Parents: 181bf85
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Thu Nov 6 16:23:32 2014 -0500
Committer: Ajitha <ajithas@amazon.com>
Committed: Mon Nov 17 15:08:47 2014 +0530

----------------------------------------------------------------------
 framework/src/org/apache/cordova/App.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/4142cbb5/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 7eaceea..a0eab8d 100755
--- a/framework/src/org/apache/cordova/App.java
+++ b/framework/src/org/apache/cordova/App.java
@@ -288,7 +288,7 @@ public class App extends CordovaPlugin {
         };
 
         // Register the receiver
-        this.cordova.getActivity().registerReceiver(this.telephonyReceiver, intentFilter);
+        webView.getContext().registerReceiver(this.telephonyReceiver, intentFilter);
     }
 
     /*
@@ -298,7 +298,7 @@ public class App extends CordovaPlugin {
     public void onDestroy()
     {
         if (this.telephonyReceiver != null) {
-            this.cordova.getActivity().unregisterReceiver(this.telephonyReceiver);
+            webView.getContext().unregisterReceiver(this.telephonyReceiver);
             this.telephonyReceiver = null;
         }
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message