From f510feb3130f7f28a5b9116c903a33e92d37ba5c Mon Sep 17 00:00:00 2001 From: akuma Date: Fri, 9 Aug 2019 01:19:19 +0200 Subject: Commented allow apps switch. Allow app fragment title --- .../drawer/NavigationDrawerFragment.java | 7 +++--- .../fragments/Settings_Allowed_Apps.java | 26 +++++++++++----------- app/src/main/res/layout/allowed_vpn_apps.xml | 4 ++-- app/src/main/res/values/strings.xml | 1 + app/src/main/res/values/untranslatable.xml | 12 +++++----- 5 files changed, 26 insertions(+), 24 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(allow_apps.getStringSet("ALLOW_APPS", new HashSet())); + apps = allow_apps.getStringSet("ALLOW_APPS", new HashSet()); // /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); diff --git a/app/src/main/res/layout/allowed_vpn_apps.xml b/app/src/main/res/layout/allowed_vpn_apps.xml index 0883f4b8..93327944 100644 --- a/app/src/main/res/layout/allowed_vpn_apps.xml +++ b/app/src/main/res/layout/allowed_vpn_apps.xml @@ -9,7 +9,7 @@ android:layout_width="match_parent" tools:ignore="RtlCompat" android:layout_height="match_parent"> - + Passwords do not match User message About + Select Apps Try again: Server math error Incorrect username or password It must be at least 8 characters long diff --git a/app/src/main/res/values/untranslatable.xml b/app/src/main/res/values/untranslatable.xml index a92cd176..cbae03fd 100644 --- a/app/src/main/res/values/untranslatable.xml +++ b/app/src/main/res/values/untranslatable.xml @@ -2,13 +2,13 @@ %s - %s Copyright 2012-2019\nLEAP Encryption Access Project <info@leap.se> - Copyright © 2002–2019 OpenVPN Technologies, Inc. <sales@openvpn.net>\n + Copyright ? 2002?2019 OpenVPN Technologies, Inc. <sales@openvpn.net>\n "OpenVPN" is a trademark of OpenVPN Technologies, Inc. - Copyright © 1996 – 2011 Markus Franz Xaver Johannes Oberhumer + Copyright ? 1996 ? 2011 Markus Franz Xaver Johannes Oberhumer Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.\n\n This product includes cryptographic software written by Eric Young (eay@cryptsoft.com)\n - Copyright © 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved. - Copyright © 2019 Square, Inc. + Copyright ? 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved. + Copyright ? 2019 Square, Inc. OkHttp OpenVPN LZO @@ -23,14 +23,14 @@ GNU AFFERO GENERAL PUBLIC LICENSE\n Version 3, 19 November 2007 Unknown state - Copyright 2012–2019 Arne Schwabe <arne@rfc2549.org> + Copyright 2012?2019 Arne Schwabe <arne@rfc2549.org> openvpn.uni-paderborn.de 1194 File Dialog based on work by Alexander Ponomarev File Dialog Allows another app to control OpenVPN Bouncy Castle Crypto APIs - Copyright © 2000–2012 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) + Copyright ? 2000?2012 The Legion Of The Bouncy Castle (http://www.bouncycastle.org) Waiting for user permission to use VPN API Waiting for user VPN password VPN password input dialog cancelled -- cgit v1.2.3