summaryrefslogtreecommitdiff
path: root/main/src/ui/java/de
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2019-09-03 19:17:51 +0300
committerArne Schwabe <arne@rfc2549.org>2019-09-03 19:17:51 +0300
commit10d7110c352072a98edaa827800939aa16e85f6d (patch)
tree1999f0e469cb6d01c79992e58bcb92eb2e369fd0 /main/src/ui/java/de
parenteb2b0578db7ca5a1ba7de3e2bc92c90d21d4c8e8 (diff)
Move to androidx and new chart library version
Diffstat (limited to 'main/src/ui/java/de')
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/activities/ConfigConverter.java3
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/activities/OpenSSLSpeed.java5
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/fragments/ConnectionsAdapter.java2
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/fragments/FaqFragment.java4
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/fragments/FaqViewAdapter.java4
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/fragments/GraphFragment.java20
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/fragments/LogFragment.java2
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Connections.java6
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/fragments/VPNProfileList.java3
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/views/PagerSlidingTabStrip.java2
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/views/ScreenSlidePagerAdapter.java4
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/views/SlidingTabLayout.java2
12 files changed, 27 insertions, 30 deletions
diff --git a/main/src/ui/java/de/blinkt/openvpn/activities/ConfigConverter.java b/main/src/ui/java/de/blinkt/openvpn/activities/ConfigConverter.java
index 38b47b5a..cd6133be 100644
--- a/main/src/ui/java/de/blinkt/openvpn/activities/ConfigConverter.java
+++ b/main/src/ui/java/de/blinkt/openvpn/activities/ConfigConverter.java
@@ -23,7 +23,7 @@ import android.os.Environment;
import android.provider.OpenableColumns;
import android.security.KeyChain;
import android.security.KeyChainAliasCallback;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
import android.text.TextUtils;
import android.util.Base64;
import android.util.Pair;
@@ -42,7 +42,6 @@ import android.widget.Toast;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
diff --git a/main/src/ui/java/de/blinkt/openvpn/activities/OpenSSLSpeed.java b/main/src/ui/java/de/blinkt/openvpn/activities/OpenSSLSpeed.java
index 4720dd60..eb0fe9cd 100644
--- a/main/src/ui/java/de/blinkt/openvpn/activities/OpenSSLSpeed.java
+++ b/main/src/ui/java/de/blinkt/openvpn/activities/OpenSSLSpeed.java
@@ -9,9 +9,8 @@ import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
import android.app.Activity;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.util.Pair;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/ConnectionsAdapter.java b/main/src/ui/java/de/blinkt/openvpn/fragments/ConnectionsAdapter.java
index 9c4c80de..fedf2744 100644
--- a/main/src/ui/java/de/blinkt/openvpn/fragments/ConnectionsAdapter.java
+++ b/main/src/ui/java/de/blinkt/openvpn/fragments/ConnectionsAdapter.java
@@ -7,7 +7,7 @@ package de.blinkt.openvpn.fragments;
import android.app.AlertDialog;
import android.content.Context;
-import android.support.v7.widget.RecyclerView;
+import androidx.recyclerview.widget.RecyclerView;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/FaqFragment.java b/main/src/ui/java/de/blinkt/openvpn/fragments/FaqFragment.java
index af4c35fe..f9d2d47c 100644
--- a/main/src/ui/java/de/blinkt/openvpn/fragments/FaqFragment.java
+++ b/main/src/ui/java/de/blinkt/openvpn/fragments/FaqFragment.java
@@ -9,8 +9,8 @@ import android.app.Fragment;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
-import android.support.v7.widget.RecyclerView;
-import android.support.v7.widget.StaggeredGridLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+import androidx.recyclerview.widget.StaggeredGridLayoutManager;
import android.util.DisplayMetrics;
import android.view.LayoutInflater;
import android.view.View;
diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/FaqViewAdapter.java b/main/src/ui/java/de/blinkt/openvpn/fragments/FaqViewAdapter.java
index 0be9f4a2..01574f20 100644
--- a/main/src/ui/java/de/blinkt/openvpn/fragments/FaqViewAdapter.java
+++ b/main/src/ui/java/de/blinkt/openvpn/fragments/FaqViewAdapter.java
@@ -7,8 +7,8 @@ package de.blinkt.openvpn.fragments;
import android.content.Context;
import android.os.AsyncTask;
-import android.support.v7.widget.CardView;
-import android.support.v7.widget.RecyclerView;
+import androidx.cardview.widget.CardView;
+import androidx.recyclerview.widget.RecyclerView;
import android.text.Html;
import android.text.Spanned;
import android.text.TextUtils;
diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/GraphFragment.java b/main/src/ui/java/de/blinkt/openvpn/fragments/GraphFragment.java
index 10c09461..8ad5209c 100644
--- a/main/src/ui/java/de/blinkt/openvpn/fragments/GraphFragment.java
+++ b/main/src/ui/java/de/blinkt/openvpn/fragments/GraphFragment.java
@@ -10,8 +10,8 @@ import android.content.Context;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.Handler;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -28,7 +28,9 @@ import com.github.mikephil.charting.components.YAxis;
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.data.LineData;
import com.github.mikephil.charting.data.LineDataSet;
+import com.github.mikephil.charting.formatter.DefaultAxisValueFormatter;
import com.github.mikephil.charting.formatter.IAxisValueFormatter;
+import com.github.mikephil.charting.formatter.ValueFormatter;
import com.github.mikephil.charting.interfaces.datasets.ILineDataSet;
import java.util.ArrayList;
@@ -206,18 +208,18 @@ public class GraphFragment extends Fragment implements VpnStatus.ByteCountListen
break;
}
- xAxis.setValueFormatter(new IAxisValueFormatter() {
+ xAxis.setValueFormatter(new ValueFormatter() {
@Override
- public String getFormattedValue(float value, AxisBase axis) {
+ public String getFormattedValue(float value) {
switch (position) {
case TIME_PERIOD_HOURS:
- return String.format(Locale.getDefault(), "%.0f\u2009h ago", (axis.getAxisMaximum() - value) / 10 / 3600);
+ return String.format(Locale.getDefault(), "%.0f\u2009h ago", (xAxis.getAxisMaximum() - value) / 10 / 3600);
case TIME_PERIOD_MINUTES:
- return String.format(Locale.getDefault(), "%.0f\u2009m ago", (axis.getAxisMaximum() - value) / 10 / 60);
+ return String.format(Locale.getDefault(), "%.0f\u2009m ago", (xAxis.getAxisMaximum() - value) / 10 / 60);
default:
- return String.format(Locale.getDefault(), "%.0f\u2009s ago", (axis.getAxisMaximum() - value) / 10);
+ return String.format(Locale.getDefault(), "%.0f\u2009s ago", (xAxis.getAxisMaximum() - value) / 10);
}
}
@@ -228,9 +230,9 @@ public class GraphFragment extends Fragment implements VpnStatus.ByteCountListen
yAxis.setLabelCount(5, false);
final Resources res = getActivity().getResources();
- yAxis.setValueFormatter(new IAxisValueFormatter() {
+ yAxis.setValueFormatter(new ValueFormatter() {
@Override
- public String getFormattedValue(float value, AxisBase axis) {
+ public String getFormattedValue(float value) {
if (mLogScale && value < 2.1f)
return "< 100\u2009bit/s";
if (mLogScale)
diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/LogFragment.java b/main/src/ui/java/de/blinkt/openvpn/fragments/LogFragment.java
index e64ce2cd..32da0ac5 100644
--- a/main/src/ui/java/de/blinkt/openvpn/fragments/LogFragment.java
+++ b/main/src/ui/java/de/blinkt/openvpn/fragments/LogFragment.java
@@ -24,7 +24,7 @@ import android.os.Handler;
import android.os.Handler.Callback;
import android.os.Message;
import android.preference.PreferenceManager;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import android.text.SpannableString;
import android.text.format.DateFormat;
import android.text.style.ImageSpan;
diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Connections.java b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Connections.java
index e41e6cb9..2f5521a5 100644
--- a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Connections.java
+++ b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Connections.java
@@ -7,9 +7,9 @@ package de.blinkt.openvpn.fragments;
import android.os.Build;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
+import androidx.annotation.Nullable;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/VPNProfileList.java b/main/src/ui/java/de/blinkt/openvpn/fragments/VPNProfileList.java
index 7ad13aaf..c1aadb7e 100644
--- a/main/src/ui/java/de/blinkt/openvpn/fragments/VPNProfileList.java
+++ b/main/src/ui/java/de/blinkt/openvpn/fragments/VPNProfileList.java
@@ -10,7 +10,6 @@ import android.app.Activity;
import android.app.AlertDialog;
import android.app.ListFragment;
import android.content.Context;
-import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.ShortcutInfo;
@@ -21,7 +20,7 @@ import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.PersistableBundle;
-import android.support.annotation.RequiresApi;
+import androidx.annotation.RequiresApi;
import android.text.Html;
import android.text.Html.ImageGetter;
import android.view.LayoutInflater;
diff --git a/main/src/ui/java/de/blinkt/openvpn/views/PagerSlidingTabStrip.java b/main/src/ui/java/de/blinkt/openvpn/views/PagerSlidingTabStrip.java
index ab8598c6..3232edc6 100644
--- a/main/src/ui/java/de/blinkt/openvpn/views/PagerSlidingTabStrip.java
+++ b/main/src/ui/java/de/blinkt/openvpn/views/PagerSlidingTabStrip.java
@@ -28,7 +28,7 @@ import android.graphics.Typeface;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
-import android.support.v4.view.ViewCompat;
+import androidx.core.view.ViewCompat;
import android.support.v4n.view.ViewPager;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
diff --git a/main/src/ui/java/de/blinkt/openvpn/views/ScreenSlidePagerAdapter.java b/main/src/ui/java/de/blinkt/openvpn/views/ScreenSlidePagerAdapter.java
index 38bb54b5..481e4c16 100644
--- a/main/src/ui/java/de/blinkt/openvpn/views/ScreenSlidePagerAdapter.java
+++ b/main/src/ui/java/de/blinkt/openvpn/views/ScreenSlidePagerAdapter.java
@@ -10,13 +10,11 @@ import android.app.FragmentManager;
import android.content.Context;
import android.content.res.Resources;
import android.os.Bundle;
-import android.support.annotation.StringRes;
+import androidx.annotation.StringRes;
import android.support.v4n.app.FragmentStatePagerAdapter;
import java.util.Vector;
-import de.blinkt.openvpn.activities.MainActivity;
-
/**
* Created by arne on 18.11.14.
*/
diff --git a/main/src/ui/java/de/blinkt/openvpn/views/SlidingTabLayout.java b/main/src/ui/java/de/blinkt/openvpn/views/SlidingTabLayout.java
index ea3b1c26..51ad6933 100644
--- a/main/src/ui/java/de/blinkt/openvpn/views/SlidingTabLayout.java
+++ b/main/src/ui/java/de/blinkt/openvpn/views/SlidingTabLayout.java
@@ -34,7 +34,7 @@ import android.widget.TextView;
* the user's scroll progress.
* <p>
* To use the component, simply add it to your view hierarchy. Then in your
- * {@link android.app.Activity} or {@link android.support.v4.app.Fragment} call
+ * {@link android.app.Activity} or {@link androidx.core.app.Fragment} call
* {@link #setViewPager(ViewPager)} providing it the ViewPager this layout is being used for.
* <p>
* The colors can be customized in two ways. The first and simplest is to provide an array of colors