summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderSetupBaseActivity.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderSetupBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/ProviderSetupBaseActivity.java
index 89944364..9c28800a 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderSetupBaseActivity.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderSetupBaseActivity.java
@@ -65,13 +65,13 @@ public abstract class ProviderSetupBaseActivity extends ConfigWizardBaseActivity
super.onCreate(savedInstanceState);
fragmentManager = new FragmentManagerEnhanced(getSupportFragmentManager());
providerManager = ProviderManager.getInstance(getAssets(), getExternalFilesDir(null));
+ setUpProviderAPIResultReceiver();
}
@Override
protected void onResume() {
super.onResume();
Log.d(TAG, "resuming with ConfigState: " + providerConfigState.toString());
- setUpProviderAPIResultReceiver();
if (SETTING_UP_PROVIDER == providerConfigState) {
showProgressBar();
checkProviderSetUp();
@@ -86,15 +86,12 @@ public abstract class ProviderSetupBaseActivity extends ConfigWizardBaseActivity
}
@Override
- protected void onPause() {
- super.onPause();
- if (providerAPIBroadcastReceiver != null)
- LocalBroadcastManager.getInstance(this).unregisterReceiver(providerAPIBroadcastReceiver);
- }
-
- @Override
protected void onDestroy() {
super.onDestroy();
+ if (providerAPIBroadcastReceiver != null) {
+ LocalBroadcastManager.getInstance(this).unregisterReceiver(providerAPIBroadcastReceiver);
+ }
+ providerAPIBroadcastReceiver = null;
}