summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/fragments
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/blinkt/openvpn/fragments')
-rw-r--r--src/de/blinkt/openvpn/fragments/FileSelectionFragment.java2
-rw-r--r--src/de/blinkt/openvpn/fragments/InlineFileTab.java2
-rw-r--r--src/de/blinkt/openvpn/fragments/LogFragment.java2
-rw-r--r--src/de/blinkt/openvpn/fragments/SeekBarTicks.java69
-rw-r--r--src/de/blinkt/openvpn/fragments/Settings_Authentication.java5
-rw-r--r--src/de/blinkt/openvpn/fragments/Settings_Basic.java6
-rw-r--r--src/de/blinkt/openvpn/fragments/VPNProfileList.java5
7 files changed, 10 insertions, 81 deletions
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/SeekBarTicks.java b/src/de/blinkt/openvpn/fragments/SeekBarTicks.java
deleted file mode 100644
index ec68e7e4..00000000
--- a/src/de/blinkt/openvpn/fragments/SeekBarTicks.java
+++ /dev/null
@@ -1,69 +0,0 @@
-package de.blinkt.openvpn.fragments;
-
-import android.content.Context;
-import android.content.res.TypedArray;
-import android.graphics.Canvas;
-import android.graphics.Paint;
-import android.graphics.drawable.Drawable;
-import android.util.AttributeSet;
-import android.util.TypedValue;
-import android.view.ViewConfiguration;
-import android.widget.SeekBar;
-
-public class SeekBarTicks extends SeekBar {
- private Paint mTickPaint;
- private float mTickHeight;
-
- private float tickHeightRatio = 0.6f;
-
- public SeekBarTicks(Context context, AttributeSet attrs) {
- super (context, attrs);
-
- initTicks (context, attrs, android.R.attr.seekBarStyle);
- }
-
-
- public SeekBarTicks(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
-
- initTicks (context, attrs, defStyle);
-
- /*mTickHeight = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
- tickHeightDP,
- ctx.getResources().getDisplayMetrics()); */
- }
-
- private void initTicks(Context context, AttributeSet attrs, int defStyle) {
- TypedArray a = context.obtainStyledAttributes(attrs,
- new int[] { android.R.attr.secondaryProgress }, defStyle, 0);
-
-
- int tickColor = a.getColor(0, android.R.color.black);
- mTickPaint = new Paint();
- mTickPaint.setColor( context.getResources().getColor(tickColor));
- a.recycle();
- }
-
-
- @Override
- protected synchronized void onDraw(Canvas canvas) {
- drawTicks(canvas);
- super.onDraw(canvas);
- }
-
- private void drawTicks(Canvas canvas) {
-
- final int available = getWidth() - getPaddingLeft() - getPaddingRight();
- final int availableHeight = getHeight() - getPaddingBottom() - getPaddingTop();
-
- int extrapadding = (int) ((availableHeight- (availableHeight * tickHeightRatio))/2);
-
- int tickSpacing = available / (getMax() );
-
- for (int i = 1; i < getMax(); i++) {
- final float x = getPaddingLeft() + i * tickSpacing;
-
- canvas.drawLine(x, getPaddingTop()+extrapadding, x, getHeight()-getPaddingBottom()-extrapadding, mTickPaint);
- }
- }
-}
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 {