From 8e7e4ec14aa52d4cdaeea7e90bf446cf9873bf83 Mon Sep 17 00:00:00 2001 From: Philipp Schaefer Date: Sat, 7 Dec 2013 15:37:51 +0100 Subject: [PATCH] receiver should be unregistered only onDestroy --- mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java index 45ce2442..ea2b4092 100644 --- a/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java +++ b/mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java @@ -321,10 +321,15 @@ public class IITC_Mobile extends Activity implements OnSharedPreferenceChangeLis mLocMngr.removeUpdates(this); } - unregisterReceiver(mBroadcastReceiver); super.onStop(); } + @Override + protected void onDestroy() { + unregisterReceiver(mBroadcastReceiver); + super.onDestroy(); + } + @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig);