summaryrefslogtreecommitdiff
path: root/app/src/production/java
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2020-12-29 00:54:08 +0100
committercyBerta <cyberta@riseup.net>2020-12-29 00:54:08 +0100
commit6b032b751324a30120cfaabe88940f95171df11f (patch)
treeb6b26b84358726a02e27558562e7e9ea70a7aaa0 /app/src/production/java
parent16da1eeb5180cbb4a0d916785a08ccbcd3c1d74e (diff)
new year cleanup: restructure messy project
Diffstat (limited to 'app/src/production/java')
-rw-r--r--app/src/production/java/se/leap/bitmaskclient/ProviderDetailActivity.java4
-rw-r--r--app/src/production/java/se/leap/bitmaskclient/providersetup/AddProviderActivity.java (renamed from app/src/production/java/se/leap/bitmaskclient/AddProviderActivity.java)4
-rw-r--r--app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java (renamed from app/src/production/java/se/leap/bitmaskclient/ProviderApiManager.java)23
-rw-r--r--app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderDetailActivity.java6
-rw-r--r--app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderListActivity.java (renamed from app/src/production/java/se/leap/bitmaskclient/ProviderListActivity.java)10
5 files changed, 29 insertions, 18 deletions
diff --git a/app/src/production/java/se/leap/bitmaskclient/ProviderDetailActivity.java b/app/src/production/java/se/leap/bitmaskclient/ProviderDetailActivity.java
deleted file mode 100644
index e1815689..00000000
--- a/app/src/production/java/se/leap/bitmaskclient/ProviderDetailActivity.java
+++ /dev/null
@@ -1,4 +0,0 @@
-package se.leap.bitmaskclient;
-
-public class ProviderDetailActivity extends AbstractProviderDetailActivity {
-}
diff --git a/app/src/production/java/se/leap/bitmaskclient/AddProviderActivity.java b/app/src/production/java/se/leap/bitmaskclient/providersetup/AddProviderActivity.java
index ed076d3f..d05c76f0 100644
--- a/app/src/production/java/se/leap/bitmaskclient/AddProviderActivity.java
+++ b/app/src/production/java/se/leap/bitmaskclient/providersetup/AddProviderActivity.java
@@ -1,10 +1,12 @@
-package se.leap.bitmaskclient;
+package se.leap.bitmaskclient.providersetup;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import butterknife.InjectView;
+import se.leap.bitmaskclient.R;
+import se.leap.bitmaskclient.providersetup.activities.AddProviderBaseActivity;
public class AddProviderActivity extends AddProviderBaseActivity {
diff --git a/app/src/production/java/se/leap/bitmaskclient/ProviderApiManager.java b/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java
index 4a4e7b22..592db085 100644
--- a/app/src/production/java/se/leap/bitmaskclient/ProviderApiManager.java
+++ b/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderApiManager.java
@@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package se.leap.bitmaskclient;
+package se.leap.bitmaskclient.providersetup;
import android.content.SharedPreferences;
import android.content.res.Resources;
@@ -33,23 +33,26 @@ import java.util.List;
import de.blinkt.openvpn.core.VpnStatus;
import okhttp3.OkHttpClient;
+import se.leap.bitmaskclient.R;
import se.leap.bitmaskclient.eip.EIP;
-import se.leap.bitmaskclient.utils.ConfigHelper;
+import se.leap.bitmaskclient.base.models.Provider;
+import se.leap.bitmaskclient.providersetup.connectivity.OkHttpClientGenerator;
+import se.leap.bitmaskclient.base.utils.ConfigHelper;
import static android.text.TextUtils.isEmpty;
-import static se.leap.bitmaskclient.Constants.BROADCAST_RESULT_KEY;
-import static se.leap.bitmaskclient.Constants.PROVIDER_KEY;
-import static se.leap.bitmaskclient.Constants.PROVIDER_VPN_CERTIFICATE;
-import static se.leap.bitmaskclient.ProviderAPI.ERRORS;
-import static se.leap.bitmaskclient.ProviderSetupFailedDialog.DOWNLOAD_ERRORS.ERROR_CERTIFICATE_PINNING;
-import static se.leap.bitmaskclient.ProviderSetupFailedDialog.DOWNLOAD_ERRORS.ERROR_CORRUPTED_PROVIDER_JSON;
+import static se.leap.bitmaskclient.base.models.Constants.BROADCAST_RESULT_KEY;
+import static se.leap.bitmaskclient.base.models.Constants.PROVIDER_KEY;
+import static se.leap.bitmaskclient.base.models.Constants.PROVIDER_VPN_CERTIFICATE;
+import static se.leap.bitmaskclient.providersetup.ProviderAPI.ERRORS;
+import static se.leap.bitmaskclient.providersetup.ProviderSetupFailedDialog.DOWNLOAD_ERRORS.ERROR_CERTIFICATE_PINNING;
+import static se.leap.bitmaskclient.providersetup.ProviderSetupFailedDialog.DOWNLOAD_ERRORS.ERROR_CORRUPTED_PROVIDER_JSON;
import static se.leap.bitmaskclient.R.string.downloading_vpn_certificate_failed;
import static se.leap.bitmaskclient.R.string.error_io_exception_user_message;
import static se.leap.bitmaskclient.R.string.malformed_url;
import static se.leap.bitmaskclient.R.string.setup_error_text;
import static se.leap.bitmaskclient.R.string.warning_corrupted_provider_cert;
import static se.leap.bitmaskclient.R.string.warning_corrupted_provider_details;
-import static se.leap.bitmaskclient.utils.ConfigHelper.getProviderFormattedString;
+import static se.leap.bitmaskclient.base.utils.ConfigHelper.getProviderFormattedString;
/**
* Implements the logic of the provider api http requests. The methods of this class need to be called from
@@ -68,7 +71,7 @@ public class ProviderApiManager extends ProviderApiManagerBase {
/**
* Only used in insecure flavor.
*/
- static boolean lastDangerOn() {
+ public static boolean lastDangerOn() {
return false;
}
diff --git a/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderDetailActivity.java b/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderDetailActivity.java
new file mode 100644
index 00000000..ec932394
--- /dev/null
+++ b/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderDetailActivity.java
@@ -0,0 +1,6 @@
+package se.leap.bitmaskclient.providersetup;
+
+import se.leap.bitmaskclient.providersetup.activities.AbstractProviderDetailActivity;
+
+public class ProviderDetailActivity extends AbstractProviderDetailActivity {
+}
diff --git a/app/src/production/java/se/leap/bitmaskclient/ProviderListActivity.java b/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderListActivity.java
index cf327791..6a1eaf95 100644
--- a/app/src/production/java/se/leap/bitmaskclient/ProviderListActivity.java
+++ b/app/src/production/java/se/leap/bitmaskclient/providersetup/ProviderListActivity.java
@@ -14,12 +14,16 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-package se.leap.bitmaskclient;
+package se.leap.bitmaskclient.providersetup;
import androidx.annotation.NonNull;
-import static se.leap.bitmaskclient.ProviderAPI.SET_UP_PROVIDER;
-import static se.leap.bitmaskclient.ProviderSetupInterface.ProviderConfigState.SETTING_UP_PROVIDER;
+import se.leap.bitmaskclient.base.models.Provider;
+import se.leap.bitmaskclient.providersetup.ProviderAPICommand;
+import se.leap.bitmaskclient.providersetup.activities.ProviderListBaseActivity;
+
+import static se.leap.bitmaskclient.providersetup.ProviderAPI.SET_UP_PROVIDER;
+import static se.leap.bitmaskclient.providersetup.ProviderSetupInterface.ProviderConfigState.SETTING_UP_PROVIDER;
/**
* Activity that builds and shows the list of known available providers.