diff options
author | akuma <n3k0@pc.localdomain> | 2019-08-09 01:19:19 +0200 |
---|---|---|
committer | akuma <n3k0@pc.localdomain> | 2019-08-09 01:19:19 +0200 |
commit | f510feb3130f7f28a5b9116c903a33e92d37ba5c (patch) | |
tree | f3c725e89210de870eef30c1f043d1afbff45564 /app/src/main/java/se/leap/bitmaskclient | |
parent | 302f41085f460e67934166a3da55fa746eeaf7e2 (diff) |
Commented allow apps switch. Allow app fragment title
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java | 7 | ||||
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/fragments/Settings_Allowed_Apps.java | 26 |
2 files changed, 17 insertions, 16 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 21bc8360..99dfb890 100644 --- a/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java @@ -59,7 +59,6 @@ import se.leap.bitmaskclient.R; import se.leap.bitmaskclient.fragments.AboutFragment; import se.leap.bitmaskclient.fragments.AlwaysOnDialog; import se.leap.bitmaskclient.fragments.LogFragment; -import se.leap.bitmaskclient.fragments.SelectAppsFragment; import se.leap.bitmaskclient.fragments.Settings_Allowed_Apps; import static android.content.Context.MODE_PRIVATE; @@ -79,9 +78,11 @@ import static se.leap.bitmaskclient.DrawerSettingsAdapter.LOG; import static se.leap.bitmaskclient.DrawerSettingsAdapter.SELECT_APPS; import static se.leap.bitmaskclient.DrawerSettingsAdapter.SWITCH_PROVIDER; import static se.leap.bitmaskclient.R.string.about_fragment_title; +import static se.leap.bitmaskclient.R.string.allow_apps_fragment_title; import static se.leap.bitmaskclient.R.string.donate_title; import static se.leap.bitmaskclient.R.string.log_fragment_title; import static se.leap.bitmaskclient.R.string.switch_provider_menu_option; +import static se.leap.bitmaskclient.R.string.allow_apps_fragment_title; import static se.leap.bitmaskclient.utils.ConfigHelper.isDefaultBitmask; import static se.leap.bitmaskclient.utils.PreferenceHelper.getProviderName; import static se.leap.bitmaskclient.utils.PreferenceHelper.getSaveBattery; @@ -276,7 +277,7 @@ public class NavigationDrawerFragment extends Fragment { settingsListAdapter.addItem(getSimpleTextInstance(getContext(), getString(donate_title), R.drawable.ic_donate_36, DONATE)); } settingsListAdapter.addItem(getSimpleTextInstance(getContext(), getString(about_fragment_title), R.drawable.ic_about_36, ABOUT)); - settingsListAdapter.addItem(getSimpleTextInstance(getContext(), getString(about_fragment_title), R.drawable.ic_about_36, SELECT_APPS)); + settingsListAdapter.addItem(getSimpleTextInstance(getContext(), getString(allow_apps_fragment_title), R.drawable.ic_about_36, SELECT_APPS)); } private ActionBar setupActionBar() { @@ -500,7 +501,7 @@ public class NavigationDrawerFragment extends Fragment { break; case SELECT_APPS: fragment = new Settings_Allowed_Apps(); - setActionBarTitle(about_fragment_title); + setActionBarTitle(allow_apps_fragment_title); break; default: break; diff --git a/app/src/main/java/se/leap/bitmaskclient/fragments/Settings_Allowed_Apps.java b/app/src/main/java/se/leap/bitmaskclient/fragments/Settings_Allowed_Apps.java index f930b278..a563978a 100644 --- a/app/src/main/java/se/leap/bitmaskclient/fragments/Settings_Allowed_Apps.java +++ b/app/src/main/java/se/leap/bitmaskclient/fragments/Settings_Allowed_Apps.java @@ -39,8 +39,7 @@ import java.util.Set; import java.util.Vector; import de.blinkt.openvpn.VpnProfile; -import se.leap.bitmaskclient.EipSetupListener; -import se.leap.bitmaskclient.EipSetupObserver; + import se.leap.bitmaskclient.R; /** @@ -274,7 +273,7 @@ public class Settings_Allowed_Apps extends Fragment implements AdapterView.OnIte allow_apps = this.getContext().getSharedPreferences("BITMASK", Context.MODE_MULTI_PROCESS); allow_apps_editor = allow_apps.edit(); - apps = new HashSet<String>(allow_apps.getStringSet("ALLOW_APPS", new HashSet<String>())); + apps = allow_apps.getStringSet("ALLOW_APPS", new HashSet<String>()); // /String profileUuid = getArguments().getString(getActivity().getPackageName() + ".profileUUID"); // mProfile = EipSetupObserver.getProfile(); @@ -322,18 +321,19 @@ public class Settings_Allowed_Apps extends Fragment implements AdapterView.OnIte public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.allowed_vpn_apps, container, false); - mDefaultAllowTextView = (TextView) v.findViewById(R.id.default_allow_text); - - Switch vpnOnDefaultSwitch = (Switch) v.findViewById(R.id.default_allow); +// mDefaultAllowTextView = (TextView) v.findViewById(R.id.default_allow_text); - vpnOnDefaultSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { - @Override - public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { - changeDisallowText(isChecked); - mProfile.mAllowedAppsVpnAreDisallowed = isChecked; - } - }); +// Switch vpnOnDefaultSwitch = (Switch) v.findViewById(R.id.default_allow); +// +// vpnOnDefaultSwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { +// @Override +// public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { +// +// changeDisallowText(isChecked); +// mProfile.mAllowedAppsVpnAreDisallowed = isChecked; +// } +// }); // vpnOnDefaultSwitch.setChecked(mProfile.mAllowedAppsVpnAreDisallowed); |