You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/11/06 22:24:08 UTC
[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 <ag...@chromium.org>
Authored: Thu Nov 6 16:23:32 2014 -0500
Committer: Andrew Grieve <ag...@chromium.org>
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