diff options
author | cyBerta <cyberta@riseup.net> | 2023-08-07 01:25:39 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2023-08-07 01:32:09 +0200 |
commit | f9faf01dc0f847e51faafbe9b4b5082719cbf3cb (patch) | |
tree | 68064ffb29e7b3d513deea775ca3f9c7eb4bb6e1 /app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/VpnPermissionSetupFragment.java | |
parent | 216183b69102dd808cce0c6d95d449c39157eeac (diff) |
Fixes various bugs related to the re-creation of the SetupActivity and the loaded Fragments after an layout orientation change.
* fixes the initialization of fragments via a Bundle
* saves state before the Activity/Fragments get destroyed and loads the old state on re-creation
* fixes onFragmentSelected() callback handling
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/VpnPermissionSetupFragment.java')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/VpnPermissionSetupFragment.java | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/VpnPermissionSetupFragment.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/VpnPermissionSetupFragment.java index a6af0b36..188ba9ac 100644 --- a/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/VpnPermissionSetupFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/VpnPermissionSetupFragment.java @@ -13,13 +13,10 @@ import se.leap.bitmaskclient.databinding.FVpnPermissionSetupBinding; public class VpnPermissionSetupFragment extends BaseSetupFragment { - - private VpnPermissionSetupFragment(int position) { - super(position); - } - public static VpnPermissionSetupFragment newInstance(int position) { - return new VpnPermissionSetupFragment(position); + VpnPermissionSetupFragment fragment = new VpnPermissionSetupFragment(); + fragment.setArguments(initBundle(position)); + return fragment; } @Override @@ -30,11 +27,6 @@ public class VpnPermissionSetupFragment extends BaseSetupFragment { } @Override - public void onAttach(@NonNull Context context) { - super.onAttach(context); - } - - @Override public void onFragmentSelected() { super.onFragmentSelected(); setupActivityCallback.setNavigationButtonHidden(false); |