summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/ConnectionManager.java11
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/FromAssets.java9
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboardIntegration.java4
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/testEIP.java14
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/testGatewaysManager.java19
-rw-r--r--app/src/androidTest/java/se/leap/bitmaskclient/test/testLeapSRPSession.java19
-rw-r--r--app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java6
-rw-r--r--app/src/debug/java/se/leap/bitmaskclient/NewProviderDialog.java21
-rw-r--r--app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java8
-rw-r--r--app/src/debug/java/se/leap/bitmaskclient/ProviderDetailFragment.java5
-rw-r--r--app/src/debug/java/se/leap/bitmaskclient/ProviderListContent.java23
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/AboutActivity.java10
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ConfigHelper.java26
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/Dashboard.java8
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/DownloadFailedDialog.java9
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/EipFragment.java2
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/FragmentManagerEnhanced.java4
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/LeapSRPSession.java14
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/OnBootReceiver.java9
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/PRNGFixes.java21
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/Provider.java23
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderAPIResultReceiver.java4
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderListAdapter.java15
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderManager.java27
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderRenderer.java20
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderRendererBuilder.java12
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/SessionDialog.java19
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/EIP.java1
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java18
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/GatewaySelector.java6
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java2
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnLauncher.java8
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java8
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/VpnCertificateValidator.java10
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java13
-rw-r--r--app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java4
-rw-r--r--app/src/release/java/se/leap/bitmaskclient/NewProviderDialog.java19
-rw-r--r--app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java8
-rw-r--r--app/src/release/java/se/leap/bitmaskclient/ProviderDetailFragment.java33
-rw-r--r--app/src/release/java/se/leap/bitmaskclient/ProviderListContent.java22
40 files changed, 180 insertions, 334 deletions
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/ConnectionManager.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/ConnectionManager.java
index e67dd820..96abc7eb 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/ConnectionManager.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/ConnectionManager.java
@@ -1,12 +1,9 @@
package se.leap.bitmaskclient.test;
-import android.content.Context;
-import android.net.ConnectivityManager;
-import android.net.wifi.WifiManager;
-import android.util.Log;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
+import android.content.*;
+import android.net.*;
+import android.net.wifi.*;
+import java.lang.reflect.*;
public class ConnectionManager {
static void setMobileDataEnabled(boolean enabled, Context context) {
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/FromAssets.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/FromAssets.java
index 4f771922..fd8b9a7e 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/FromAssets.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/FromAssets.java
@@ -1,11 +1,8 @@
package se.leap.bitmaskclient.test;
-import android.content.Context;
-
-import org.json.JSONException;
-
-import java.io.IOException;
-import java.io.InputStream;
+import android.content.*;
+import org.json.*;
+import java.io.*;
public class FromAssets {
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboardIntegration.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboardIntegration.java
index 91b93d42..57213bc1 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboardIntegration.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/testDashboardIntegration.java
@@ -1,10 +1,10 @@
package se.leap.bitmaskclient.test;
-import android.content.Context;
+import android.content.*;
import android.test.*;
import com.robotium.solo.*;
-import java.io.IOException;
+import java.io.*;
import de.blinkt.openvpn.activities.*;
import se.leap.bitmaskclient.*;
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testEIP.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/testEIP.java
index d9235085..b504af99 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testEIP.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/testEIP.java
@@ -16,15 +16,13 @@
*/
package se.leap.bitmaskclient.test;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.test.ServiceTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
-import se.leap.bitmaskclient.Dashboard;
-import se.leap.bitmaskclient.eip.Constants;
-import se.leap.bitmaskclient.eip.EIP;
+import android.content.*;
+import android.test.*;
+import android.test.suitebuilder.annotation.*;
+
+import se.leap.bitmaskclient.*;
+import se.leap.bitmaskclient.eip.*;
/**
* @author parmegv
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testGatewaysManager.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/testGatewaysManager.java
index c4303251..addbc53c 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testGatewaysManager.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/testGatewaysManager.java
@@ -16,20 +16,15 @@
*/
package se.leap.bitmaskclient.test;
-import android.app.Activity;
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.test.InstrumentationTestCase;
-import android.test.suitebuilder.annotation.MediumTest;
-import android.test.suitebuilder.annotation.SmallTest;
+import android.app.*;
+import android.content.*;
+import android.test.*;
+import android.test.suitebuilder.annotation.*;
-import junit.framework.Test;
+import org.json.*;
-import org.json.JSONObject;
-
-import se.leap.bitmaskclient.Dashboard;
-import se.leap.bitmaskclient.eip.Gateway;
-import se.leap.bitmaskclient.eip.GatewaysManager;
+import se.leap.bitmaskclient.*;
+import se.leap.bitmaskclient.eip.*;
/**
* @author parmegv
diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/testLeapSRPSession.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/testLeapSRPSession.java
index d7f4bfb3..e25d4e56 100644
--- a/app/src/androidTest/java/se/leap/bitmaskclient/test/testLeapSRPSession.java
+++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/testLeapSRPSession.java
@@ -1,20 +1,15 @@
package se.leap.bitmaskclient.test;
-import java.io.UnsupportedEncodingException;
-import java.math.BigInteger;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-import java.util.Arrays;
+import java.io.*;
+import java.math.*;
+import java.security.*;
+import java.util.*;
-import org.jboss.security.srp.SRPParameters;
+import android.test.suitebuilder.annotation.*;
-import android.test.suitebuilder.annotation.SmallTest;
+import se.leap.bitmaskclient.*;
-import se.leap.bitmaskclient.ConfigHelper;
-import se.leap.bitmaskclient.LeapSRPSession;
-
-import junit.framework.TestCase;
+import junit.framework.*;
public class testLeapSRPSession extends TestCase {
diff --git a/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java b/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java
index ed2a063c..63e5272e 100644
--- a/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java
+++ b/app/src/debug/java/se/leap/bitmaskclient/ConfigurationWizard.java
@@ -28,17 +28,17 @@ import java.net.*;
import java.util.*;
import butterknife.*;
-import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.*;
import org.json.*;
-import javax.inject.Inject;
+import javax.inject.*;
import se.leap.bitmaskclient.DownloadFailedDialog.DownloadFailedDialogInterface;
import se.leap.bitmaskclient.NewProviderDialog.NewProviderDialogInterface;
import se.leap.bitmaskclient.ProviderAPIResultReceiver.Receiver;
import se.leap.bitmaskclient.ProviderDetailFragment.ProviderDetailFragmentInterface;
import se.leap.bitmaskclient.ProviderListContent.ProviderItem;
-import se.leap.bitmaskclient.eip.Constants;
+import se.leap.bitmaskclient.eip.*;
/**
* Activity that builds and shows the list of known available providers.
diff --git a/app/src/debug/java/se/leap/bitmaskclient/NewProviderDialog.java b/app/src/debug/java/se/leap/bitmaskclient/NewProviderDialog.java
index 8fe1c3eb..01c13ca3 100644
--- a/app/src/debug/java/se/leap/bitmaskclient/NewProviderDialog.java
+++ b/app/src/debug/java/se/leap/bitmaskclient/NewProviderDialog.java
@@ -14,22 +14,15 @@
* 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;
-import butterknife.ButterKnife;
-import butterknife.InjectView;
+import butterknife.*;
import se.leap.bitmaskclient.ProviderListContent.ProviderItem;
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.CheckBox;
-import android.widget.EditText;
-import android.widget.Toast;
+import android.app.*;
+import android.content.*;
+import android.os.*;
+import android.view.*;
+import android.widget.*;
/**
* Implements the new custom provider dialog.
diff --git a/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java b/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java
index 57c4d067..f17c7151 100644
--- a/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java
+++ b/app/src/debug/java/se/leap/bitmaskclient/ProviderAPI.java
@@ -16,19 +16,19 @@
*/
package se.leap.bitmaskclient;
-import android.app.IntentService;
+import android.app.*;
import android.content.*;
import android.os.*;
import android.util.*;
import java.io.*;
-import java.math.BigInteger;
+import java.math.*;
import java.net.*;
import java.security.*;
import java.security.cert.*;
-import java.security.interfaces.RSAPrivateKey;
+import java.security.interfaces.*;
import java.util.*;
import javax.net.ssl.*;
-import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.*;
import org.json.*;
import se.leap.bitmaskclient.ProviderListContent.ProviderItem;
diff --git a/app/src/debug/java/se/leap/bitmaskclient/ProviderDetailFragment.java b/app/src/debug/java/se/leap/bitmaskclient/ProviderDetailFragment.java
index 4b46e48f..09e415c5 100644
--- a/app/src/debug/java/se/leap/bitmaskclient/ProviderDetailFragment.java
+++ b/app/src/debug/java/se/leap/bitmaskclient/ProviderDetailFragment.java
@@ -2,15 +2,14 @@ package se.leap.bitmaskclient;
import org.json.*;
-import se.leap.bitmaskclient.R;
import se.leap.bitmaskclient.eip.Constants;
import se.leap.bitmaskclient.ProviderListContent.ProviderItem;
import android.app.*;
import android.content.*;
-import android.os.Bundle;
+import android.os.*;
import android.view.*;
-import android.widget.TextView;
+import android.widget.*;
public class ProviderDetailFragment extends DialogFragment {
diff --git a/app/src/debug/java/se/leap/bitmaskclient/ProviderListContent.java b/app/src/debug/java/se/leap/bitmaskclient/ProviderListContent.java
index 8c8fb69f..48273d6a 100644
--- a/app/src/debug/java/se/leap/bitmaskclient/ProviderListContent.java
+++ b/app/src/debug/java/se/leap/bitmaskclient/ProviderListContent.java
@@ -16,17 +16,8 @@
*/
package se.leap.bitmaskclient;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.net.URL;
-import java.net.MalformedURLException;
-
-import org.json.JSONException;
-import org.json.JSONObject;
+import java.util.*;
+import java.net.*;
/**
* Models the provider list shown in the ConfigurationWizard.
@@ -55,20 +46,20 @@ public class ProviderListContent {
/**
* A provider item.
- */
+ */
public static class ProviderItem {
final public static String CUSTOM = "custom";
final public static String DANGER_ON = "danger_on";
private String provider_main_url;
- private String name;
-
+ private String name;
+
/**
* @param name of the provider
* @param provider_main_url used to download provider.json file of the provider
- */
+ */
public ProviderItem(String name, String provider_main_url) {
this.name = name;
- this.provider_main_url = provider_main_url;
+ this.provider_main_url = provider_main_url;
}
public String name() { return name; }
diff --git a/app/src/main/java/se/leap/bitmaskclient/AboutActivity.java b/app/src/main/java/se/leap/bitmaskclient/AboutActivity.java
index 6c4e517b..fa79d009 100644
--- a/app/src/main/java/se/leap/bitmaskclient/AboutActivity.java
+++ b/app/src/main/java/se/leap/bitmaskclient/AboutActivity.java
@@ -1,10 +1,10 @@
package se.leap.bitmaskclient;
-import android.app.Activity;
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager.NameNotFoundException;
-import android.os.Bundle;
-import android.widget.TextView;
+import android.app.*;
+import android.content.pm.*;
+import android.content.pm.PackageManager.*;
+import android.os.*;
+import android.widget.*;
public class AboutActivity extends Activity {
diff --git a/app/src/main/java/se/leap/bitmaskclient/ConfigHelper.java b/app/src/main/java/se/leap/bitmaskclient/ConfigHelper.java
index c0f0b0c3..b20cb1ae 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ConfigHelper.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ConfigHelper.java
@@ -16,26 +16,16 @@
*/
package se.leap.bitmaskclient;
-import android.util.Base64;
+import android.util.*;
-import org.json.JSONException;
-import org.json.JSONObject;
+import org.json.*;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.math.BigInteger;
-import java.security.KeyFactory;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
-import java.security.cert.X509Certificate;
-import java.security.interfaces.RSAPrivateKey;
-import java.security.spec.InvalidKeySpecException;
-import java.security.spec.PKCS8EncodedKeySpec;
+import java.io.*;
+import java.math.*;
+import java.security.*;
+import java.security.cert.*;
+import java.security.interfaces.*;
+import java.security.spec.*;
/**
* Stores constants, and implements auxiliary methods used across all LEAP Android classes.
diff --git a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
index 7c5e5421..7e2fa0b5 100644
--- a/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
+++ b/app/src/main/java/se/leap/bitmaskclient/Dashboard.java
@@ -16,16 +16,16 @@
*/
package se.leap.bitmaskclient;
-import android.annotation.SuppressLint;
+import android.annotation.*;
import android.app.*;
import android.content.*;
-import android.content.pm.PackageManager.NameNotFoundException;
+import android.content.pm.PackageManager.*;
import android.os.*;
-import android.util.Log;
+import android.util.*;
import android.view.*;
import android.widget.*;
-import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.*;
import org.json.*;
import java.net.*;
import java.util.*;
diff --git a/app/src/main/java/se/leap/bitmaskclient/DownloadFailedDialog.java b/app/src/main/java/se/leap/bitmaskclient/DownloadFailedDialog.java
index a44253c6..b26205bb 100644
--- a/app/src/main/java/se/leap/bitmaskclient/DownloadFailedDialog.java
+++ b/app/src/main/java/se/leap/bitmaskclient/DownloadFailedDialog.java
@@ -16,12 +16,9 @@
*/
package se.leap.bitmaskclient;
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.content.DialogInterface;
-import android.os.Bundle;
+import android.app.*;
+import android.content.*;
+import android.os.*;
/**
* Implements a dialog to show why a download failed.
diff --git a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java
index ac869b18..a5f3118c 100644
--- a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java
@@ -23,7 +23,7 @@ import android.util.*;
import android.view.*;
import android.widget.*;
-import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.*;
import java.util.*;
diff --git a/app/src/main/java/se/leap/bitmaskclient/FragmentManagerEnhanced.java b/app/src/main/java/se/leap/bitmaskclient/FragmentManagerEnhanced.java
index 49af9274..9975b127 100644
--- a/app/src/main/java/se/leap/bitmaskclient/FragmentManagerEnhanced.java
+++ b/app/src/main/java/se/leap/bitmaskclient/FragmentManagerEnhanced.java
@@ -16,9 +16,7 @@
*/
package se.leap.bitmaskclient;
-import android.app.Fragment;
-import android.app.FragmentManager;
-import android.app.FragmentTransaction;
+import android.app.*;
public class FragmentManagerEnhanced {
diff --git a/app/src/main/java/se/leap/bitmaskclient/LeapSRPSession.java b/app/src/main/java/se/leap/bitmaskclient/LeapSRPSession.java
index 49c115ae..d3085fa3 100644
--- a/app/src/main/java/se/leap/bitmaskclient/LeapSRPSession.java
+++ b/app/src/main/java/se/leap/bitmaskclient/LeapSRPSession.java
@@ -17,14 +17,12 @@
package se.leap.bitmaskclient;
-import org.jboss.security.srp.SRPParameters;
-
-import java.io.UnsupportedEncodingException;
-import java.math.BigInteger;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-import java.util.Arrays;
+import org.jboss.security.srp.*;
+
+import java.io.*;
+import java.math.*;
+import java.security.*;
+import java.util.*;
/**
* Implements all SRP algorithm logic.
diff --git a/app/src/main/java/se/leap/bitmaskclient/OnBootReceiver.java b/app/src/main/java/se/leap/bitmaskclient/OnBootReceiver.java
index 96b87085..806d5602 100644
--- a/app/src/main/java/se/leap/bitmaskclient/OnBootReceiver.java
+++ b/app/src/main/java/se/leap/bitmaskclient/OnBootReceiver.java
@@ -1,12 +1,9 @@
package se.leap.bitmaskclient;
-import android.content.BroadcastReceiver;
-import android.content.Context;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.util.Log;
+import android.content.*;
+import android.util.*;
-import se.leap.bitmaskclient.eip.Constants;
+import se.leap.bitmaskclient.eip.*;
public class OnBootReceiver extends BroadcastReceiver {
diff --git a/app/src/main/java/se/leap/bitmaskclient/PRNGFixes.java b/app/src/main/java/se/leap/bitmaskclient/PRNGFixes.java
index a046f01f..33d2971d 100644
--- a/app/src/main/java/se/leap/bitmaskclient/PRNGFixes.java
+++ b/app/src/main/java/se/leap/bitmaskclient/PRNGFixes.java
@@ -12,24 +12,13 @@ package se.leap.bitmaskclient;
* Source: http://android-developers.blogspot.de/2013/08/some-securerandom-thoughts.html
*/
-import android.os.Build;
+import android.os.*;
import android.os.Process;
-import android.util.Log;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.security.NoSuchAlgorithmException;
+import android.util.*;
+
+import java.io.*;
+import java.security.*;
import java.security.Provider;
-import java.security.SecureRandom;
-import java.security.SecureRandomSpi;
-import java.security.Security;
/**
* Fixes for the output of the default PRNG having low entropy.
diff --git a/app/src/main/java/se/leap/bitmaskclient/Provider.java b/app/src/main/java/se/leap/bitmaskclient/Provider.java
index ef25c5d2..f45eccdd 100644
--- a/app/src/main/java/se/leap/bitmaskclient/Provider.java
+++ b/app/src/main/java/se/leap/bitmaskclient/Provider.java
@@ -16,22 +16,13 @@
*/
package se.leap.bitmaskclient;
-import android.app.Activity;
-import android.content.Context;
-import android.content.SharedPreferences;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.io.File;
-import java.io.Serializable;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Locale;
+import android.os.*;
+
+import org.json.*;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
/**
* @author Sean Leonard <meanderingcode@aetherislands.net>
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderAPIResultReceiver.java b/app/src/main/java/se/leap/bitmaskclient/ProviderAPIResultReceiver.java
index 7e4e95d3..4e6333c0 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderAPIResultReceiver.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderAPIResultReceiver.java
@@ -16,9 +16,7 @@
*/
package se.leap.bitmaskclient;
-import android.os.Bundle;
-import android.os.Handler;
-import android.os.ResultReceiver;
+import android.os.*;
/**
* Implements the ResultReceiver needed by Activities using ProviderAPI to receive the results of its operations.
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderListAdapter.java b/app/src/main/java/se/leap/bitmaskclient/ProviderListAdapter.java
index c63e2edb..f0103986 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderListAdapter.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderListAdapter.java
@@ -1,19 +1,10 @@
package se.leap.bitmaskclient;
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.TwoLineListItem;
+import android.view.*;
-import com.pedrogomez.renderers.AdapteeCollection;
-import com.pedrogomez.renderers.RendererAdapter;
-import com.pedrogomez.renderers.RendererBuilder;
+import com.pedrogomez.renderers.*;
-import java.util.Collection;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
public class ProviderListAdapter extends RendererAdapter<Provider> {
private static boolean[] hidden = null;
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java b/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java
index 69bd7c1e..56b38a29 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java
@@ -1,25 +1,12 @@
package se.leap.bitmaskclient;
-import android.content.res.AssetManager;
-
-import com.pedrogomez.renderers.AdapteeCollection;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Set;
+import android.content.res.*;
+import com.pedrogomez.renderers.*;
+import org.json.*;
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
/**
* Created by parmegv on 4/12/14.
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderRenderer.java b/app/src/main/java/se/leap/bitmaskclient/ProviderRenderer.java
index 6e194e84..4a5d0db1 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderRenderer.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderRenderer.java
@@ -1,18 +1,12 @@
package se.leap.bitmaskclient;
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-import com.pedrogomez.renderers.Renderer;
-
-import butterknife.ButterKnife;
-import butterknife.InjectView;
-import butterknife.OnItemClick;
-import butterknife.OnItemSelected;
+import android.content.*;
+import android.view.*;
+import android.widget.*;
+
+import com.pedrogomez.renderers.*;
+
+import butterknife.*;
/**
* Created by parmegv on 4/12/14.
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderRendererBuilder.java b/app/src/main/java/se/leap/bitmaskclient/ProviderRendererBuilder.java
index 7366e68e..1b42e349 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderRendererBuilder.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderRendererBuilder.java
@@ -1,15 +1,7 @@
package se.leap.bitmaskclient;
-import android.content.Context;
-
-import com.pedrogomez.renderers.Renderer;
-import com.pedrogomez.renderers.RendererBuilder;
-
-import java.util.Collection;
-import java.util.LinkedList;
-import java.util.List;
-
-import javax.inject.Inject;
+import com.pedrogomez.renderers.*;
+import java.util.*;
/**
* Created by parmegv on 4/12/14.
diff --git a/app/src/main/java/se/leap/bitmaskclient/SessionDialog.java b/app/src/main/java/se/leap/bitmaskclient/SessionDialog.java
index 91e56330..6346fc36 100644
--- a/app/src/main/java/se/leap/bitmaskclient/SessionDialog.java
+++ b/app/src/main/java/se/leap/bitmaskclient/SessionDialog.java
@@ -16,18 +16,13 @@
*/
package se.leap.bitmaskclient;
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.DialogFragment;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.EditText;
-import android.widget.TextView;
-
-import butterknife.ButterKnife;
-import butterknife.InjectView;
+import android.app.*;
+import android.content.*;
+import android.os.*;
+import android.view.*;
+import android.widget.*;
+
+import butterknife.*;
/**
* Implements the log in dialog, currently without progress dialog.
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
index 3b72a486..6335f818 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
@@ -19,7 +19,6 @@ package se.leap.bitmaskclient.eip;
import android.app.*;
import android.content.*;
import android.os.*;
-import android.util.Log;
import org.json.*;
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java b/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java
index 0d8a2f7b..10ddc0ef 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java
@@ -16,21 +16,15 @@
*/
package se.leap.bitmaskclient.eip;
-import android.app.Activity;
-import android.content.SharedPreferences;
-import android.util.Log;
+import android.util.*;
-import com.google.gson.Gson;
+import com.google.gson.*;
-import org.json.JSONException;
-import org.json.JSONObject;
+import org.json.*;
+import java.io.*;
-import java.io.IOException;
-import java.io.StringReader;
-
-import de.blinkt.openvpn.VpnProfile;
-import de.blinkt.openvpn.core.ConfigParser;
-import se.leap.bitmaskclient.Dashboard;
+import de.blinkt.openvpn.*;
+import de.blinkt.openvpn.core.*;
/**
* Gateway provides objects defining gateways and their metadata.
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/GatewaySelector.java b/app/src/main/java/se/leap/bitmaskclient/eip/GatewaySelector.java
index 39ae7ca6..11823511 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/GatewaySelector.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/GatewaySelector.java
@@ -1,10 +1,6 @@
package se.leap.bitmaskclient.eip;
-import java.util.Calendar;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeMap;
+import java.util.*;
public class GatewaySelector {
List<Gateway> gateways;
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java b/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java
index 401cd701..af5670f5 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/GatewaysManager.java
@@ -17,7 +17,7 @@
package se.leap.bitmaskclient.eip;
import android.content.*;
-import android.util.Log;
+import android.util.*;
import com.google.gson.*;
import com.google.gson.reflect.*;
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnLauncher.java b/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnLauncher.java
index d79d8003..39a802c6 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnLauncher.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnLauncher.java
@@ -1,9 +1,9 @@
package se.leap.bitmaskclient.eip;
-import android.app.Activity;
-import android.content.Intent;
-import android.net.VpnService;
-import android.os.Bundle;
+import android.app.*;
+import android.content.*;
+import android.net.*;
+import android.os.*;
public class VoidVpnLauncher extends Activity {
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java b/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java
index f87f35e2..e864288a 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/VoidVpnService.java
@@ -1,10 +1,10 @@
package se.leap.bitmaskclient.eip;
-import android.content.Intent;
-import android.net.VpnService;
-import android.os.ParcelFileDescriptor;
+import android.content.*;
+import android.net.*;
+import android.os.*;
-import java.io.IOException;
+import java.io.*;
public class VoidVpnService extends VpnService {
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/VpnCertificateValidator.java b/app/src/main/java/se/leap/bitmaskclient/eip/VpnCertificateValidator.java
index 0bbe9db4..27971c3d 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/VpnCertificateValidator.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/VpnCertificateValidator.java
@@ -16,14 +16,12 @@
*/
package se.leap.bitmaskclient.eip;
-import android.util.Log;
+import android.util.*;
-import java.security.cert.CertificateExpiredException;
-import java.security.cert.CertificateNotYetValidException;
-import java.security.cert.X509Certificate;
-import java.util.Calendar;
+import java.security.cert.*;
+import java.util.*;
-import se.leap.bitmaskclient.ConfigHelper;
+import se.leap.bitmaskclient.*;
public class VpnCertificateValidator {
public final static String TAG = VpnCertificateValidator.class.getSimpleName();
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java b/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java
index 5f5dcabd..8b1bc793 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java
@@ -16,16 +16,9 @@
*/
package se.leap.bitmaskclient.eip;
-import android.content.SharedPreferences;
-import android.util.Log;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.util.Iterator;
-
-import se.leap.bitmaskclient.Provider;
+import org.json.*;
+import java.util.*;
+import se.leap.bitmaskclient.*;
public class VpnConfigGenerator {
diff --git a/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java b/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java
index f5e78e65..2b35080b 100644
--- a/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java
+++ b/app/src/release/java/se/leap/bitmaskclient/ConfigurationWizard.java
@@ -28,10 +28,10 @@ import java.net.*;
import java.util.*;
import butterknife.*;
-import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.*;
import org.json.*;
-import javax.inject.Inject;
+import javax.inject.*;
import se.leap.bitmaskclient.DownloadFailedDialog.DownloadFailedDialogInterface;
import se.leap.bitmaskclient.NewProviderDialog.NewProviderDialogInterface;
diff --git a/app/src/release/java/se/leap/bitmaskclient/NewProviderDialog.java b/app/src/release/java/se/leap/bitmaskclient/NewProviderDialog.java
index f6709c22..96437eb2 100644
--- a/app/src/release/java/se/leap/bitmaskclient/NewProviderDialog.java
+++ b/app/src/release/java/se/leap/bitmaskclient/NewProviderDialog.java
@@ -16,20 +16,13 @@
*/
package se.leap.bitmaskclient;
-import butterknife.ButterKnife;
-import butterknife.InjectView;
+import butterknife.*;
import se.leap.bitmaskclient.ProviderListContent.ProviderItem;
-import android.app.Activity;
-import android.app.AlertDialog;
-import android.app.Dialog;
-import android.app.DialogFragment;
-import android.content.DialogInterface;
-import android.os.Bundle;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.CheckBox;
-import android.widget.EditText;
-import android.widget.Toast;
+import android.app.*;
+import android.content.*;
+import android.os.*;
+import android.view.*;
+import android.widget.*;
/**
* Implements the new custom provider dialog.
diff --git a/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java b/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java
index c8fd0251..7f0ce001 100644
--- a/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java
+++ b/app/src/release/java/se/leap/bitmaskclient/ProviderAPI.java
@@ -16,19 +16,19 @@
*/
package se.leap.bitmaskclient;
-import android.app.IntentService;
+import android.app.*;
import android.content.*;
import android.os.*;
import android.util.*;
import java.io.*;
-import java.math.BigInteger;
+import java.math.*;
import java.net.*;
import java.security.*;
import java.security.cert.*;
-import java.security.interfaces.RSAPrivateKey;
+import java.security.interfaces.*;
import java.util.*;
import javax.net.ssl.*;
-import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.*;
import org.json.*;
import se.leap.bitmaskclient.ProviderListContent.ProviderItem;
diff --git a/app/src/release/java/se/leap/bitmaskclient/ProviderDetailFragment.java b/app/src/release/java/se/leap/bitmaskclient/ProviderDetailFragment.java
index 97ce5245..0f978290 100644
--- a/app/src/release/java/se/leap/bitmaskclient/ProviderDetailFragment.java
+++ b/app/src/release/java/se/leap/bitmaskclient/ProviderDetailFragment.java
@@ -1,17 +1,16 @@
-package se.leap.bitmaskclient;
-
-import org.json.*;
-
-import se.leap.bitmaskclient.R;
-import se.leap.bitmaskclient.eip.Constants;
-import se.leap.bitmaskclient.ProviderListContent.ProviderItem;
-
-import android.app.*;
-import android.content.*;
-import android.os.Bundle;
-import android.view.*;
-import android.widget.TextView;
-
+package se.leap.bitmaskclient;
+
+import org.json.*;
+
+import se.leap.bitmaskclient.eip.*;
+import se.leap.bitmaskclient.ProviderListContent.ProviderItem;
+
+import android.app.*;
+import android.content.*;
+import android.os.*;
+import android.view.*;
+import android.widget.*;
+
public class ProviderDetailFragment extends DialogFragment {
final public static String TAG = "providerDetailFragment";
@@ -61,7 +60,7 @@ public class ProviderDetailFragment extends DialogFragment {
private boolean anon_allowed(JSONObject provider_json) {
try {
JSONObject service_description = provider_json.getJSONObject(Provider.SERVICE);
- return service_description.has(Constants.ALLOWED_ANON) && service_description.getBoolean(Constants.ALLOWED_ANON);
+ return service_description.has(Constants.ALLOWED_ANON) && service_description.getBoolean(Constants.ALLOWED_ANON);
} catch (JSONException e) {
return false;
}
@@ -80,8 +79,8 @@ public class ProviderDetailFragment extends DialogFragment {
public void onCancel(DialogInterface dialog) {
super.onCancel(dialog);
SharedPreferences.Editor editor = getActivity().getSharedPreferences(Dashboard.SHARED_PREFERENCES, Activity.MODE_PRIVATE).edit();
- editor.remove(Provider.KEY).remove(Constants.ALLOWED_ANON).remove(Constants.KEY).commit();
- interface_with_configuration_wizard.showAllProviders();
+ editor.remove(Provider.KEY).remove(Constants.ALLOWED_ANON).remove(Constants.KEY).commit();
+ interface_with_configuration_wizard.showAllProviders();
}
public static DialogFragment newInstance() {
diff --git a/app/src/release/java/se/leap/bitmaskclient/ProviderListContent.java b/app/src/release/java/se/leap/bitmaskclient/ProviderListContent.java
index a5402fd8..64e5be07 100644
--- a/app/src/release/java/se/leap/bitmaskclient/ProviderListContent.java
+++ b/app/src/release/java/se/leap/bitmaskclient/ProviderListContent.java
@@ -16,17 +16,9 @@
*/
package se.leap.bitmaskclient;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.net.URL;
-import java.net.MalformedURLException;
-
-import org.json.JSONException;
-import org.json.JSONObject;
+import java.io.*;
+import java.util.*;
+import java.net.*;
/**
* Models the provider list shown in the ConfigurationWizard.
@@ -55,19 +47,19 @@ public class ProviderListContent {
/**
* A provider item.
- */
+ */
public static class ProviderItem {
final public static String CUSTOM = "custom";
private String provider_main_url;
- private String name;
+ private String name;
/**
* @param name of the provider
* @param provider_main_url used to download provider.json file of the provider
- */
+ */
public ProviderItem(String name, String provider_main_url) {
this.name = name;
- this.provider_main_url = provider_main_url;
+ this.provider_main_url = provider_main_url;
}
public String name() { return name; }