Migrate to AndroidX

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2018-12-18 16:15:37 +05:30 committed by Jason A. Donenfeld
parent ee26198e2c
commit 6fdf0266cf
66 changed files with 165 additions and 164 deletions

View File

@ -65,21 +65,25 @@ android {
} }
ext { ext {
annotationsVersion = '1.0.1'
appcompatVersion = '1.0.2'
cardviewVersion = '1.0.0'
databindingVersion = '3.1.3' databindingVersion = '3.1.3'
materialComponentsVersion = '1.0.0'
jsr305Version = '3.0.2' jsr305Version = '3.0.2'
preferenceVersion = '1.0.0'
streamsupportVersion = '1.6.0' streamsupportVersion = '1.6.0'
supportLibsVersion = '27.1.1'
threetenabpVersion = '1.1.1' threetenabpVersion = '1.1.1'
zxingEmbeddedVersion = '3.6.0' zxingEmbeddedVersion = '3.6.0'
} }
dependencies { dependencies {
implementation "com.android.databinding:library:$databindingVersion" implementation "androidx.annotation:annotation:$annotationsVersion"
implementation "com.android.support:appcompat-v7:$supportLibsVersion" implementation "androidx.appcompat:appcompat:$appcompatVersion"
implementation "com.android.support:cardview-v7:$supportLibsVersion" implementation "androidx.cardview:cardview:$cardviewVersion"
implementation "com.android.support:design:$supportLibsVersion" implementation "androidx.databinding:databinding-runtime:$databindingVersion"
implementation "com.android.support:preference-v14:$supportLibsVersion" implementation "androidx.preference:preference:$preferenceVersion"
implementation "com.android.support:support-annotations:$supportLibsVersion" implementation "com.google.android.material:material:$materialComponentsVersion"
implementation "com.google.code.findbugs:jsr305:$jsr305Version" implementation "com.google.code.findbugs:jsr305:$jsr305Version"
implementation "com.jakewharton.threetenabp:threetenabp:$threetenabpVersion" implementation "com.jakewharton.threetenabp:threetenabp:$threetenabpVersion"
implementation "com.journeyapps:zxing-android-embedded:$zxingEmbeddedVersion" implementation "com.journeyapps:zxing-android-embedded:$zxingEmbeddedVersion"

View File

@ -43,8 +43,7 @@
<activity <activity
android:name=".activity.SettingsActivity" android:name=".activity.SettingsActivity"
android:label="@string/settings" android:label="@string/settings"
android:parentActivityName=".activity.MainActivity" android:parentActivityName=".activity.MainActivity" />
android:theme="@style/SettingsTheme" />
<activity <activity
android:name=".activity.TunnelCreatorActivity" android:name=".activity.TunnelCreatorActivity"

View File

@ -13,8 +13,8 @@ import android.os.Build;
import android.os.Handler; import android.os.Handler;
import android.os.Looper; import android.os.Looper;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.v7.app.AppCompatDelegate; import androidx.appcompat.app.AppCompatDelegate;
import com.wireguard.android.backend.Backend; import com.wireguard.android.backend.Backend;
import com.wireguard.android.backend.GoBackend; import com.wireguard.android.backend.GoBackend;

View File

@ -7,8 +7,8 @@ package com.wireguard.android;
import android.annotation.TargetApi; import android.annotation.TargetApi;
import android.content.Intent; import android.content.Intent;
import android.databinding.Observable; import androidx.databinding.Observable;
import android.databinding.Observable.OnPropertyChangedCallback; import androidx.databinding.Observable.OnPropertyChangedCallback;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.Canvas; import android.graphics.Canvas;
import android.graphics.drawable.Icon; import android.graphics.drawable.Icon;
@ -16,7 +16,7 @@ import android.os.Build;
import android.os.IBinder; import android.os.IBinder;
import android.service.quicksettings.Tile; import android.service.quicksettings.Tile;
import android.service.quicksettings.TileService; import android.service.quicksettings.TileService;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.util.Log; import android.util.Log;
import android.widget.Toast; import android.widget.Toast;

View File

@ -5,10 +5,10 @@
package com.wireguard.android.activity; package com.wireguard.android.activity;
import android.databinding.CallbackRegistry; import androidx.databinding.CallbackRegistry;
import android.databinding.CallbackRegistry.NotifierCallback; import androidx.databinding.CallbackRegistry.NotifierCallback;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import com.wireguard.android.Application; import com.wireguard.android.Application;
import com.wireguard.android.model.Tunnel; import com.wireguard.android.model.Tunnel;

View File

@ -8,10 +8,10 @@ package com.wireguard.android.activity;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.v4.app.FragmentManager; import androidx.fragment.app.FragmentManager;
import android.support.v4.app.FragmentTransaction; import androidx.fragment.app.FragmentTransaction;
import android.support.v7.app.ActionBar; import androidx.appcompat.app.ActionBar;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;

View File

@ -7,12 +7,12 @@ package com.wireguard.android.activity;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.v4.app.ActivityCompat; import androidx.core.app.ActivityCompat;
import android.support.v4.content.ContextCompat; import androidx.core.content.ContextCompat;
import android.support.v7.preference.Preference; import androidx.preference.Preference;
import android.support.v7.preference.PreferenceFragmentCompat; import androidx.preference.PreferenceFragmentCompat;
import android.support.v7.preference.PreferenceScreen; import androidx.preference.PreferenceScreen;
import android.util.SparseArray; import android.util.SparseArray;
import android.view.MenuItem; import android.view.MenuItem;

View File

@ -8,9 +8,9 @@ package com.wireguard.android.activity;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.res.Resources; import android.content.res.Resources;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.v7.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import android.support.v7.app.AppCompatDelegate; import androidx.appcompat.app.AppCompatDelegate;
import android.util.Log; import android.util.Log;
import com.wireguard.android.Application; import com.wireguard.android.Application;

View File

@ -6,7 +6,7 @@
package com.wireguard.android.activity; package com.wireguard.android.activity;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import com.wireguard.android.fragment.TunnelEditorFragment; import com.wireguard.android.fragment.TunnelEditorFragment;
import com.wireguard.android.model.Tunnel; import com.wireguard.android.model.Tunnel;

View File

@ -9,8 +9,8 @@ import android.app.PendingIntent;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.ParcelFileDescriptor; import android.os.ParcelFileDescriptor;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.v4.util.ArraySet; import androidx.collection.ArraySet;
import android.util.Log; import android.util.Log;
import com.wireguard.android.Application; import com.wireguard.android.Application;

View File

@ -6,7 +6,7 @@
package com.wireguard.android.backend; package com.wireguard.android.backend;
import android.content.Context; import android.content.Context;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.util.Log; import android.util.Log;
import com.wireguard.android.Application; import com.wireguard.android.Application;

View File

@ -5,14 +5,14 @@
package com.wireguard.android.databinding; package com.wireguard.android.databinding;
import android.databinding.BindingAdapter; import androidx.databinding.BindingAdapter;
import android.databinding.DataBindingUtil; import androidx.databinding.DataBindingUtil;
import android.databinding.ObservableList; import androidx.databinding.ObservableList;
import android.databinding.ViewDataBinding; import androidx.databinding.ViewDataBinding;
import android.databinding.adapters.ListenerUtil; import androidx.databinding.adapters.ListenerUtil;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import android.text.InputFilter; import android.text.InputFilter;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.widget.LinearLayout; import android.widget.LinearLayout;

View File

@ -5,10 +5,10 @@
package com.wireguard.android.databinding; package com.wireguard.android.databinding;
import android.databinding.DataBindingUtil; import androidx.databinding.DataBindingUtil;
import android.databinding.ObservableList; import androidx.databinding.ObservableList;
import android.databinding.ViewDataBinding; import androidx.databinding.ViewDataBinding;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;

View File

@ -6,12 +6,12 @@
package com.wireguard.android.databinding; package com.wireguard.android.databinding;
import android.content.Context; import android.content.Context;
import android.databinding.DataBindingUtil; import androidx.databinding.DataBindingUtil;
import android.databinding.ObservableList; import androidx.databinding.ObservableList;
import android.databinding.ViewDataBinding; import androidx.databinding.ViewDataBinding;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.v7.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import android.support.v7.widget.RecyclerView.Adapter; import androidx.recyclerview.widget.RecyclerView.Adapter;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.ViewGroup; import android.view.ViewGroup;

View File

@ -12,10 +12,10 @@ import android.content.Intent;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo; import android.content.pm.ResolveInfo;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.v4.app.DialogFragment; import androidx.fragment.app.DialogFragment;
import android.support.v4.app.Fragment; import androidx.fragment.app.Fragment;
import android.support.v7.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import android.widget.Toast; import android.widget.Toast;
import com.wireguard.android.Application; import com.wireguard.android.Application;

View File

@ -7,11 +7,11 @@ package com.wireguard.android.fragment;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.databinding.DataBindingUtil; import androidx.databinding.DataBindingUtil;
import android.databinding.ViewDataBinding; import androidx.databinding.ViewDataBinding;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.design.widget.Snackbar; import com.google.android.material.snackbar.Snackbar;
import android.support.v4.app.Fragment; import androidx.fragment.app.Fragment;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.Toast; import android.widget.Toast;

View File

@ -10,9 +10,9 @@ import android.app.Dialog;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.v4.app.DialogFragment; import androidx.fragment.app.DialogFragment;
import android.support.v7.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import com.wireguard.android.Application; import com.wireguard.android.Application;

View File

@ -6,7 +6,7 @@
package com.wireguard.android.fragment; package com.wireguard.android.fragment;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
import android.view.MenuInflater; import android.view.MenuInflater;

View File

@ -7,11 +7,11 @@ package com.wireguard.android.fragment;
import android.app.Activity; import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.databinding.ObservableList; import androidx.databinding.ObservableList;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.design.widget.Snackbar; import com.google.android.material.snackbar.Snackbar;
import android.support.v4.app.FragmentManager; import androidx.fragment.app.FragmentManager;
import android.util.Log; import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;

View File

@ -14,13 +14,13 @@ import android.database.Cursor;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
import android.provider.OpenableColumns; import android.provider.OpenableColumns;
import android.support.annotation.NonNull; import androidx.annotation.NonNull;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.design.widget.Snackbar; import com.google.android.material.snackbar.Snackbar;
import android.support.v4.app.FragmentManager; import androidx.fragment.app.FragmentManager;
import android.support.v7.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import android.support.v7.view.ActionMode; import androidx.appcompat.view.ActionMode;
import android.support.v7.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import android.util.Log; import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;

View File

@ -5,8 +5,8 @@
package com.wireguard.android.model; package com.wireguard.android.model;
import android.databinding.BaseObservable; import androidx.databinding.BaseObservable;
import android.databinding.Bindable; import androidx.databinding.Bindable;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import com.wireguard.android.BR; import com.wireguard.android.BR;

View File

@ -5,9 +5,9 @@
package com.wireguard.android.model; package com.wireguard.android.model;
import android.databinding.BaseObservable; import androidx.databinding.BaseObservable;
import android.databinding.Bindable; import androidx.databinding.Bindable;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import com.wireguard.android.BR; import com.wireguard.android.BR;
import com.wireguard.android.util.ExceptionLoggers; import com.wireguard.android.util.ExceptionLoggers;

View File

@ -8,9 +8,9 @@ package com.wireguard.android.model;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.databinding.BaseObservable; import androidx.databinding.BaseObservable;
import android.databinding.Bindable; import androidx.databinding.Bindable;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import com.wireguard.android.Application; import com.wireguard.android.Application;
import com.wireguard.android.BR; import com.wireguard.android.BR;

View File

@ -9,9 +9,9 @@ import android.Manifest;
import android.content.Context; import android.content.Context;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.os.Environment; import android.os.Environment;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.design.widget.Snackbar; import com.google.android.material.snackbar.Snackbar;
import android.support.v7.preference.Preference; import androidx.preference.Preference;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.util.Log; import android.util.Log;

View File

@ -6,8 +6,8 @@
package com.wireguard.android.preference; package com.wireguard.android.preference;
import android.content.Context; import android.content.Context;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.v7.preference.Preference; import androidx.preference.Preference;
import android.util.AttributeSet; import android.util.AttributeSet;
import com.wireguard.android.Application; import com.wireguard.android.Application;

View File

@ -9,8 +9,8 @@ import android.content.ActivityNotFoundException;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.v7.preference.Preference; import androidx.preference.Preference;
import android.util.AttributeSet; import android.util.AttributeSet;
import com.wireguard.android.Application; import com.wireguard.android.Application;

View File

@ -9,9 +9,9 @@ import android.Manifest;
import android.content.Context; import android.content.Context;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.os.Environment; import android.os.Environment;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.design.widget.Snackbar; import com.google.android.material.snackbar.Snackbar;
import android.support.v7.preference.Preference; import androidx.preference.Preference;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.util.Log; import android.util.Log;

View File

@ -8,7 +8,7 @@ package com.wireguard.android.util;
import android.content.ClipData; import android.content.ClipData;
import android.content.ClipboardManager; import android.content.ClipboardManager;
import android.content.Context; import android.content.Context;
import android.support.design.widget.Snackbar; import com.google.android.material.snackbar.Snackbar;
import android.view.View; import android.view.View;
import android.widget.TextView; import android.widget.TextView;

View File

@ -6,7 +6,7 @@
package com.wireguard.android.util; package com.wireguard.android.util;
import android.content.res.Resources; import android.content.res.Resources;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import com.wireguard.android.Application; import com.wireguard.android.Application;
import com.wireguard.android.R; import com.wireguard.android.R;

View File

@ -5,7 +5,7 @@
package com.wireguard.android.util; package com.wireguard.android.util;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.util.Log; import android.util.Log;
import java9.util.function.BiConsumer; import java9.util.function.BiConsumer;

View File

@ -5,7 +5,7 @@
package com.wireguard.android.util; package com.wireguard.android.util;
import android.content.Context; import android.content.Context;
import android.support.v7.preference.Preference; import androidx.preference.Preference;
import android.view.ContextThemeWrapper; import android.view.ContextThemeWrapper;
import com.wireguard.android.activity.SettingsActivity; import com.wireguard.android.activity.SettingsActivity;

View File

@ -5,8 +5,8 @@
package com.wireguard.android.util; package com.wireguard.android.util;
import android.databinding.ObservableArrayList; import androidx.databinding.ObservableArrayList;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import com.wireguard.util.Keyed; import com.wireguard.util.Keyed;

View File

@ -5,7 +5,7 @@
package com.wireguard.android.util; package com.wireguard.android.util;
import android.databinding.ObservableList; import androidx.databinding.ObservableList;
import com.wireguard.util.Keyed; import com.wireguard.util.Keyed;
import com.wireguard.util.KeyedList; import com.wireguard.util.KeyedList;

View File

@ -5,7 +5,7 @@
package com.wireguard.android.util; package com.wireguard.android.util;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import com.wireguard.util.Keyed; import com.wireguard.util.Keyed;
import com.wireguard.util.SortedKeyedList; import com.wireguard.util.SortedKeyedList;

View File

@ -6,7 +6,7 @@
package com.wireguard.android.util; package com.wireguard.android.util;
import android.content.Context; import android.content.Context;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.util.Log; import android.util.Log;
import com.wireguard.android.BuildConfig; import com.wireguard.android.BuildConfig;

View File

@ -6,7 +6,7 @@
package com.wireguard.android.util; package com.wireguard.android.util;
import android.content.Context; import android.content.Context;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.system.OsConstants; import android.system.OsConstants;
import android.util.Log; import android.util.Log;

View File

@ -5,8 +5,8 @@
package com.wireguard.android.viewmodel; package com.wireguard.android.viewmodel;
import android.databinding.ObservableArrayList; import androidx.databinding.ObservableArrayList;
import android.databinding.ObservableList; import androidx.databinding.ObservableList;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;

View File

@ -5,10 +5,10 @@
package com.wireguard.android.viewmodel; package com.wireguard.android.viewmodel;
import android.databinding.BaseObservable; import androidx.databinding.BaseObservable;
import android.databinding.Bindable; import androidx.databinding.Bindable;
import android.databinding.ObservableArrayList; import androidx.databinding.ObservableArrayList;
import android.databinding.ObservableList; import androidx.databinding.ObservableList;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;

View File

@ -5,13 +5,13 @@
package com.wireguard.android.viewmodel; package com.wireguard.android.viewmodel;
import android.databinding.BaseObservable; import androidx.databinding.BaseObservable;
import android.databinding.Bindable; import androidx.databinding.Bindable;
import android.databinding.Observable; import androidx.databinding.Observable;
import android.databinding.ObservableList; import androidx.databinding.ObservableList;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import com.wireguard.android.BR; import com.wireguard.android.BR;
import com.wireguard.config.Attribute; import com.wireguard.config.Attribute;

View File

@ -5,7 +5,7 @@
package com.wireguard.android.widget; package com.wireguard.android.widget;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.text.InputFilter; import android.text.InputFilter;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
import android.text.Spanned; import android.text.Spanned;

View File

@ -5,7 +5,7 @@
package com.wireguard.android.widget; package com.wireguard.android.widget;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.text.InputFilter; import android.text.InputFilter;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
import android.text.Spanned; import android.text.Spanned;

View File

@ -23,9 +23,9 @@ import android.graphics.RectF;
import android.graphics.Region; import android.graphics.Region;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.os.Build; import android.os.Build;
import android.support.annotation.ColorInt; import androidx.annotation.ColorInt;
import android.support.annotation.IntRange; import androidx.annotation.IntRange;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.util.FloatProperty; import android.util.FloatProperty;
@TargetApi(Build.VERSION_CODES.N) @TargetApi(Build.VERSION_CODES.N)

View File

@ -8,7 +8,7 @@ package com.wireguard.android.widget;
import android.content.Context; import android.content.Context;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.widget.Switch; import android.widget.Switch;

View File

@ -10,9 +10,9 @@ import android.animation.AnimatorListenerAdapter;
import android.animation.TimeInterpolator; import android.animation.TimeInterpolator;
import android.animation.ValueAnimator; import android.animation.ValueAnimator;
import android.content.Context; import android.content.Context;
import android.support.design.widget.CoordinatorLayout; import androidx.coordinatorlayout.widget.CoordinatorLayout;
import android.support.design.widget.Snackbar; import com.google.android.material.snackbar.Snackbar;
import android.support.v4.view.animation.FastOutSlowInInterpolator; import androidx.interpolator.view.animation.FastOutSlowInInterpolator;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.View; import android.view.View;

View File

@ -20,11 +20,11 @@ import android.graphics.drawable.LayerDrawable;
import android.os.Build; import android.os.Build;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.annotation.Keep; import androidx.annotation.Keep;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.design.widget.FloatingActionButton; import com.google.android.material.floatingactionbutton.FloatingActionButton;
import android.support.v4.content.res.ResourcesCompat; import androidx.core.content.res.ResourcesCompat;
import android.support.v7.widget.AppCompatTextView; import androidx.appcompat.widget.AppCompatTextView;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.view.ContextThemeWrapper; import android.view.ContextThemeWrapper;
import android.view.TouchDelegate; import android.view.TouchDelegate;

View File

@ -5,7 +5,7 @@
package com.wireguard.android.widget.fab; package com.wireguard.android.widget.fab;
import android.support.v7.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
public class FloatingActionsMenuRecyclerViewScrollListener extends RecyclerView.OnScrollListener { public class FloatingActionsMenuRecyclerViewScrollListener extends RecyclerView.OnScrollListener {
private static final float SCALE_FACTOR = 1.5f; private static final float SCALE_FACTOR = 1.5f;

View File

@ -8,8 +8,8 @@ package com.wireguard.android.widget.fab;
import android.content.Context; import android.content.Context;
import android.content.res.TypedArray; import android.content.res.TypedArray;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.support.design.widget.FloatingActionButton; import com.google.android.material.floatingactionbutton.FloatingActionButton;
import android.util.AttributeSet; import android.util.AttributeSet;
import android.widget.TextView; import android.widget.TextView;

View File

@ -7,7 +7,7 @@
package com.wireguard.android.widget.fab; package com.wireguard.android.widget.fab;
import android.graphics.Rect; import android.graphics.Rect;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import android.view.MotionEvent; import android.view.MotionEvent;
import android.view.TouchDelegate; import android.view.TouchDelegate;
import android.view.View; import android.view.View;

View File

@ -5,7 +5,7 @@
package com.wireguard.config; package com.wireguard.config;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import com.wireguard.crypto.KeyFormatException; import com.wireguard.crypto.KeyFormatException;

View File

@ -5,7 +5,7 @@
package com.wireguard.config; package com.wireguard.config;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import com.wireguard.config.BadConfigException.Location; import com.wireguard.config.BadConfigException.Location;
import com.wireguard.config.BadConfigException.Reason; import com.wireguard.config.BadConfigException.Reason;

View File

@ -5,7 +5,7 @@
package com.wireguard.config; package com.wireguard.config;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import org.threeten.bp.Duration; import org.threeten.bp.Duration;
import org.threeten.bp.Instant; import org.threeten.bp.Instant;

View File

@ -5,7 +5,7 @@
package com.wireguard.config; package com.wireguard.config;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import com.wireguard.config.BadConfigException.Location; import com.wireguard.config.BadConfigException.Location;
import com.wireguard.config.BadConfigException.Reason; import com.wireguard.config.BadConfigException.Reason;

View File

@ -5,7 +5,7 @@
package com.wireguard.config; package com.wireguard.config;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
/** /**
*/ */

View File

@ -5,7 +5,7 @@
package com.wireguard.config; package com.wireguard.config;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import com.wireguard.config.BadConfigException.Location; import com.wireguard.config.BadConfigException.Location;
import com.wireguard.config.BadConfigException.Reason; import com.wireguard.config.BadConfigException.Reason;

View File

@ -6,7 +6,7 @@
package com.wireguard.crypto; package com.wireguard.crypto;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import java.util.Arrays; import java.util.Arrays;

View File

@ -5,7 +5,7 @@
package com.wireguard.util; package com.wireguard.util;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;

View File

@ -5,7 +5,7 @@
package com.wireguard.util; package com.wireguard.util;
import android.support.annotation.Nullable; import androidx.annotation.Nullable;
import java.util.Collection; import java.util.Collection;
import java.util.Comparator; import java.util.Comparator;

View File

@ -30,7 +30,7 @@
android:indeterminate="true" android:indeterminate="true"
android:visibility="@{appData.isEmpty() ? View.VISIBLE : View.GONE}" /> android:visibility="@{appData.isEmpty() ? View.VISIBLE : View.GONE}" />
<android.support.v7.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/app_list" android:id="@+id/app_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"

View File

@ -12,7 +12,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:padding="16dp"> android:padding="16dp">
<android.support.design.widget.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/tunnel_name_text_layout" android:id="@+id/tunnel_name_text_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
@ -25,7 +25,7 @@
android:inputType="textNoSuggestions|textVisiblePassword" android:inputType="textNoSuggestions|textVisiblePassword"
app:filter="@{NameInputFilter.newInstance()}" /> app:filter="@{NameInputFilter.newInstance()}" />
</android.support.design.widget.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
</FrameLayout> </FrameLayout>

View File

@ -32,7 +32,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<android.support.v7.widget.CardView <androidx.cardview.widget.CardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
@ -122,7 +122,7 @@
android:contentDescription="@string/addresses" android:contentDescription="@string/addresses"
android:text="@{config.interface.addresses}" /> android:text="@{config.interface.addresses}" />
</RelativeLayout> </RelativeLayout>
</android.support.v7.widget.CardView> </androidx.cardview.widget.CardView>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -11,7 +11,7 @@
type="com.wireguard.config.Peer" /> type="com.wireguard.config.Peer" />
</data> </data>
<android.support.v7.widget.CardView <androidx.cardview.widget.CardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
@ -90,5 +90,5 @@
android:layout_below="@+id/endpoint_label" android:layout_below="@+id/endpoint_label"
android:text="@{item.endpoint}" /> android:text="@{item.endpoint}" />
</RelativeLayout> </RelativeLayout>
</android.support.v7.widget.CardView> </androidx.cardview.widget.CardView>
</layout> </layout>

View File

@ -24,7 +24,7 @@
type="String" /> type="String" />
</data> </data>
<android.support.design.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/main_container" android:id="@+id/main_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -39,7 +39,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<android.support.v7.widget.CardView <androidx.cardview.widget.CardView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
@ -228,7 +228,7 @@
android:onClick="@{fragment::onRequestSetExcludedApplications}" android:onClick="@{fragment::onRequestSetExcludedApplications}"
android:text="@{@plurals/set_excluded_applications(config.interface.excludedApplications.size, config.interface.excludedApplications.size)}" /> android:text="@{@plurals/set_excluded_applications(config.interface.excludedApplications.size, config.interface.excludedApplications.size)}" />
</RelativeLayout> </RelativeLayout>
</android.support.v7.widget.CardView> </androidx.cardview.widget.CardView>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -250,5 +250,5 @@
android:text="@string/add_peer" /> android:text="@string/add_peer" />
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout> </layout>

View File

@ -10,14 +10,14 @@
<variable <variable
name="collection" 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 <variable
name="item" name="item"
type="com.wireguard.android.viewmodel.PeerProxy" /> type="com.wireguard.android.viewmodel.PeerProxy" />
</data> </data>
<android.support.v7.widget.CardView <androidx.cardview.widget.CardView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
@ -157,5 +157,5 @@
android:text="@={item.persistentKeepalive}" android:text="@={item.persistentKeepalive}"
android:textAlignment="center" /> android:textAlignment="center" />
</RelativeLayout> </RelativeLayout>
</android.support.v7.widget.CardView> </androidx.cardview.widget.CardView>
</layout> </layout>

View File

@ -19,14 +19,14 @@
type="com.wireguard.android.util.ObservableKeyedList&lt;String, Tunnel&gt;" /> type="com.wireguard.android.util.ObservableKeyedList&lt;String, Tunnel&gt;" />
</data> </data>
<android.support.design.widget.CoordinatorLayout <androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/main_container" android:id="@+id/main_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?android:attr/colorBackground" android:background="?android:attr/colorBackground"
android:clipChildren="false"> android:clipChildren="false">
<android.support.v7.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/tunnel_list" android:id="@+id/tunnel_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
@ -45,7 +45,7 @@
android:orientation="vertical" android:orientation="vertical"
android:visibility="@{tunnels.size() == 0 ? android.view.View.VISIBLE : android.view.View.GONE}"> 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:id="@+id/logo_placeholder"
android:layout_width="140dp" android:layout_width="140dp"
android:layout_height="140dp" android:layout_height="140dp"
@ -101,5 +101,5 @@
app:fab_title="@string/create_empty" app:fab_title="@string/create_empty"
app:srcCompat="@drawable/ic_action_edit_white" /> app:srcCompat="@drawable/ic_action_edit_white" />
</com.wireguard.android.widget.fab.FloatingActionsMenu> </com.wireguard.android.widget.fab.FloatingActionsMenu>
</android.support.design.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout> </layout>

View File

@ -5,10 +5,6 @@
<item name="colorAccent">@color/accent</item> <item name="colorAccent">@color/accent</item>
</style> </style>
<style name="SettingsTheme" parent="AppTheme">
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
</style>
<style name="fab_label" parent="TextAppearance.AppCompat.Inverse"> <style name="fab_label" parent="TextAppearance.AppCompat.Inverse">
<item name="android:background">@drawable/fab_label_background</item> <item name="android:background">@drawable/fab_label_background</item>
<item name="android:textColor">@color/fab_label_text_color</item> <item name="android:textColor">@color/fab_label_text_color</item>

View File

@ -9,6 +9,8 @@
# Specifies the JVM arguments used for the daemon process. # Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings. # The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode. # When configured, Gradle will run in incubating parallel mode.