summaryrefslogtreecommitdiff
path: root/app/src/main/java/se
diff options
context:
space:
mode:
authorfupduck <fupduck@riseup.net>2018-02-16 00:32:36 -0800
committerfupduck <fupduck@riseup.net>2018-02-16 00:32:36 -0800
commitf6b589d48d99b4458e8977e73433207848373924 (patch)
tree297c26fa5e6ccbfef8dab84e9e70484b74385292 /app/src/main/java/se
parent9b6c368a25510c462ea357121c97edb6d0310021 (diff)
parentc774905e2917d4cfeb0bb9a1ca15910a03330ae1 (diff)
Merge branch '#8854_fix_navigation_from_drawer' into '0.9.8'
#8854 set Provider as argument for EipFragment See merge request leap/bitmask_android!45
Diffstat (limited to 'app/src/main/java/se')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java b/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java
index 9d5d4341..772140b0 100644
--- a/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java
@@ -26,6 +26,7 @@ import android.widget.ListView;
import android.widget.Toast;
import se.leap.bitmaskclient.ConfigHelper;
+import se.leap.bitmaskclient.Provider;
import se.leap.bitmaskclient.ProviderListActivity;
import se.leap.bitmaskclient.EipFragment;
import se.leap.bitmaskclient.R;
@@ -34,6 +35,7 @@ import se.leap.bitmaskclient.fragments.LogFragment;
import static android.content.Context.MODE_PRIVATE;
import static se.leap.bitmaskclient.BitmaskApp.getRefWatcher;
+import static se.leap.bitmaskclient.Constants.PROVIDER_KEY;
import static se.leap.bitmaskclient.Constants.REQUEST_CODE_SWITCH_PROVIDER;
import static se.leap.bitmaskclient.Constants.SHARED_PREFERENCES;
@@ -278,6 +280,10 @@ public class NavigationDrawerFragment extends Fragment {
if (parent == mDrawerAccountsListView) {
mTitle = getString(R.string.vpn_fragment_title);
fragment = new EipFragment();
+ Bundle arguments = new Bundle();
+ Provider currentProvider = ConfigHelper.getSavedProviderFromSharedPreferences(preferences);
+ arguments.putParcelable(PROVIDER_KEY, currentProvider);
+ fragment.setArguments(arguments);
} else {
Log.d("Drawer", String.format("Selected position %d", position));
switch (position) {