summaryrefslogtreecommitdiff
path: root/app/src/main/java/se
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/se')
-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
24 files changed, 93 insertions, 196 deletions
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 {