CB-7976 Use webView's context rather than Activity's context for intent receiver

This commit is contained in:
Andrew Grieve
2014-11-06 16:23:32 -05:00
parent e78db000c6
commit ac284fd39c
+2 -2
View File
@@ -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);
}
}