mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
CB-5504: Adding onDestroy to app plugin to deregister telephonyReceiver
This commit is contained in:
parent
5e0479e414
commit
0777a660bf
@ -284,4 +284,12 @@ public class App extends CordovaPlugin {
|
|||||||
this.cordova.getActivity().registerReceiver(this.telephonyReceiver, intentFilter);
|
this.cordova.getActivity().registerReceiver(this.telephonyReceiver, intentFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Unregister the receiver
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void onDestroy()
|
||||||
|
{
|
||||||
|
this.cordova.getActivity().unregisterReceiver(this.telephonyReceiver);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user