summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/build.gradle.kts19
-rw-r--r--main/src/main/java/de/blinkt/openvpn/VpnProfile.java4
-rw-r--r--main/src/main/java/de/blinkt/openvpn/api/ConfirmDialog.java3
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java2
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/ExtAuthHelper.java6
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/NetworkSpace.java2
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java4
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/OpenVPNStatusService.java2
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java4
-rw-r--r--main/src/skeleton/java/de/blinkt/openvpn/activities/LogWindow.java1
-rw-r--r--main/src/skeleton/java/de/blinkt/openvpn/activities/MainActivity.java1
-rw-r--r--main/src/ui/java/android/support/v4n/app/FragmentStatePagerAdapter.java2
-rw-r--r--main/src/ui/java/android/support/v4n/view/PagerAdapter.java2
-rw-r--r--main/src/ui/java/android/support/v4n/view/ViewPager.java25
-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
-rw-r--r--main/src/ui/res/layout/connections.xml2
-rw-r--r--main/src/ui/res/layout/faq.xml2
-rw-r--r--main/src/ui/res/layout/faqcard.xml4
-rw-r--r--main/src/ui/res/layout/server_card.xml8
30 files changed, 70 insertions, 80 deletions
diff --git a/main/build.gradle.kts b/main/build.gradle.kts
index afa1f55a..8f983de6 100644
--- a/main/build.gradle.kts
+++ b/main/build.gradle.kts
@@ -41,11 +41,11 @@ tasks.register<Exec>("generateOpenVPN3Swig")
}
android {
- compileSdkVersion(28)
+ compileSdkVersion(29)
defaultConfig {
minSdkVersion(14)
- targetSdkVersion(28) //'Q'.toInt()
+ targetSdkVersion(29) //'Q'.toInt()
versionCode = 161
versionName = "0.7.8"
@@ -155,17 +155,16 @@ preBuildTask.dependsOn(swigTask)
/* Normally you would put these on top but then it errors out on unknown configurations */
dependencies {
- implementation("com.android.support:support-annotations:28.0.0")
- implementation("com.android.support:support-core-utils:28.0.0")
+ implementation("androidx.annotation:annotation:1.1.0")
// Is there a nicer way to do this?
- dependencies.add("uiImplementation", "com.android.support.constraint:constraint-layout:1.1.3")
- dependencies.add("uiImplementation", "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.40")
- dependencies.add("uiImplementation","com.android.support.constraint:constraint-layout:1.1.3")
- dependencies.add("uiImplementation","com.android.support:cardview-v7:28.0.0")
- dependencies.add("uiImplementation","com.android.support:recyclerview-v7:28.0.0")
- dependencies.add("uiImplementation","com.github.PhilJay:MPAndroidChart:v3.0.2")
+ dependencies.add("uiImplementation", "androidx.constraintlayout:constraintlayout:1.1.3")
+ dependencies.add("uiImplementation", "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50")
+ dependencies.add("uiImplementation", "androidx.cardview:cardview:1.0.0")
+ dependencies.add("uiImplementation", "androidx.recyclerview:recyclerview:1.0.0")
+ dependencies.add("uiImplementation", "com.github.PhilJay:MPAndroidChart:v3.1.0")
+ testImplementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50")
testImplementation("junit:junit:4.12")
testImplementation("org.mockito:mockito-core:3.0.0")
diff --git a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java
index 09ffdceb..f5ba358b 100644
--- a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java
+++ b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java
@@ -15,8 +15,8 @@ import android.os.Build;
import android.preference.PreferenceManager;
import android.security.KeyChain;
import android.security.KeyChainException;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import android.text.TextUtils;
import android.util.Base64;
diff --git a/main/src/main/java/de/blinkt/openvpn/api/ConfirmDialog.java b/main/src/main/java/de/blinkt/openvpn/api/ConfirmDialog.java
index 2547951f..f07bfc87 100644
--- a/main/src/main/java/de/blinkt/openvpn/api/ConfirmDialog.java
+++ b/main/src/main/java/de/blinkt/openvpn/api/ConfirmDialog.java
@@ -27,11 +27,8 @@ import android.content.Intent;
import android.content.ServiceConnection;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
-import android.os.Bundle;
import android.os.IBinder;
-import android.os.PersistableBundle;
import android.os.RemoteException;
-import android.support.annotation.Nullable;
import android.util.Log;
import android.view.View;
import android.widget.Button;
diff --git a/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java b/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
index 00604b56..93953e49 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/ConfigParser.java
@@ -6,7 +6,7 @@
package de.blinkt.openvpn.core;
import android.os.Build;
-import android.support.v4.util.Pair;
+import androidx.core.util.Pair;
import android.text.TextUtils;
import java.io.BufferedReader;
diff --git a/main/src/main/java/de/blinkt/openvpn/core/ExtAuthHelper.java b/main/src/main/java/de/blinkt/openvpn/core/ExtAuthHelper.java
index 166bce12..a62a4c62 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/ExtAuthHelper.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/ExtAuthHelper.java
@@ -13,9 +13,9 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.*;
import android.security.KeyChainException;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.annotation.WorkerThread;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.annotation.WorkerThread;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.SpinnerAdapter;
diff --git a/main/src/main/java/de/blinkt/openvpn/core/NetworkSpace.java b/main/src/main/java/de/blinkt/openvpn/core/NetworkSpace.java
index 05fdff78..2ad80bc3 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/NetworkSpace.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/NetworkSpace.java
@@ -6,7 +6,7 @@
package de.blinkt.openvpn.core;
import android.os.Build;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
import java.math.BigInteger;
import java.net.Inet6Address;
diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
index 1128414a..cf602a52 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
@@ -30,8 +30,8 @@ import android.os.IBinder;
import android.os.Message;
import android.os.ParcelFileDescriptor;
import android.os.RemoteException;
-import android.support.annotation.NonNull;
-import android.support.annotation.RequiresApi;
+import androidx.annotation.NonNull;
+import androidx.annotation.RequiresApi;
import android.system.OsConstants;
import android.text.TextUtils;
import android.util.Base64;
diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNStatusService.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNStatusService.java
index 6df1379a..8a82813f 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNStatusService.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNStatusService.java
@@ -14,7 +14,7 @@ import android.os.Message;
import android.os.ParcelFileDescriptor;
import android.os.RemoteCallbackList;
import android.os.RemoteException;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import android.util.Pair;
import java.io.DataOutputStream;
diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java
index 4302b4a8..83132505 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java
@@ -13,8 +13,8 @@ import android.net.LocalSocketAddress;
import android.os.Build;
import android.os.Handler;
import android.os.ParcelFileDescriptor;
-import android.support.annotation.NonNull;
-import android.support.annotation.RequiresApi;
+import androidx.annotation.NonNull;
+import androidx.annotation.RequiresApi;
import android.system.Os;
import android.util.Log;
import de.blinkt.openvpn.R;
diff --git a/main/src/skeleton/java/de/blinkt/openvpn/activities/LogWindow.java b/main/src/skeleton/java/de/blinkt/openvpn/activities/LogWindow.java
index efa1b7be..9fd3ba49 100644
--- a/main/src/skeleton/java/de/blinkt/openvpn/activities/LogWindow.java
+++ b/main/src/skeleton/java/de/blinkt/openvpn/activities/LogWindow.java
@@ -2,7 +2,6 @@ package de.blinkt.openvpn.activities;
import android.app.Activity;
import android.os.Bundle;
-import android.support.annotation.Nullable;
import android.widget.Toast;
public class LogWindow extends Activity {
diff --git a/main/src/skeleton/java/de/blinkt/openvpn/activities/MainActivity.java b/main/src/skeleton/java/de/blinkt/openvpn/activities/MainActivity.java
index 8a46e0e7..d3c79d51 100644
--- a/main/src/skeleton/java/de/blinkt/openvpn/activities/MainActivity.java
+++ b/main/src/skeleton/java/de/blinkt/openvpn/activities/MainActivity.java
@@ -2,7 +2,6 @@ package de.blinkt.openvpn.activities;
import android.app.Activity;
import android.os.Bundle;
-import android.support.annotation.Nullable;
import android.widget.Toast;
public class MainActivity extends Activity {
diff --git a/main/src/ui/java/android/support/v4n/app/FragmentStatePagerAdapter.java b/main/src/ui/java/android/support/v4n/app/FragmentStatePagerAdapter.java
index 4ffec519..98093854 100644
--- a/main/src/ui/java/android/support/v4n/app/FragmentStatePagerAdapter.java
+++ b/main/src/ui/java/android/support/v4n/app/FragmentStatePagerAdapter.java
@@ -31,7 +31,7 @@ import android.view.View;
import android.view.ViewGroup;
/**
- * Implementation of {@link android.support.v4.view.PagerAdapter} that
+ * Implementation of {@link androidx.viewpager.widget.PagerAdapter} that
* uses a {@link Fragment} to manage each page. This class also handles
* saving and restoring of fragment's state.
*
diff --git a/main/src/ui/java/android/support/v4n/view/PagerAdapter.java b/main/src/ui/java/android/support/v4n/view/PagerAdapter.java
index 70ed75f3..79177c02 100644
--- a/main/src/ui/java/android/support/v4n/view/PagerAdapter.java
+++ b/main/src/ui/java/android/support/v4n/view/PagerAdapter.java
@@ -27,7 +27,7 @@ import android.view.ViewGroup;
* a {@link ViewPager}. You will most likely want to use a more
* specific implementation of this, such as
* {@link android.support.v4n.app.FragmentPagerAdapter} or
- * {@link android.support.v4.app.FragmentStatePagerAdapter}.
+ * {@link androidx.core.app.FragmentStatePagerAdapter}.
*
* <p>When you implement a PagerAdapter, you must override the following methods
* at minimum:</p>
diff --git a/main/src/ui/java/android/support/v4n/view/ViewPager.java b/main/src/ui/java/android/support/v4n/view/ViewPager.java
index 6009af62..dce15727 100644
--- a/main/src/ui/java/android/support/v4n/view/ViewPager.java
+++ b/main/src/ui/java/android/support/v4n/view/ViewPager.java
@@ -29,18 +29,17 @@ import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
-import android.support.annotation.DrawableRes;
-import android.support.v4.os.ParcelableCompat;
-import android.support.v4.os.ParcelableCompatCreatorCallbacks;
-import android.support.v4.view.AccessibilityDelegateCompat;
-import android.support.v4.view.MotionEventCompat;
-import android.support.v4.view.VelocityTrackerCompat;
-import android.support.v4.view.ViewCompat;
-import android.support.v4.view.ViewConfigurationCompat;
-import android.support.v4.view.accessibility.AccessibilityEventCompat;
-import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
-import android.support.v4.view.accessibility.AccessibilityRecordCompat;
-import android.support.v4.widget.EdgeEffectCompat;
+import androidx.annotation.DrawableRes;
+import androidx.core.os.ParcelableCompat;
+import androidx.core.os.ParcelableCompatCreatorCallbacks;
+import androidx.core.view.AccessibilityDelegateCompat;
+import androidx.core.view.MotionEventCompat;
+import androidx.core.view.VelocityTrackerCompat;
+import androidx.core.view.ViewCompat;
+import androidx.core.view.ViewConfigurationCompat;
+import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
+import androidx.core.view.accessibility.AccessibilityRecordCompat;
+import androidx.core.widget.EdgeEffectCompat;
import android.util.AttributeSet;
import android.util.Log;
import android.view.FocusFinder;
@@ -77,7 +76,7 @@ import java.util.Comparator;
* There are standard adapters implemented for using fragments with the ViewPager,
* which cover the most common use cases. These are
* {@link android.support.v4n.app.FragmentPagerAdapter} and
- * {@link android.support.v4.app.FragmentStatePagerAdapter}; each of these
+ * {@link androidx.core.app.FragmentStatePagerAdapter}; each of these
* classes have simple code showing how to build a full user interface
* with them.
*
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
diff --git a/main/src/ui/res/layout/connections.xml b/main/src/ui/res/layout/connections.xml
index 598ddd92..f22bfd1c 100644
--- a/main/src/ui/res/layout/connections.xml
+++ b/main/src/ui/res/layout/connections.xml
@@ -42,7 +42,7 @@
- <android.support.v7.widget.RecyclerView
+ <androidx.recyclerview.widget.RecyclerView
android:layout_margin="@dimen/vpn_setting_padding"
android:id="@+id/connection_recycler_view"
android:layout_below="@id/switchBar"
diff --git a/main/src/ui/res/layout/faq.xml b/main/src/ui/res/layout/faq.xml
index aa3febd0..8cb79649 100644
--- a/main/src/ui/res/layout/faq.xml
+++ b/main/src/ui/res/layout/faq.xml
@@ -4,7 +4,7 @@
~ Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt
-->
-<android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/faq_recycler_view"
android:paddingLeft="@dimen/stdpadding"
android:paddingRight="@dimen/stdpadding"
diff --git a/main/src/ui/res/layout/faqcard.xml b/main/src/ui/res/layout/faqcard.xml
index 360f3752..b0182540 100644
--- a/main/src/ui/res/layout/faqcard.xml
+++ b/main/src/ui/res/layout/faqcard.xml
@@ -4,7 +4,7 @@
~ Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt
-->
-<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
+<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
@@ -38,4 +38,4 @@
tools:ignore="SelectableText" />
</LinearLayout>
-</android.support.v7.widget.CardView>
+</androidx.cardview.widget.CardView>
diff --git a/main/src/ui/res/layout/server_card.xml b/main/src/ui/res/layout/server_card.xml
index 3b214bbb..dab975d6 100644
--- a/main/src/ui/res/layout/server_card.xml
+++ b/main/src/ui/res/layout/server_card.xml
@@ -10,7 +10,7 @@
android:layout_height="wrap_content"
android:layout_margin="@dimen/stdpadding">
<!-- A CardView that contains a TextView -->
- <android.support.v7.widget.CardView
+ <androidx.cardview.widget.CardView
android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -227,7 +227,7 @@
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
tools:ignore="HardcodedText"/>
- <android.support.constraint.ConstraintLayout
+ <androidx.constraintlayout.widget.ConstraintLayout
android:visibility="gone"
tools:visibility="visible"
android:id="@+id/proxyauthlayout"
@@ -308,7 +308,7 @@
card_view:layout_constraintStart_toEndOf="@+id/proxyuser" android:layout_marginLeft="16dp"
android:layout_marginStart="8dp"/>
- </android.support.constraint.ConstraintLayout>
+ </androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/connect_timeout_label"
@@ -399,5 +399,5 @@
</RelativeLayout>
- </android.support.v7.widget.CardView>
+ </androidx.cardview.widget.CardView>
</FrameLayout> \ No newline at end of file