diff options
Diffstat (limited to 'src/de')
18 files changed, 42 insertions, 91 deletions
diff --git a/src/de/blinkt/openvpn/LaunchVPN.java b/src/de/blinkt/openvpn/LaunchVPN.java index 92849dd0..10dd3e99 100644 --- a/src/de/blinkt/openvpn/LaunchVPN.java +++ b/src/de/blinkt/openvpn/LaunchVPN.java @@ -1,12 +1,9 @@ package de.blinkt.openvpn; import java.io.IOException; -import java.util.Collection; -import java.util.Vector; import android.app.Activity; import android.app.AlertDialog; -import android.app.ListActivity; import android.content.ActivityNotFoundException; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; @@ -14,14 +11,14 @@ import android.content.Intent; import android.content.SharedPreferences; import android.net.VpnService; import android.os.Bundle; -import android.os.Parcelable; import android.preference.PreferenceManager; import android.text.InputType; import android.text.TextUtils; import android.text.method.PasswordTransformationMethod; import android.view.View; import android.widget.*; -import android.widget.AdapterView.OnItemClickListener; + +import de.blinkt.openvpn.activities.LogWindow; import de.blinkt.openvpn.core.VpnStatus; import de.blinkt.openvpn.core.VpnStatus.ConnectionStatus; import de.blinkt.openvpn.core.ProfileManager; diff --git a/src/de/blinkt/openvpn/LogDetailActionProvider.java b/src/de/blinkt/openvpn/LogDetailActionProvider.java deleted file mode 100644 index 697d5b3a..00000000 --- a/src/de/blinkt/openvpn/LogDetailActionProvider.java +++ /dev/null @@ -1,61 +0,0 @@ -package de.blinkt.openvpn; - -import android.annotation.TargetApi; -import android.app.ActionBar; -import android.content.Context; -import android.graphics.drawable.Drawable; -import android.os.Build; -import android.view.*; -import android.widget.SpinnerAdapter; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -/** - * Created by arne on 22.09.13. - */ -public class LogDetailActionProvider extends ActionProvider { - /** - * Creates a new instance. ActionProvider classes should always implement a - * constructor that takes a single Context parameter for inflating from menu XML. - * - * @param context Context for accessing resources. - */ - public LogDetailActionProvider(Context context) { - super(context); - } - - @Override - public View onCreateActionView() { - return null; - } - - @TargetApi(Build.VERSION_CODES.JELLY_BEAN) - @Override - public View onCreateActionView(MenuItem forItem) { - return super.onCreateActionView(forItem); - } - - @Override - public boolean hasSubMenu() { - return true; - } - - @Override - public void onPrepareSubMenu(SubMenu subMenu) { - subMenu.add(1, Menu.NONE, Menu.NONE, "one"); - subMenu.add(1, Menu.NONE, Menu.NONE, "two"); - subMenu.add(1, Menu.NONE, Menu.NONE, "three"); - subMenu.add(1, Menu.NONE, Menu.NONE, "four"); - - subMenu.add(2, Menu.NONE, Menu.NONE, "no"); - subMenu.add(2, Menu.NONE, Menu.NONE, "short"); - subMenu.add(2, Menu.NONE, Menu.NONE, "long"); - - - } - - @Override - public boolean onPerformDefaultAction() { - return super.onPerformDefaultAction(); - } -}
\ No newline at end of file diff --git a/src/de/blinkt/openvpn/ConfigConverter.java b/src/de/blinkt/openvpn/activities/ConfigConverter.java index 11a3055a..4fa66449 100644 --- a/src/de/blinkt/openvpn/ConfigConverter.java +++ b/src/de/blinkt/openvpn/activities/ConfigConverter.java @@ -1,5 +1,5 @@ -package de.blinkt.openvpn; +package de.blinkt.openvpn.activities; import java.io.File; import java.io.FileInputStream; @@ -29,6 +29,9 @@ import android.view.MenuItem; import android.view.View; import android.widget.ArrayAdapter; import android.widget.CheckBox; + +import de.blinkt.openvpn.R; +import de.blinkt.openvpn.VpnProfile; import de.blinkt.openvpn.core.ConfigParser; import de.blinkt.openvpn.core.ConfigParser.ConfigParseError; import de.blinkt.openvpn.core.ProfileManager; diff --git a/src/de/blinkt/openvpn/app/CreateShortcuts.java b/src/de/blinkt/openvpn/activities/CreateShortcuts.java index 69fa9a84..53a829ff 100644 --- a/src/de/blinkt/openvpn/app/CreateShortcuts.java +++ b/src/de/blinkt/openvpn/activities/CreateShortcuts.java @@ -1,4 +1,4 @@ -package de.blinkt.openvpn.app; +package de.blinkt.openvpn.activities; import android.app.ListActivity; import android.content.Intent; diff --git a/src/de/blinkt/openvpn/DisconnectVPN.java b/src/de/blinkt/openvpn/activities/DisconnectVPN.java index 0f9e83aa..c2d4c599 100644 --- a/src/de/blinkt/openvpn/DisconnectVPN.java +++ b/src/de/blinkt/openvpn/activities/DisconnectVPN.java @@ -1,9 +1,11 @@ -package de.blinkt.openvpn; +package de.blinkt.openvpn.activities; import android.app.Activity; import android.app.AlertDialog; import android.content.*; import android.os.IBinder; + +import de.blinkt.openvpn.R; import de.blinkt.openvpn.core.OpenVpnService; import de.blinkt.openvpn.core.ProfileManager; diff --git a/src/de/blinkt/openvpn/FileSelect.java b/src/de/blinkt/openvpn/activities/FileSelect.java index 8389a2ab..405e0dbf 100644 --- a/src/de/blinkt/openvpn/FileSelect.java +++ b/src/de/blinkt/openvpn/activities/FileSelect.java @@ -1,4 +1,4 @@ -package de.blinkt.openvpn; +package de.blinkt.openvpn.activities; import java.io.File; @@ -18,6 +18,9 @@ import android.content.Intent; import android.os.Bundle; import android.os.Environment; import android.util.Base64; + +import de.blinkt.openvpn.R; +import de.blinkt.openvpn.VpnProfile; import de.blinkt.openvpn.fragments.FileSelectionFragment; import de.blinkt.openvpn.fragments.InlineFileTab; diff --git a/src/de/blinkt/openvpn/LogWindow.java b/src/de/blinkt/openvpn/activities/LogWindow.java index 3a15b00d..27197035 100644 --- a/src/de/blinkt/openvpn/LogWindow.java +++ b/src/de/blinkt/openvpn/activities/LogWindow.java @@ -1,8 +1,10 @@ -package de.blinkt.openvpn; +package de.blinkt.openvpn.activities; import android.app.Activity; import android.os.Bundle; import android.view.MenuItem; + +import de.blinkt.openvpn.R; import de.blinkt.openvpn.fragments.LogFragment; /** diff --git a/src/de/blinkt/openvpn/MainActivity.java b/src/de/blinkt/openvpn/activities/MainActivity.java index e1d417ca..b32c80cc 100644 --- a/src/de/blinkt/openvpn/MainActivity.java +++ b/src/de/blinkt/openvpn/activities/MainActivity.java @@ -1,4 +1,4 @@ -package de.blinkt.openvpn; +package de.blinkt.openvpn.activities; import android.app.ActionBar; import android.app.ActionBar.Tab; @@ -6,6 +6,8 @@ import android.app.Activity; import android.app.Fragment; import android.app.FragmentTransaction; import android.content.Intent; + +import de.blinkt.openvpn.R; import de.blinkt.openvpn.fragments.*; diff --git a/src/de/blinkt/openvpn/core/OpenVpnService.java b/src/de/blinkt/openvpn/core/OpenVpnService.java index c0b24c3a..43bf702b 100644 --- a/src/de/blinkt/openvpn/core/OpenVpnService.java +++ b/src/de/blinkt/openvpn/core/OpenVpnService.java @@ -15,8 +15,8 @@ import android.os.*; import android.os.Handler.Callback; import android.preference.PreferenceManager; import android.text.TextUtils; -import de.blinkt.openvpn.DisconnectVPN; -import de.blinkt.openvpn.LogWindow; +import de.blinkt.openvpn.activities.DisconnectVPN; +import de.blinkt.openvpn.activities.LogWindow; import de.blinkt.openvpn.R; import de.blinkt.openvpn.VpnProfile; import de.blinkt.openvpn.core.VpnStatus.ByteCountListener; @@ -25,7 +25,6 @@ import de.blinkt.openvpn.core.VpnStatus.StateListener; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.security.MessageDigest; import java.util.HashMap; import java.util.Locale; import java.util.Vector; diff --git a/src/de/blinkt/openvpn/fragments/FileSelectionFragment.java b/src/de/blinkt/openvpn/fragments/FileSelectionFragment.java index 03f6bb88..84e065a5 100644 --- a/src/de/blinkt/openvpn/fragments/FileSelectionFragment.java +++ b/src/de/blinkt/openvpn/fragments/FileSelectionFragment.java @@ -19,7 +19,7 @@ import android.widget.CheckBox; import android.widget.ListView; import android.widget.SimpleAdapter; import android.widget.TextView; -import de.blinkt.openvpn.FileSelect; +import de.blinkt.openvpn.activities.FileSelect; import de.blinkt.openvpn.R; public class FileSelectionFragment extends ListFragment { diff --git a/src/de/blinkt/openvpn/fragments/InlineFileTab.java b/src/de/blinkt/openvpn/fragments/InlineFileTab.java index 6b19b75a..bd0b70b1 100644 --- a/src/de/blinkt/openvpn/fragments/InlineFileTab.java +++ b/src/de/blinkt/openvpn/fragments/InlineFileTab.java @@ -9,7 +9,7 @@ import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; -import de.blinkt.openvpn.FileSelect; +import de.blinkt.openvpn.activities.FileSelect; import de.blinkt.openvpn.R; public class InlineFileTab extends Fragment diff --git a/src/de/blinkt/openvpn/fragments/LogFragment.java b/src/de/blinkt/openvpn/fragments/LogFragment.java index 246d8f3d..9aaf15b7 100644 --- a/src/de/blinkt/openvpn/fragments/LogFragment.java +++ b/src/de/blinkt/openvpn/fragments/LogFragment.java @@ -19,6 +19,8 @@ import android.view.*; import android.widget.*; import android.widget.AdapterView.OnItemLongClickListener; import de.blinkt.openvpn.*; +import de.blinkt.openvpn.activities.DisconnectVPN; +import de.blinkt.openvpn.activities.MainActivity; import de.blinkt.openvpn.core.OpenVPNManagement; import de.blinkt.openvpn.core.VpnStatus; import de.blinkt.openvpn.core.VpnStatus.ConnectionStatus; diff --git a/src/de/blinkt/openvpn/fragments/Settings_Authentication.java b/src/de/blinkt/openvpn/fragments/Settings_Authentication.java index 9aed464d..5dfb73d9 100644 --- a/src/de/blinkt/openvpn/fragments/Settings_Authentication.java +++ b/src/de/blinkt/openvpn/fragments/Settings_Authentication.java @@ -3,7 +3,6 @@ package de.blinkt.openvpn.fragments; import android.app.Activity; import android.content.Intent; import android.os.Bundle; -import android.os.Environment; import android.preference.CheckBoxPreference; import android.preference.EditTextPreference; import android.preference.ListPreference; @@ -12,9 +11,9 @@ import android.preference.Preference.OnPreferenceChangeListener; import android.preference.Preference.OnPreferenceClickListener; import android.preference.SwitchPreference; import android.util.Pair; -import de.blinkt.openvpn.FileSelect; +import de.blinkt.openvpn.activities.FileSelect; import de.blinkt.openvpn.R; -import de.blinkt.openvpn.RemoteCNPreference; +import de.blinkt.openvpn.views.RemoteCNPreference; import de.blinkt.openvpn.VpnProfile; diff --git a/src/de/blinkt/openvpn/fragments/Settings_Basic.java b/src/de/blinkt/openvpn/fragments/Settings_Basic.java index a559cda2..cd8730dd 100644 --- a/src/de/blinkt/openvpn/fragments/Settings_Basic.java +++ b/src/de/blinkt/openvpn/fragments/Settings_Basic.java @@ -1,6 +1,5 @@ package de.blinkt.openvpn.fragments; -import android.annotation.TargetApi; import android.app.Activity; import android.app.AlertDialog; import android.app.AlertDialog.Builder; @@ -25,15 +24,14 @@ import android.widget.EditText; import android.widget.Spinner; import android.widget.TextView; import android.widget.ToggleButton; -import de.blinkt.openvpn.FileSelect; -import de.blinkt.openvpn.FileSelectLayout; +import de.blinkt.openvpn.activities.FileSelect; +import de.blinkt.openvpn.views.FileSelectLayout; import de.blinkt.openvpn.R; import de.blinkt.openvpn.VpnProfile; import de.blinkt.openvpn.R.id; import de.blinkt.openvpn.core.ProfileManager; import de.blinkt.openvpn.core.X509Utils; -import java.io.IOException; import java.security.cert.X509Certificate; public class Settings_Basic extends Fragment implements View.OnClickListener, OnItemSelectedListener, Callback { diff --git a/src/de/blinkt/openvpn/fragments/VPNProfileList.java b/src/de/blinkt/openvpn/fragments/VPNProfileList.java index 76b1b5d5..3c031595 100644 --- a/src/de/blinkt/openvpn/fragments/VPNProfileList.java +++ b/src/de/blinkt/openvpn/fragments/VPNProfileList.java @@ -11,7 +11,6 @@ import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.os.Parcelable; import android.text.Html; import android.text.Html.ImageGetter; import android.view.*; @@ -22,13 +21,13 @@ import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import de.blinkt.openvpn.*; +import de.blinkt.openvpn.activities.ConfigConverter; +import de.blinkt.openvpn.activities.FileSelect; import de.blinkt.openvpn.core.ProfileManager; import java.util.Collection; import java.util.Comparator; -import java.util.Set; import java.util.TreeSet; -import java.util.prefs.Preferences; public class VPNProfileList extends ListFragment { diff --git a/src/de/blinkt/openvpn/FileSelectLayout.java b/src/de/blinkt/openvpn/views/FileSelectLayout.java index ce2f5b20..7ee96884 100644 --- a/src/de/blinkt/openvpn/FileSelectLayout.java +++ b/src/de/blinkt/openvpn/views/FileSelectLayout.java @@ -1,5 +1,8 @@ -package de.blinkt.openvpn; +package de.blinkt.openvpn.views; +import de.blinkt.openvpn.R; +import de.blinkt.openvpn.VpnProfile; +import de.blinkt.openvpn.activities.FileSelect; import de.blinkt.openvpn.core.X509Utils; import android.app.Fragment; import android.content.Context; diff --git a/src/de/blinkt/openvpn/RemoteCNPreference.java b/src/de/blinkt/openvpn/views/RemoteCNPreference.java index c7164c0c..388f892b 100644 --- a/src/de/blinkt/openvpn/RemoteCNPreference.java +++ b/src/de/blinkt/openvpn/views/RemoteCNPreference.java @@ -1,4 +1,4 @@ -package de.blinkt.openvpn; +package de.blinkt.openvpn.views; import android.content.Context; import android.preference.DialogPreference; @@ -10,6 +10,9 @@ import android.widget.EditText; import android.widget.Spinner; import android.widget.TextView; +import de.blinkt.openvpn.R; +import de.blinkt.openvpn.VpnProfile; + public class RemoteCNPreference extends DialogPreference { @@ -85,7 +88,7 @@ public class RemoteCNPreference extends DialogPreference { authtypes.add(getContext().getString(R.string.complete_dn)); authtypes.add(getContext().getString(R.string.rdn)); authtypes.add(getContext().getString(R.string.rdn_prefix)); - if ((mDNType == VpnProfile.X509_VERIFY_TLSREMOTE || mDNType == VpnProfile.X509_VERIFY_TLSREMOTE_COMPAT_NOREMAPPING) + if ((mDNType == VpnProfile.X509_VERIFY_TLSREMOTE || mDNType == VpnProfile.X509_VERIFY_TLSREMOTE_COMPAT_NOREMAPPING) && !(mDn==null || "".equals(mDn))) { authtypes.add(getContext().getString(R.string.tls_remote_deprecated)); mRemoteTLSNote.setVisibility(View.VISIBLE); diff --git a/src/de/blinkt/openvpn/fragments/SeekBarTicks.java b/src/de/blinkt/openvpn/views/SeekBarTicks.java index ec68e7e4..88e8e164 100644 --- a/src/de/blinkt/openvpn/fragments/SeekBarTicks.java +++ b/src/de/blinkt/openvpn/views/SeekBarTicks.java @@ -1,4 +1,4 @@ -package de.blinkt.openvpn.fragments; +package de.blinkt.openvpn.views; import android.content.Context; import android.content.res.TypedArray; |