diff options
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/Dashboard.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java index 6288fd1f..8143d8d6 100644 --- a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java +++ b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java @@ -194,17 +194,19 @@ public class Dashboard extends Activity implements LogInDialog.LogInDialogInterf if ( provider.hasEIP()){ - EipServiceFragment eipFragment = new EipServiceFragment(); + EipServiceFragment eip_fragment = (EipServiceFragment) fragment_manager.findFragmentByTag(EipServiceFragment.TAG); + if(eip_fragment == null) + eip_fragment = new EipServiceFragment(); if (hide_and_turn_on_eip) { preferences.edit().remove(Dashboard.START_ON_BOOT).apply(); Bundle arguments = new Bundle(); arguments.putBoolean(EipServiceFragment.START_ON_BOOT, true); - eipFragment.setArguments(arguments); + eip_fragment.setArguments(arguments); } fragment_manager.removePreviousFragment(EipServiceFragment.TAG); - fragment_manager.replace(R.id.servicesCollection, eipFragment, EipServiceFragment.TAG); + fragment_manager.replace(R.id.servicesCollection, eip_fragment, EipServiceFragment.TAG); if (hide_and_turn_on_eip) { onBackPressed(); |