aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2018-12-18 16:15:37 +0530
committerJason A. Donenfeld <Jason@zx2c4.com>2018-12-18 16:54:54 +0100
commita0f5b231dd83280f6c966fc215038b09d9f0e747 (patch)
tree3c843af0b5657b1a9f75ae9c3b7dc4ed3cbf84a5
parentBump the go runtime (diff)
downloadwireguard-android-a0f5b231dd83280f6c966fc215038b09d9f0e747.tar.xz
wireguard-android-a0f5b231dd83280f6c966fc215038b09d9f0e747.zip
Migrate to AndroidX
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
-rw-r--r--app/build.gradle18
-rw-r--r--app/src/main/AndroidManifest.xml3
-rw-r--r--app/src/main/java/com/wireguard/android/Application.java4
-rw-r--r--app/src/main/java/com/wireguard/android/QuickTileService.java6
-rw-r--r--app/src/main/java/com/wireguard/android/activity/BaseActivity.java6
-rw-r--r--app/src/main/java/com/wireguard/android/activity/MainActivity.java8
-rw-r--r--app/src/main/java/com/wireguard/android/activity/SettingsActivity.java12
-rw-r--r--app/src/main/java/com/wireguard/android/activity/ThemeChangeAwareActivity.java6
-rw-r--r--app/src/main/java/com/wireguard/android/activity/TunnelCreatorActivity.java2
-rw-r--r--app/src/main/java/com/wireguard/android/backend/GoBackend.java4
-rw-r--r--app/src/main/java/com/wireguard/android/backend/WgQuickBackend.java2
-rw-r--r--app/src/main/java/com/wireguard/android/databinding/BindingAdapters.java16
-rw-r--r--app/src/main/java/com/wireguard/android/databinding/ItemChangeListener.java8
-rw-r--r--app/src/main/java/com/wireguard/android/databinding/ObservableKeyedRecyclerViewAdapter.java12
-rw-r--r--app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java8
-rw-r--r--app/src/main/java/com/wireguard/android/fragment/BaseFragment.java10
-rw-r--r--app/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.java6
-rw-r--r--app/src/main/java/com/wireguard/android/fragment/TunnelDetailFragment.java2
-rw-r--r--app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java8
-rw-r--r--app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java14
-rw-r--r--app/src/main/java/com/wireguard/android/model/ApplicationData.java4
-rw-r--r--app/src/main/java/com/wireguard/android/model/Tunnel.java6
-rw-r--r--app/src/main/java/com/wireguard/android/model/TunnelManager.java6
-rw-r--r--app/src/main/java/com/wireguard/android/preference/LogExporterPreference.java6
-rw-r--r--app/src/main/java/com/wireguard/android/preference/ToolsInstallerPreference.java4
-rw-r--r--app/src/main/java/com/wireguard/android/preference/VersionPreference.java4
-rw-r--r--app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java6
-rw-r--r--app/src/main/java/com/wireguard/android/util/ClipboardUtils.java2
-rw-r--r--app/src/main/java/com/wireguard/android/util/ErrorMessages.java2
-rw-r--r--app/src/main/java/com/wireguard/android/util/ExceptionLoggers.java2
-rw-r--r--app/src/main/java/com/wireguard/android/util/FragmentUtils.java2
-rw-r--r--app/src/main/java/com/wireguard/android/util/ObservableKeyedArrayList.java4
-rw-r--r--app/src/main/java/com/wireguard/android/util/ObservableKeyedList.java2
-rw-r--r--app/src/main/java/com/wireguard/android/util/ObservableSortedKeyedArrayList.java2
-rw-r--r--app/src/main/java/com/wireguard/android/util/RootShell.java2
-rw-r--r--app/src/main/java/com/wireguard/android/util/ToolsInstaller.java2
-rw-r--r--app/src/main/java/com/wireguard/android/viewmodel/ConfigProxy.java4
-rw-r--r--app/src/main/java/com/wireguard/android/viewmodel/InterfaceProxy.java8
-rw-r--r--app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java10
-rw-r--r--app/src/main/java/com/wireguard/android/widget/KeyInputFilter.java2
-rw-r--r--app/src/main/java/com/wireguard/android/widget/NameInputFilter.java2
-rw-r--r--app/src/main/java/com/wireguard/android/widget/SlashDrawable.java6
-rw-r--r--app/src/main/java/com/wireguard/android/widget/ToggleSwitch.java2
-rw-r--r--app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButtonBehavior.java6
-rw-r--r--app/src/main/java/com/wireguard/android/widget/fab/FloatingActionsMenu.java10
-rw-r--r--app/src/main/java/com/wireguard/android/widget/fab/FloatingActionsMenuRecyclerViewScrollListener.java2
-rw-r--r--app/src/main/java/com/wireguard/android/widget/fab/LabeledFloatingActionButton.java4
-rw-r--r--app/src/main/java/com/wireguard/android/widget/fab/TouchDelegateGroup.java2
-rw-r--r--app/src/main/java/com/wireguard/config/BadConfigException.java2
-rw-r--r--app/src/main/java/com/wireguard/config/Config.java2
-rw-r--r--app/src/main/java/com/wireguard/config/InetEndpoint.java2
-rw-r--r--app/src/main/java/com/wireguard/config/Interface.java2
-rw-r--r--app/src/main/java/com/wireguard/config/ParseException.java2
-rw-r--r--app/src/main/java/com/wireguard/config/Peer.java2
-rw-r--r--app/src/main/java/com/wireguard/crypto/Curve25519.java2
-rw-r--r--app/src/main/java/com/wireguard/util/KeyedList.java2
-rw-r--r--app/src/main/java/com/wireguard/util/SortedKeyedList.java2
-rw-r--r--app/src/main/res/layout/app_list_dialog_fragment.xml2
-rw-r--r--app/src/main/res/layout/config_naming_dialog_fragment.xml4
-rw-r--r--app/src/main/res/layout/tunnel_detail_fragment.xml4
-rw-r--r--app/src/main/res/layout/tunnel_detail_peer.xml4
-rw-r--r--app/src/main/res/layout/tunnel_editor_fragment.xml8
-rw-r--r--app/src/main/res/layout/tunnel_editor_peer.xml6
-rw-r--r--app/src/main/res/layout/tunnel_list_fragment.xml8
-rw-r--r--app/src/main/res/values/styles.xml4
-rw-r--r--gradle.properties2
66 files changed, 165 insertions, 164 deletions
diff --git a/app/build.gradle b/app/build.gradle
index f0b7298..6874d56 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -65,21 +65,25 @@ android {
}
ext {
+ annotationsVersion = '1.0.1'
+ appcompatVersion = '1.0.2'
+ cardviewVersion = '1.0.0'
databindingVersion = '3.1.3'
+ materialComponentsVersion = '1.0.0'
jsr305Version = '3.0.2'
+ preferenceVersion = '1.0.0'
streamsupportVersion = '1.6.0'
- supportLibsVersion = '27.1.1'
threetenabpVersion = '1.1.1'
zxingEmbeddedVersion = '3.6.0'
}
dependencies {
- implementation "com.android.databinding:library:$databindingVersion"
- implementation "com.android.support:appcompat-v7:$supportLibsVersion"
- implementation "com.android.support:cardview-v7:$supportLibsVersion"
- implementation "com.android.support:design:$supportLibsVersion"
- implementation "com.android.support:preference-v14:$supportLibsVersion"
- implementation "com.android.support:support-annotations:$supportLibsVersion"
+ implementation "androidx.annotation:annotation:$annotationsVersion"
+ implementation "androidx.appcompat:appcompat:$appcompatVersion"
+ implementation "androidx.cardview:cardview:$cardviewVersion"
+ implementation "androidx.databinding:databinding-runtime:$databindingVersion"
+ implementation "androidx.preference:preference:$preferenceVersion"
+ implementation "com.google.android.material:material:$materialComponentsVersion"
implementation "com.google.code.findbugs:jsr305:$jsr305Version"
implementation "com.jakewharton.threetenabp:threetenabp:$threetenabpVersion"
implementation "com.journeyapps:zxing-android-embedded:$zxingEmbeddedVersion"
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 02930b2..0fb6331 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -43,8 +43,7 @@
<activity
android:name=".activity.SettingsActivity"
android:label="@string/settings"
- android:parentActivityName=".activity.MainActivity"
- android:theme="@style/SettingsTheme" />
+ android:parentActivityName=".activity.MainActivity" />
<activity
android:name=".activity.TunnelCreatorActivity"
diff --git a/app/src/main/java/com/wireguard/android/Application.java b/app/src/main/java/com/wireguard/android/Application.java
index 65b5a66..c376110 100644
--- a/app/src/main/java/com/wireguard/android/Application.java
+++ b/app/src/main/java/com/wireguard/android/Application.java
@@ -13,8 +13,8 @@ import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.preference.PreferenceManager;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatDelegate;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatDelegate;
import com.wireguard.android.backend.Backend;
import com.wireguard.android.backend.GoBackend;
diff --git a/app/src/main/java/com/wireguard/android/QuickTileService.java b/app/src/main/java/com/wireguard/android/QuickTileService.java
index 198684c..2925793 100644
--- a/app/src/main/java/com/wireguard/android/QuickTileService.java
+++ b/app/src/main/java/com/wireguard/android/QuickTileService.java
@@ -7,8 +7,8 @@ package com.wireguard.android;
import android.annotation.TargetApi;
import android.content.Intent;
-import android.databinding.Observable;
-import android.databinding.Observable.OnPropertyChangedCallback;
+import androidx.databinding.Observable;
+import androidx.databinding.Observable.OnPropertyChangedCallback;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.Icon;
@@ -16,7 +16,7 @@ import android.os.Build;
import android.os.IBinder;
import android.service.quicksettings.Tile;
import android.service.quicksettings.TileService;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import android.util.Log;
import android.widget.Toast;
diff --git a/app/src/main/java/com/wireguard/android/activity/BaseActivity.java b/app/src/main/java/com/wireguard/android/activity/BaseActivity.java
index 1a02d90..c1a10db 100644
--- a/app/src/main/java/com/wireguard/android/activity/BaseActivity.java
+++ b/app/src/main/java/com/wireguard/android/activity/BaseActivity.java
@@ -5,10 +5,10 @@
package com.wireguard.android.activity;
-import android.databinding.CallbackRegistry;
-import android.databinding.CallbackRegistry.NotifierCallback;
+import androidx.databinding.CallbackRegistry;
+import androidx.databinding.CallbackRegistry.NotifierCallback;
import android.os.Bundle;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import com.wireguard.android.Application;
import com.wireguard.android.model.Tunnel;
diff --git a/app/src/main/java/com/wireguard/android/activity/MainActivity.java b/app/src/main/java/com/wireguard/android/activity/MainActivity.java
index 4f146cb..8b4ce88 100644
--- a/app/src/main/java/com/wireguard/android/activity/MainActivity.java
+++ b/app/src/main/java/com/wireguard/android/activity/MainActivity.java
@@ -8,10 +8,10 @@ package com.wireguard.android.activity;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.app.FragmentTransaction;
-import android.support.v7.app.ActionBar;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentTransaction;
+import androidx.appcompat.app.ActionBar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
diff --git a/app/src/main/java/com/wireguard/android/activity/SettingsActivity.java b/app/src/main/java/com/wireguard/android/activity/SettingsActivity.java
index b827ca1..fb81886 100644
--- a/app/src/main/java/com/wireguard/android/activity/SettingsActivity.java
+++ b/app/src/main/java/com/wireguard/android/activity/SettingsActivity.java
@@ -7,12 +7,12 @@ package com.wireguard.android.activity;
import android.content.pm.PackageManager;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.ActivityCompat;
-import android.support.v4.content.ContextCompat;
-import android.support.v7.preference.Preference;
-import android.support.v7.preference.PreferenceFragmentCompat;
-import android.support.v7.preference.PreferenceScreen;
+import androidx.annotation.Nullable;
+import androidx.core.app.ActivityCompat;
+import androidx.core.content.ContextCompat;
+import androidx.preference.Preference;
+import androidx.preference.PreferenceFragmentCompat;
+import androidx.preference.PreferenceScreen;
import android.util.SparseArray;
import android.view.MenuItem;
diff --git a/app/src/main/java/com/wireguard/android/activity/ThemeChangeAwareActivity.java b/app/src/main/java/com/wireguard/android/activity/ThemeChangeAwareActivity.java
index fbae216..3c3dd92 100644
--- a/app/src/main/java/com/wireguard/android/activity/ThemeChangeAwareActivity.java
+++ b/app/src/main/java/com/wireguard/android/activity/ThemeChangeAwareActivity.java
@@ -8,9 +8,9 @@ package com.wireguard.android.activity;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.app.AppCompatDelegate;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.app.AppCompatDelegate;
import android.util.Log;
import com.wireguard.android.Application;
diff --git a/app/src/main/java/com/wireguard/android/activity/TunnelCreatorActivity.java b/app/src/main/java/com/wireguard/android/activity/TunnelCreatorActivity.java
index 568a39c..26f4af2 100644
--- a/app/src/main/java/com/wireguard/android/activity/TunnelCreatorActivity.java
+++ b/app/src/main/java/com/wireguard/android/activity/TunnelCreatorActivity.java
@@ -6,7 +6,7 @@
package com.wireguard.android.activity;
import android.os.Bundle;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import com.wireguard.android.fragment.TunnelEditorFragment;
import com.wireguard.android.model.Tunnel;
diff --git a/app/src/main/java/com/wireguard/android/backend/GoBackend.java b/app/src/main/java/com/wireguard/android/backend/GoBackend.java
index 301bbd7..dc9ec00 100644
--- a/app/src/main/java/com/wireguard/android/backend/GoBackend.java
+++ b/app/src/main/java/com/wireguard/android/backend/GoBackend.java
@@ -9,8 +9,8 @@ import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.ParcelFileDescriptor;
-import android.support.annotation.Nullable;
-import android.support.v4.util.ArraySet;
+import androidx.annotation.Nullable;
+import androidx.collection.ArraySet;
import android.util.Log;
import com.wireguard.android.Application;
diff --git a/app/src/main/java/com/wireguard/android/backend/WgQuickBackend.java b/app/src/main/java/com/wireguard/android/backend/WgQuickBackend.java
index 25f48d0..1cdac45 100644
--- a/app/src/main/java/com/wireguard/android/backend/WgQuickBackend.java
+++ b/app/src/main/java/com/wireguard/android/backend/WgQuickBackend.java
@@ -6,7 +6,7 @@
package com.wireguard.android.backend;
import android.content.Context;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import android.util.Log;
import com.wireguard.android.Application;
diff --git a/app/src/main/java/com/wireguard/android/databinding/BindingAdapters.java b/app/src/main/java/com/wireguard/android/databinding/BindingAdapters.java
index fe01bf1..d13c1b8 100644
--- a/app/src/main/java/com/wireguard/android/databinding/BindingAdapters.java
+++ b/app/src/main/java/com/wireguard/android/databinding/BindingAdapters.java
@@ -5,14 +5,14 @@
package com.wireguard.android.databinding;
-import android.databinding.BindingAdapter;
-import android.databinding.DataBindingUtil;
-import android.databinding.ObservableList;
-import android.databinding.ViewDataBinding;
-import android.databinding.adapters.ListenerUtil;
-import android.support.annotation.Nullable;
-import android.support.v7.widget.LinearLayoutManager;
-import android.support.v7.widget.RecyclerView;
+import androidx.databinding.BindingAdapter;
+import androidx.databinding.DataBindingUtil;
+import androidx.databinding.ObservableList;
+import androidx.databinding.ViewDataBinding;
+import androidx.databinding.adapters.ListenerUtil;
+import androidx.annotation.Nullable;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
import android.text.InputFilter;
import android.view.LayoutInflater;
import android.widget.LinearLayout;
diff --git a/app/src/main/java/com/wireguard/android/databinding/ItemChangeListener.java b/app/src/main/java/com/wireguard/android/databinding/ItemChangeListener.java
index b913d17..adf49c5 100644
--- a/app/src/main/java/com/wireguard/android/databinding/ItemChangeListener.java
+++ b/app/src/main/java/com/wireguard/android/databinding/ItemChangeListener.java
@@ -5,10 +5,10 @@
package com.wireguard.android.databinding;
-import android.databinding.DataBindingUtil;
-import android.databinding.ObservableList;
-import android.databinding.ViewDataBinding;
-import android.support.annotation.Nullable;
+import androidx.databinding.DataBindingUtil;
+import androidx.databinding.ObservableList;
+import androidx.databinding.ViewDataBinding;
+import androidx.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
diff --git a/app/src/main/java/com/wireguard/android/databinding/ObservableKeyedRecyclerViewAdapter.java b/app/src/main/java/com/wireguard/android/databinding/ObservableKeyedRecyclerViewAdapter.java
index 5bfa64f..c74b2ee 100644
--- a/app/src/main/java/com/wireguard/android/databinding/ObservableKeyedRecyclerViewAdapter.java
+++ b/app/src/main/java/com/wireguard/android/databinding/ObservableKeyedRecyclerViewAdapter.java
@@ -6,12 +6,12 @@
package com.wireguard.android.databinding;
import android.content.Context;
-import android.databinding.DataBindingUtil;
-import android.databinding.ObservableList;
-import android.databinding.ViewDataBinding;
-import android.support.annotation.Nullable;
-import android.support.v7.widget.RecyclerView;
-import android.support.v7.widget.RecyclerView.Adapter;
+import androidx.databinding.DataBindingUtil;
+import androidx.databinding.ObservableList;
+import androidx.databinding.ViewDataBinding;
+import androidx.annotation.Nullable;
+import androidx.recyclerview.widget.RecyclerView;
+import androidx.recyclerview.widget.RecyclerView.Adapter;
import android.view.LayoutInflater;
import android.view.ViewGroup;
diff --git a/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java b/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
index 49cb51e..ae6fd82 100644
--- a/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
+++ b/app/src/main/java/com/wireguard/android/fragment/AppListDialogFragment.java
@@ -12,10 +12,10 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.DialogFragment;
-import android.support.v4.app.Fragment;
-import android.support.v7.app.AlertDialog;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.DialogFragment;
+import androidx.fragment.app.Fragment;
+import androidx.appcompat.app.AlertDialog;
import android.widget.Toast;
import com.wireguard.android.Application;
diff --git a/app/src/main/java/com/wireguard/android/fragment/BaseFragment.java b/app/src/main/java/com/wireguard/android/fragment/BaseFragment.java
index 3b2199a..d0e0bd4 100644
--- a/app/src/main/java/com/wireguard/android/fragment/BaseFragment.java
+++ b/app/src/main/java/com/wireguard/android/fragment/BaseFragment.java
@@ -7,11 +7,11 @@ package com.wireguard.android.fragment;
import android.content.Context;
import android.content.Intent;
-import android.databinding.DataBindingUtil;
-import android.databinding.ViewDataBinding;
-import android.support.annotation.Nullable;
-import android.support.design.widget.Snackbar;
-import android.support.v4.app.Fragment;
+import androidx.databinding.DataBindingUtil;
+import androidx.databinding.ViewDataBinding;
+import androidx.annotation.Nullable;
+import com.google.android.material.snackbar.Snackbar;
+import androidx.fragment.app.Fragment;
import android.util.Log;
import android.view.View;
import android.widget.Toast;
diff --git a/app/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.java b/app/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.java
index e56b428..cad9506 100644
--- a/app/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.java
+++ b/app/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.java
@@ -10,9 +10,9 @@ import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.DialogFragment;
-import android.support.v7.app.AlertDialog;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.DialogFragment;
+import androidx.appcompat.app.AlertDialog;
import android.view.inputmethod.InputMethodManager;
import com.wireguard.android.Application;
diff --git a/app/src/main/java/com/wireguard/android/fragment/TunnelDetailFragment.java b/app/src/main/java/com/wireguard/android/fragment/TunnelDetailFragment.java
index b4e7202..adcc574 100644
--- a/app/src/main/java/com/wireguard/android/fragment/TunnelDetailFragment.java
+++ b/app/src/main/java/com/wireguard/android/fragment/TunnelDetailFragment.java
@@ -6,7 +6,7 @@
package com.wireguard.android.fragment;
import android.os.Bundle;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
diff --git a/app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java b/app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java
index 7c4a162..2f70534 100644
--- a/app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java
+++ b/app/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.java
@@ -7,11 +7,11 @@ package com.wireguard.android.fragment;
import android.app.Activity;
import android.content.Context;
-import android.databinding.ObservableList;
+import androidx.databinding.ObservableList;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.design.widget.Snackbar;
-import android.support.v4.app.FragmentManager;
+import androidx.annotation.Nullable;
+import com.google.android.material.snackbar.Snackbar;
+import androidx.fragment.app.FragmentManager;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
diff --git a/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java b/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java
index 5871f26..5f84f90 100644
--- a/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java
+++ b/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java
@@ -14,13 +14,13 @@ import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.OpenableColumns;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.design.widget.Snackbar;
-import android.support.v4.app.FragmentManager;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.view.ActionMode;
-import android.support.v7.widget.RecyclerView;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import com.google.android.material.snackbar.Snackbar;
+import androidx.fragment.app.FragmentManager;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.view.ActionMode;
+import androidx.recyclerview.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
diff --git a/app/src/main/java/com/wireguard/android/model/ApplicationData.java b/app/src/main/java/com/wireguard/android/model/ApplicationData.java
index f7c335d..62d6d57 100644
--- a/app/src/main/java/com/wireguard/android/model/ApplicationData.java
+++ b/app/src/main/java/com/wireguard/android/model/ApplicationData.java
@@ -5,8 +5,8 @@
package com.wireguard.android.model;
-import android.databinding.BaseObservable;
-import android.databinding.Bindable;
+import androidx.databinding.BaseObservable;
+import androidx.databinding.Bindable;
import android.graphics.drawable.Drawable;
import com.wireguard.android.BR;
diff --git a/app/src/main/java/com/wireguard/android/model/Tunnel.java b/app/src/main/java/com/wireguard/android/model/Tunnel.java
index 9092b28..188b16e 100644
--- a/app/src/main/java/com/wireguard/android/model/Tunnel.java
+++ b/app/src/main/java/com/wireguard/android/model/Tunnel.java
@@ -5,9 +5,9 @@
package com.wireguard.android.model;
-import android.databinding.BaseObservable;
-import android.databinding.Bindable;
-import android.support.annotation.Nullable;
+import androidx.databinding.BaseObservable;
+import androidx.databinding.Bindable;
+import androidx.annotation.Nullable;
import com.wireguard.android.BR;
import com.wireguard.android.util.ExceptionLoggers;
diff --git a/app/src/main/java/com/wireguard/android/model/TunnelManager.java b/app/src/main/java/com/wireguard/android/model/TunnelManager.java
index 83df359..d2aa254 100644
--- a/app/src/main/java/com/wireguard/android/model/TunnelManager.java
+++ b/app/src/main/java/com/wireguard/android/model/TunnelManager.java
@@ -8,9 +8,9 @@ package com.wireguard.android.model;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
-import android.databinding.BaseObservable;
-import android.databinding.Bindable;
-import android.support.annotation.Nullable;
+import androidx.databinding.BaseObservable;
+import androidx.databinding.Bindable;
+import androidx.annotation.Nullable;
import com.wireguard.android.Application;
import com.wireguard.android.BR;
diff --git a/app/src/main/java/com/wireguard/android/preference/LogExporterPreference.java b/app/src/main/java/com/wireguard/android/preference/LogExporterPreference.java
index 3f59c7f..03e5c33 100644
--- a/app/src/main/java/com/wireguard/android/preference/LogExporterPreference.java
+++ b/app/src/main/java/com/wireguard/android/preference/LogExporterPreference.java
@@ -9,9 +9,9 @@ import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Environment;
-import android.support.annotation.Nullable;
-import android.support.design.widget.Snackbar;
-import android.support.v7.preference.Preference;
+import androidx.annotation.Nullable;
+import com.google.android.material.snackbar.Snackbar;
+import androidx.preference.Preference;
import android.util.AttributeSet;
import android.util.Log;
diff --git a/app/src/main/java/com/wireguard/android/preference/ToolsInstallerPreference.java b/app/src/main/java/com/wireguard/android/preference/ToolsInstallerPreference.java
index 4e20c7e..f28d841 100644
--- a/app/src/main/java/com/wireguard/android/preference/ToolsInstallerPreference.java
+++ b/app/src/main/java/com/wireguard/android/preference/ToolsInstallerPreference.java
@@ -6,8 +6,8 @@
package com.wireguard.android.preference;
import android.content.Context;
-import android.support.annotation.Nullable;
-import android.support.v7.preference.Preference;
+import androidx.annotation.Nullable;
+import androidx.preference.Preference;
import android.util.AttributeSet;
import com.wireguard.android.Application;
diff --git a/app/src/main/java/com/wireguard/android/preference/VersionPreference.java b/app/src/main/java/com/wireguard/android/preference/VersionPreference.java
index 2273d6d..a8d7f75 100644
--- a/app/src/main/java/com/wireguard/android/preference/VersionPreference.java
+++ b/app/src/main/java/com/wireguard/android/preference/VersionPreference.java
@@ -9,8 +9,8 @@ import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
-import android.support.annotation.Nullable;
-import android.support.v7.preference.Preference;
+import androidx.annotation.Nullable;
+import androidx.preference.Preference;
import android.util.AttributeSet;
import com.wireguard.android.Application;
diff --git a/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java b/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java
index a264605..ecba734 100644
--- a/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java
+++ b/app/src/main/java/com/wireguard/android/preference/ZipExporterPreference.java
@@ -9,9 +9,9 @@ import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Environment;
-import android.support.annotation.Nullable;
-import android.support.design.widget.Snackbar;
-import android.support.v7.preference.Preference;
+import androidx.annotation.Nullable;
+import com.google.android.material.snackbar.Snackbar;
+import androidx.preference.Preference;
import android.util.AttributeSet;
import android.util.Log;
diff --git a/app/src/main/java/com/wireguard/android/util/ClipboardUtils.java b/app/src/main/java/com/wireguard/android/util/ClipboardUtils.java
index 1fb6eed..e826cba 100644
--- a/app/src/main/java/com/wireguard/android/util/ClipboardUtils.java
+++ b/app/src/main/java/com/wireguard/android/util/ClipboardUtils.java
@@ -8,7 +8,7 @@ package com.wireguard.android.util;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
-import android.support.design.widget.Snackbar;
+import com.google.android.material.snackbar.Snackbar;
import android.view.View;
import android.widget.TextView;
diff --git a/app/src/main/java/com/wireguard/android/util/ErrorMessages.java b/app/src/main/java/com/wireguard/android/util/ErrorMessages.java
index 0f49448..0835e83 100644
--- a/app/src/main/java/com/wireguard/android/util/ErrorMessages.java
+++ b/app/src/main/java/com/wireguard/android/util/ErrorMessages.java
@@ -6,7 +6,7 @@
package com.wireguard.android.util;
import android.content.res.Resources;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import com.wireguard.android.Application;
import com.wireguard.android.R;
diff --git a/app/src/main/java/com/wireguard/android/util/ExceptionLoggers.java b/app/src/main/java/com/wireguard/android/util/ExceptionLoggers.java
index 5188112..c4bd0ed 100644
--- a/app/src/main/java/com/wireguard/android/util/ExceptionLoggers.java
+++ b/app/src/main/java/com/wireguard/android/util/ExceptionLoggers.java
@@ -5,7 +5,7 @@
package com.wireguard.android.util;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import android.util.Log;
import java9.util.function.BiConsumer;
diff --git a/app/src/main/java/com/wireguard/android/util/FragmentUtils.java b/app/src/main/java/com/wireguard/android/util/FragmentUtils.java
index b7fdd09..47b1d0a 100644
--- a/app/src/main/java/com/wireguard/android/util/FragmentUtils.java
+++ b/app/src/main/java/com/wireguard/android/util/FragmentUtils.java
@@ -5,7 +5,7 @@
package com.wireguard.android.util;
import android.content.Context;
-import android.support.v7.preference.Preference;
+import androidx.preference.Preference;
import android.view.ContextThemeWrapper;
import com.wireguard.android.activity.SettingsActivity;
diff --git a/app/src/main/java/com/wireguard/android/util/ObservableKeyedArrayList.java b/app/src/main/java/com/wireguard/android/util/ObservableKeyedArrayList.java
index 7af829f..a58bd5e 100644
--- a/app/src/main/java/com/wireguard/android/util/ObservableKeyedArrayList.java
+++ b/app/src/main/java/com/wireguard/android/util/ObservableKeyedArrayList.java
@@ -5,8 +5,8 @@
package com.wireguard.android.util;
-import android.databinding.ObservableArrayList;
-import android.support.annotation.Nullable;
+import androidx.databinding.ObservableArrayList;
+import androidx.annotation.Nullable;
import com.wireguard.util.Keyed;
diff --git a/app/src/main/java/com/wireguard/android/util/ObservableKeyedList.java b/app/src/main/java/com/wireguard/android/util/ObservableKeyedList.java
index d7b06ad..86d96e7 100644
--- a/app/src/main/java/com/wireguard/android/util/ObservableKeyedList.java
+++ b/app/src/main/java/com/wireguard/android/util/ObservableKeyedList.java
@@ -5,7 +5,7 @@
package com.wireguard.android.util;
-import android.databinding.ObservableList;
+import androidx.databinding.ObservableList;
import com.wireguard.util.Keyed;
import com.wireguard.util.KeyedList;
diff --git a/app/src/main/java/com/wireguard/android/util/ObservableSortedKeyedArrayList.java b/app/src/main/java/com/wireguard/android/util/ObservableSortedKeyedArrayList.java
index d287d33..e123dd2 100644
--- a/app/src/main/java/com/wireguard/android/util/ObservableSortedKeyedArrayList.java
+++ b/app/src/main/java/com/wireguard/android/util/ObservableSortedKeyedArrayList.java
@@ -5,7 +5,7 @@
package com.wireguard.android.util;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import com.wireguard.util.Keyed;
import com.wireguard.util.SortedKeyedList;
diff --git a/app/src/main/java/com/wireguard/android/util/RootShell.java b/app/src/main/java/com/wireguard/android/util/RootShell.java
index 2dc02b5..409cdcd 100644
--- a/app/src/main/java/com/wireguard/android/util/RootShell.java
+++ b/app/src/main/java/com/wireguard/android/util/RootShell.java
@@ -6,7 +6,7 @@
package com.wireguard.android.util;
import android.content.Context;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import android.util.Log;
import com.wireguard.android.BuildConfig;
diff --git a/app/src/main/java/com/wireguard/android/util/ToolsInstaller.java b/app/src/main/java/com/wireguard/android/util/ToolsInstaller.java
index dd381a1..d4a620e 100644
--- a/app/src/main/java/com/wireguard/android/util/ToolsInstaller.java
+++ b/app/src/main/java/com/wireguard/android/util/ToolsInstaller.java
@@ -6,7 +6,7 @@
package com.wireguard.android.util;
import android.content.Context;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import android.system.OsConstants;
import android.util.Log;
diff --git a/app/src/main/java/com/wireguard/android/viewmodel/ConfigProxy.java b/app/src/main/java/com/wireguard/android/viewmodel/ConfigProxy.java
index 6252329..494a205 100644
--- a/app/src/main/java/com/wireguard/android/viewmodel/ConfigProxy.java
+++ b/app/src/main/java/com/wireguard/android/viewmodel/ConfigProxy.java
@@ -5,8 +5,8 @@
package com.wireguard.android.viewmodel;
-import android.databinding.ObservableArrayList;
-import android.databinding.ObservableList;
+import androidx.databinding.ObservableArrayList;
+import androidx.databinding.ObservableList;
import android.os.Parcel;
import android.os.Parcelable;
diff --git a/app/src/main/java/com/wireguard/android/viewmodel/InterfaceProxy.java b/app/src/main/java/com/wireguard/android/viewmodel/InterfaceProxy.java
index 3b303f4..2b6ce3f 100644
--- a/app/src/main/java/com/wireguard/android/viewmodel/InterfaceProxy.java
+++ b/app/src/main/java/com/wireguard/android/viewmodel/InterfaceProxy.java
@@ -5,10 +5,10 @@
package com.wireguard.android.viewmodel;
-import android.databinding.BaseObservable;
-import android.databinding.Bindable;
-import android.databinding.ObservableArrayList;
-import android.databinding.ObservableList;
+import androidx.databinding.BaseObservable;
+import androidx.databinding.Bindable;
+import androidx.databinding.ObservableArrayList;
+import androidx.databinding.ObservableList;
import android.os.Parcel;
import android.os.Parcelable;
diff --git a/app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java b/app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java
index c9bae98..6336aba 100644
--- a/app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java
+++ b/app/src/main/java/com/wireguard/android/viewmodel/PeerProxy.java
@@ -5,13 +5,13 @@
package com.wireguard.android.viewmodel;
-import android.databinding.BaseObservable;
-import android.databinding.Bindable;
-import android.databinding.Observable;
-import android.databinding.ObservableList;
+import androidx.databinding.BaseObservable;
+import androidx.databinding.Bindable;
+import androidx.databinding.Observable;
+import androidx.databinding.ObservableList;
import android.os.Parcel;
import android.os.Parcelable;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import com.wireguard.android.BR;
import com.wireguard.config.Attribute;
diff --git a/app/src/main/java/com/wireguard/android/widget/KeyInputFilter.java b/app/src/main/java/com/wireguard/android/widget/KeyInputFilter.java
index 6332b85..74903ac 100644
--- a/app/src/main/java/com/wireguard/android/widget/KeyInputFilter.java
+++ b/app/src/main/java/com/wireguard/android/widget/KeyInputFilter.java
@@ -5,7 +5,7 @@
package com.wireguard.android.widget;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import android.text.InputFilter;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
diff --git a/app/src/main/java/com/wireguard/android/widget/NameInputFilter.java b/app/src/main/java/com/wireguard/android/widget/NameInputFilter.java
index 2352630..c95471e 100644
--- a/app/src/main/java/com/wireguard/android/widget/NameInputFilter.java
+++ b/app/src/main/java/com/wireguard/android/widget/NameInputFilter.java
@@ -5,7 +5,7 @@
package com.wireguard.android.widget;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import android.text.InputFilter;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
diff --git a/app/src/main/java/com/wireguard/android/widget/SlashDrawable.java b/app/src/main/java/com/wireguard/android/widget/SlashDrawable.java
index 408d788..a62da5d 100644
--- a/app/src/main/java/com/wireguard/android/widget/SlashDrawable.java
+++ b/app/src/main/java/com/wireguard/android/widget/SlashDrawable.java
@@ -23,9 +23,9 @@ import android.graphics.RectF;
import android.graphics.Region;
import android.graphics.drawable.Drawable;
import android.os.Build;
-import android.support.annotation.ColorInt;
-import android.support.annotation.IntRange;
-import android.support.annotation.Nullable;
+import androidx.annotation.ColorInt;
+import androidx.annotation.IntRange;
+import androidx.annotation.Nullable;
import android.util.FloatProperty;
@TargetApi(Build.VERSION_CODES.N)
diff --git a/app/src/main/java/com/wireguard/android/widget/ToggleSwitch.java b/app/src/main/java/com/wireguard/android/widget/ToggleSwitch.java
index b9b0684..a342272 100644
--- a/app/src/main/java/com/wireguard/android/widget/ToggleSwitch.java
+++ b/app/src/main/java/com/wireguard/android/widget/ToggleSwitch.java
@@ -8,7 +8,7 @@ package com.wireguard.android.widget;
import android.content.Context;
import android.os.Parcelable;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import android.util.AttributeSet;
import android.widget.Switch;
diff --git a/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButtonBehavior.java b/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButtonBehavior.java
index 3741c29..a351f4c 100644
--- a/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButtonBehavior.java
+++ b/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionButtonBehavior.java
@@ -10,9 +10,9 @@ import android.animation.AnimatorListenerAdapter;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.content.Context;
-import android.support.design.widget.CoordinatorLayout;
-import android.support.design.widget.Snackbar;
-import android.support.v4.view.animation.FastOutSlowInInterpolator;
+import androidx.coordinatorlayout.widget.CoordinatorLayout;
+import com.google.android.material.snackbar.Snackbar;
+import androidx.interpolator.view.animation.FastOutSlowInInterpolator;
import android.util.AttributeSet;
import android.view.View;
diff --git a/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionsMenu.java b/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionsMenu.java
index 8b69ce3..2fee71f 100644
--- a/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionsMenu.java
+++ b/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionsMenu.java
@@ -20,11 +20,11 @@ import android.graphics.drawable.LayerDrawable;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
-import android.support.annotation.Keep;
-import android.support.annotation.Nullable;
-import android.support.design.widget.FloatingActionButton;
-import android.support.v4.content.res.ResourcesCompat;
-import android.support.v7.widget.AppCompatTextView;
+import androidx.annotation.Keep;
+import androidx.annotation.Nullable;
+import com.google.android.material.floatingactionbutton.FloatingActionButton;
+import androidx.core.content.res.ResourcesCompat;
+import androidx.appcompat.widget.AppCompatTextView;
import android.util.AttributeSet;
import android.view.ContextThemeWrapper;
import android.view.TouchDelegate;
diff --git a/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionsMenuRecyclerViewScrollListener.java b/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionsMenuRecyclerViewScrollListener.java
index 5ca0502..2e51600 100644
--- a/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionsMenuRecyclerViewScrollListener.java
+++ b/app/src/main/java/com/wireguard/android/widget/fab/FloatingActionsMenuRecyclerViewScrollListener.java
@@ -5,7 +5,7 @@
package com.wireguard.android.widget.fab;
-import android.support.v7.widget.RecyclerView;
+import androidx.recyclerview.widget.RecyclerView;
public class FloatingActionsMenuRecyclerViewScrollListener extends RecyclerView.OnScrollListener {
private static final float SCALE_FACTOR = 1.5f;
diff --git a/app/src/main/java/com/wireguard/android/widget/fab/LabeledFloatingActionButton.java b/app/src/main/java/com/wireguard/android/widget/fab/LabeledFloatingActionButton.java
index d45f6a5..17512ba 100644
--- a/app/src/main/java/com/wireguard/android/widget/fab/LabeledFloatingActionButton.java
+++ b/app/src/main/java/com/wireguard/android/widget/fab/LabeledFloatingActionButton.java
@@ -8,8 +8,8 @@ package com.wireguard.android.widget.fab;
import android.content.Context;
import android.content.res.TypedArray;
-import android.support.annotation.Nullable;
-import android.support.design.widget.FloatingActionButton;
+import androidx.annotation.Nullable;
+import com.google.android.material.floatingactionbutton.FloatingActionButton;
import android.util.AttributeSet;
import android.widget.TextView;
diff --git a/app/src/main/java/com/wireguard/android/widget/fab/TouchDelegateGroup.java b/app/src/main/java/com/wireguard/android/widget/fab/TouchDelegateGroup.java
index ddb2899..88bf838 100644
--- a/app/src/main/java/com/wireguard/android/widget/fab/TouchDelegateGroup.java
+++ b/app/src/main/java/com/wireguard/android/widget/fab/TouchDelegateGroup.java
@@ -7,7 +7,7 @@
package com.wireguard.android.widget.fab;
import android.graphics.Rect;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import android.view.MotionEvent;
import android.view.TouchDelegate;
import android.view.View;
diff --git a/app/src/main/java/com/wireguard/config/BadConfigException.java b/app/src/main/java/com/wireguard/config/BadConfigException.java
index 7f794a3..edf3216 100644
--- a/app/src/main/java/com/wireguard/config/BadConfigException.java
+++ b/app/src/main/java/com/wireguard/config/BadConfigException.java
@@ -5,7 +5,7 @@
package com.wireguard.config;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import com.wireguard.crypto.KeyFormatException;
diff --git a/app/src/main/java/com/wireguard/config/Config.java b/app/src/main/java/com/wireguard/config/Config.java
index 8b393be..e1e11ee 100644
--- a/app/src/main/java/com/wireguard/config/Config.java
+++ b/app/src/main/java/com/wireguard/config/Config.java
@@ -5,7 +5,7 @@
package com.wireguard.config;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import com.wireguard.config.BadConfigException.Location;
import com.wireguard.config.BadConfigException.Reason;
diff --git a/app/src/main/java/com/wireguard/config/InetEndpoint.java b/app/src/main/java/com/wireguard/config/InetEndpoint.java
index 5f6a90d..4fbfe0c 100644
--- a/app/src/main/java/com/wireguard/config/InetEndpoint.java
+++ b/app/src/main/java/com/wireguard/config/InetEndpoint.java
@@ -5,7 +5,7 @@
package com.wireguard.config;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import org.threeten.bp.Duration;
import org.threeten.bp.Instant;
diff --git a/app/src/main/java/com/wireguard/config/Interface.java b/app/src/main/java/com/wireguard/config/Interface.java
index 2fd34a3..5876ad7 100644
--- a/app/src/main/java/com/wireguard/config/Interface.java
+++ b/app/src/main/java/com/wireguard/config/Interface.java
@@ -5,7 +5,7 @@
package com.wireguard.config;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import com.wireguard.config.BadConfigException.Location;
import com.wireguard.config.BadConfigException.Reason;
diff --git a/app/src/main/java/com/wireguard/config/ParseException.java b/app/src/main/java/com/wireguard/config/ParseException.java
index c8482af..6748629 100644
--- a/app/src/main/java/com/wireguard/config/ParseException.java
+++ b/app/src/main/java/com/wireguard/config/ParseException.java
@@ -5,7 +5,7 @@
package com.wireguard.config;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
/**
*/
diff --git a/app/src/main/java/com/wireguard/config/Peer.java b/app/src/main/java/com/wireguard/config/Peer.java
index cdea030..7ee7d7c 100644
--- a/app/src/main/java/com/wireguard/config/Peer.java
+++ b/app/src/main/java/com/wireguard/config/Peer.java
@@ -5,7 +5,7 @@
package com.wireguard.config;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import com.wireguard.config.BadConfigException.Location;
import com.wireguard.config.BadConfigException.Reason;
diff --git a/app/src/main/java/com/wireguard/crypto/Curve25519.java b/app/src/main/java/com/wireguard/crypto/Curve25519.java
index 6cb06d7..1aa2499 100644
--- a/app/src/main/java/com/wireguard/crypto/Curve25519.java
+++ b/app/src/main/java/com/wireguard/crypto/Curve25519.java
@@ -6,7 +6,7 @@
package com.wireguard.crypto;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import java.util.Arrays;
diff --git a/app/src/main/java/com/wireguard/util/KeyedList.java b/app/src/main/java/com/wireguard/util/KeyedList.java
index 4885790..c890b04 100644
--- a/app/src/main/java/com/wireguard/util/KeyedList.java
+++ b/app/src/main/java/com/wireguard/util/KeyedList.java
@@ -5,7 +5,7 @@
package com.wireguard.util;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import java.util.Collection;
import java.util.List;
diff --git a/app/src/main/java/com/wireguard/util/SortedKeyedList.java b/app/src/main/java/com/wireguard/util/SortedKeyedList.java
index fd38dce..78cbb75 100644
--- a/app/src/main/java/com/wireguard/util/SortedKeyedList.java
+++ b/app/src/main/java/com/wireguard/util/SortedKeyedList.java
@@ -5,7 +5,7 @@
package com.wireguard.util;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import java.util.Collection;
import java.util.Comparator;
diff --git a/app/src/main/res/layout/app_list_dialog_fragment.xml b/app/src/main/res/layout/app_list_dialog_fragment.xml
index c975778..50e795d 100644
--- a/app/src/main/res/layout/app_list_dialog_fragment.xml
+++ b/app/src/main/res/layout/app_list_dialog_fragment.xml
@@ -30,7 +30,7 @@
android:indeterminate="true"
android:visibility="@{appData.isEmpty() ? View.VISIBLE : View.GONE}" />
- <android.support.v7.widget.RecyclerView
+ <androidx.recyclerview.widget.RecyclerView
android:id="@+id/app_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
diff --git a/app/src/main/res/layout/config_naming_dialog_fragment.xml b/app/src/main/res/layout/config_naming_dialog_fragment.xml
index bf8b426..a701780 100644
--- a/app/src/main/res/layout/config_naming_dialog_fragment.xml
+++ b/app/src/main/res/layout/config_naming_dialog_fragment.xml
@@ -12,7 +12,7 @@
android:layout_height="match_parent"
android:padding="16dp">
- <android.support.design.widget.TextInputLayout
+ <com.google.android.material.textfield.TextInputLayout
android:id="@+id/tunnel_name_text_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
@@ -25,7 +25,7 @@
android:inputType="textNoSuggestions|textVisiblePassword"
app:filter="@{NameInputFilter.newInstance()}" />
- </android.support.design.widget.TextInputLayout>
+ </com.google.android.material.textfield.TextInputLayout>
</FrameLayout>
diff --git a/app/src/main/res/layout/tunnel_detail_fragment.xml b/app/src/main/res/layout/tunnel_detail_fragment.xml
index 9b06ddd..34332c2 100644
--- a/app/src/main/res/layout/tunnel_detail_fragment.xml
+++ b/app/src/main/res/layout/tunnel_detail_fragment.xml
@@ -32,7 +32,7 @@
android:layout_height="wrap_content"
android:orientation="vertical">
- <android.support.v7.widget.CardView
+ <androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
@@ -122,7 +122,7 @@
android:contentDescription="@string/addresses"
android:text="@{config.interface.addresses}" />
</RelativeLayout>
- </android.support.v7.widget.CardView>
+ </androidx.cardview.widget.CardView>
<LinearLayout
android:layout_width="match_parent"
diff --git a/app/src/main/res/layout/tunnel_detail_peer.xml b/app/src/main/res/layout/tunnel_detail_peer.xml
index 767e038..f528a8d 100644
--- a/app/src/main/res/layout/tunnel_detail_peer.xml
+++ b/app/src/main/res/layout/tunnel_detail_peer.xml
@@ -11,7 +11,7 @@
type="com.wireguard.config.Peer" />
</data>
- <android.support.v7.widget.CardView
+ <androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
@@ -90,5 +90,5 @@
android:layout_below="@+id/endpoint_label"
android:text="@{item.endpoint}" />
</RelativeLayout>
- </android.support.v7.widget.CardView>
+ </androidx.cardview.widget.CardView>
</layout>
diff --git a/app/src/main/res/layout/tunnel_editor_fragment.xml b/app/src/main/res/layout/tunnel_editor_fragment.xml
index 3945fff..db91df2 100644
--- a/app/src/main/res/layout/tunnel_editor_fragment.xml
+++ b/app/src/main/res/layout/tunnel_editor_fragment.xml
@@ -24,7 +24,7 @@
type="String" />
</data>
- <android.support.design.widget.CoordinatorLayout
+ <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/main_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -39,7 +39,7 @@
android:layout_height="wrap_content"
android:orientation="vertical">
- <android.support.v7.widget.CardView
+ <androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
@@ -228,7 +228,7 @@
android:onClick="@{fragment::onRequestSetExcludedApplications}"
android:text="@{@plurals/set_excluded_applications(config.interface.excludedApplications.size, config.interface.excludedApplications.size)}" />
</RelativeLayout>
- </android.support.v7.widget.CardView>
+ </androidx.cardview.widget.CardView>
<LinearLayout
android:layout_width="match_parent"
@@ -250,5 +250,5 @@
android:text="@string/add_peer" />
</LinearLayout>
</ScrollView>
- </android.support.design.widget.CoordinatorLayout>
+ </androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>
diff --git a/app/src/main/res/layout/tunnel_editor_peer.xml b/app/src/main/res/layout/tunnel_editor_peer.xml
index 1224ddd..175c174 100644
--- a/app/src/main/res/layout/tunnel_editor_peer.xml
+++ b/app/src/main/res/layout/tunnel_editor_peer.xml
@@ -10,14 +10,14 @@
<variable
name="collection"
- type="android.databinding.ObservableList&lt;com.wireguard.android.viewmodel.PeerProxy&gt;" />
+ type="androidx.databinding.ObservableList&lt;com.wireguard.android.viewmodel.PeerProxy&gt;" />
<variable
name="item"
type="com.wireguard.android.viewmodel.PeerProxy" />
</data>
- <android.support.v7.widget.CardView
+ <androidx.cardview.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
@@ -157,5 +157,5 @@
android:text="@={item.persistentKeepalive}"
android:textAlignment="center" />
</RelativeLayout>
- </android.support.v7.widget.CardView>
+ </androidx.cardview.widget.CardView>
</layout>
diff --git a/app/src/main/res/layout/tunnel_list_fragment.xml b/app/src/main/res/layout/tunnel_list_fragment.xml
index 38d0dcb..3a7c1c7 100644
--- a/app/src/main/res/layout/tunnel_list_fragment.xml
+++ b/app/src/main/res/layout/tunnel_list_fragment.xml
@@ -19,14 +19,14 @@
type="com.wireguard.android.util.ObservableKeyedList&lt;String, Tunnel&gt;" />
</data>
- <android.support.design.widget.CoordinatorLayout
+ <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/main_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/colorBackground"
android:clipChildren="false">
- <android.support.v7.widget.RecyclerView
+ <androidx.recyclerview.widget.RecyclerView
android:id="@+id/tunnel_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -45,7 +45,7 @@
android:orientation="vertical"
android:visibility="@{tunnels.size() == 0 ? android.view.View.VISIBLE : android.view.View.GONE}">
- <android.support.v7.widget.AppCompatImageView
+ <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/logo_placeholder"
android:layout_width="140dp"
android:layout_height="140dp"
@@ -101,5 +101,5 @@
app:fab_title="@string/create_empty"
app:srcCompat="@drawable/ic_action_edit_white" />
</com.wireguard.android.widget.fab.FloatingActionsMenu>
- </android.support.design.widget.CoordinatorLayout>
+ </androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 0f2685d..2605691 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -5,10 +5,6 @@
<item name="colorAccent">@color/accent</item>
</style>
- <style name="SettingsTheme" parent="AppTheme">
- <item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
- </style>
-
<style name="fab_label" parent="TextAppearance.AppCompat.Inverse">
<item name="android:background">@drawable/fab_label_background</item>
<item name="android:textColor">@color/fab_label_text_color</item>
diff --git a/gradle.properties b/gradle.properties
index aac7c9b..9e6fce1 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -9,6 +9,8 @@
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
+android.enableJetifier=true
+android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.