summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2022-12-13 02:34:51 +0100
committercyBerta <cyberta@riseup.net>2022-12-15 23:57:15 +0100
commitcb0eae7999271ba3db98d160fb60f0fdf6991841 (patch)
treeb83a778605fc35151b16f37d68c3f4d3df5ca174 /app/src/main
parent77d3d7fb647632955197a678287b34d4281cbd40 (diff)
balance registering and un-registering listeners and observers in GatewaySelectionFragment
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/fragments/GatewaySelectionFragment.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/fragments/GatewaySelectionFragment.java b/app/src/main/java/se/leap/bitmaskclient/base/fragments/GatewaySelectionFragment.java
index a2bfff7c..00bd55ef 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/fragments/GatewaySelectionFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/fragments/GatewaySelectionFragment.java
@@ -90,16 +90,16 @@ public class GatewaySelectionFragment extends Fragment implements Observer, Loca
super.onCreate(savedInstanceState);
gatewaysManager = new GatewaysManager(getContext());
eipStatus = EipStatus.getInstance();
- eipStatus.addObserver(this);
preferences = getContext().getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE);
- selectedTransport = getUseBridges(preferences) ? PT : OPENVPN;
- preferences.registerOnSharedPreferenceChangeListener(this);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
+ selectedTransport = getUseBridges(preferences) ? PT : OPENVPN;
+ preferences.registerOnSharedPreferenceChangeListener(this);
+ eipStatus.addObserver(this);
return inflater.inflate(R.layout.f_gateway_selection, container, false);
}