From c774905e2917d4cfeb0bb9a1ca15910a03330ae1 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Wed, 14 Feb 2018 17:52:30 +0100 Subject: #8854 set Provider as argument for EipFragment --- .../java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'app') 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) { -- cgit v1.2.3