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 <[email protected]>
Authored: Thu Nov 6 16:23:32 2014 -0500
Committer: Ajitha <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to