4
0
mirror of https://github.com/apache/cordova-android.git synced 2025-06-02 13:25:44 +08:00

CB-5504: Adding onDestroy to app plugin to deregister telephonyReceiver

This commit is contained in:
Joe Bowser 2014-01-08 13:12:00 -08:00
parent 5e0479e414
commit 0777a660bf

@ -284,4 +284,12 @@ public class App extends CordovaPlugin {
this.cordova.getActivity().registerReceiver(this.telephonyReceiver, intentFilter);
}
/*
* Unregister the receiver
*
*/
public void onDestroy()
{
this.cordova.getActivity().unregisterReceiver(this.telephonyReceiver);
}
}