diff options
author | cyBerta <cyberta@riseup.net> | 2018-02-14 17:52:30 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2018-02-14 17:52:30 +0100 |
commit | c774905e2917d4cfeb0bb9a1ca15910a03330ae1 (patch) | |
tree | 297c26fa5e6ccbfef8dab84e9e70484b74385292 /app/src/main/java/se | |
parent | 9b6c368a25510c462ea357121c97edb6d0310021 (diff) |
#8854 set Provider as argument for EipFragment
Diffstat (limited to 'app/src/main/java/se')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java | 6 |
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) { |