summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFup Duck <fupduck@sacknagel.com>2018-03-23 18:55:05 +0100
committerFup Duck <fupduck@sacknagel.com>2018-03-23 18:55:05 +0100
commit0e77f2c8d772b07f7b16d35c67cdb254ad648e48 (patch)
tree7a143334477e8eb76146be6db9bc4caf826b71ce /app
parent1faf9f6eaaae5adc5f020607d439ab70ec5378e4 (diff)
8876 - move broadcastreceiver to onResume
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/MainActivity.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/MainActivity.java b/app/src/main/java/se/leap/bitmaskclient/MainActivity.java
index 33ecf85a..e40d329c 100644
--- a/app/src/main/java/se/leap/bitmaskclient/MainActivity.java
+++ b/app/src/main/java/se/leap/bitmaskclient/MainActivity.java
@@ -86,7 +86,6 @@ public class MainActivity extends AppCompatActivity {
setSupportActionBar((Toolbar) findViewById(R.id.toolbar));
mainActivityBroadcastReceiver = new MainActivityBroadcastReceiver();
- setUpBroadcastReceiver();
navigationDrawerFragment = (NavigationDrawerFragment)
getSupportFragmentManager().findFragmentById(R.id.navigation_drawer);
@@ -104,6 +103,7 @@ public class MainActivity extends AppCompatActivity {
@Override
protected void onResume() {
+ setUpBroadcastReceiver();
super.onResume();
}
@@ -205,12 +205,12 @@ public class MainActivity extends AppCompatActivity {
@Override
protected void onPause() {
+ LocalBroadcastManager.getInstance(this).unregisterReceiver(mainActivityBroadcastReceiver);
super.onPause();
}
@Override
protected void onDestroy() {
- LocalBroadcastManager.getInstance(this).unregisterReceiver(mainActivityBroadcastReceiver);
mainActivityBroadcastReceiver = null;
super.onDestroy();
}