diff --git a/app/build.gradle b/app/build.gradle index 1a747b4fb..98e16f5a0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -68,17 +68,21 @@ android { } } +repositories { + maven { url "https://oss.sonatype.org/content/repositories/snapshots" } +} + dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') fullImplementation project(':utils') - implementation "com.android.support:support-core-utils:${rootProject.ext.supportLibVersion}" - fullImplementation "com.android.support:preference-v7:${rootProject.ext.supportLibVersion}" - fullImplementation "com.android.support:recyclerview-v7:${rootProject.ext.supportLibVersion}" - fullImplementation "com.android.support:cardview-v7:${rootProject.ext.supportLibVersion}" - fullImplementation "com.android.support:design:${rootProject.ext.supportLibVersion}" - fullImplementation 'com.github.topjohnwu:libsu:2.0.1' + implementation "androidx.core:core:${rootProject.ext.androidXVersion}" + fullImplementation "androidx.preference:preference:${rootProject.ext.androidXVersion}" + fullImplementation "androidx.recyclerview:recyclerview:${rootProject.ext.androidXVersion}" + fullImplementation "androidx.cardview:cardview:${rootProject.ext.androidXVersion}" + fullImplementation "com.google.android.material:material:${rootProject.ext.androidXVersion}" + fullImplementation 'com.github.topjohnwu:libsu:2.0.2' fullImplementation 'com.atlassian.commonmark:commonmark:0.11.0' fullImplementation 'org.kamranzafar:jtar:2.3' - fullImplementation 'com.jakewharton:butterknife:8.8.1' - fullAnnotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' + fullImplementation 'com.jakewharton:butterknife:9.0.0-SNAPSHOT' + fullAnnotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-SNAPSHOT' } diff --git a/app/src/full/java/com/topjohnwu/magisk/AboutActivity.java b/app/src/full/java/com/topjohnwu/magisk/AboutActivity.java index 944e387b9..9ea365a49 100644 --- a/app/src/full/java/com/topjohnwu/magisk/AboutActivity.java +++ b/app/src/full/java/com/topjohnwu/magisk/AboutActivity.java @@ -2,9 +2,6 @@ package com.topjohnwu.magisk; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.Toolbar; import android.text.TextUtils; import android.view.View; @@ -15,6 +12,9 @@ import com.topjohnwu.magisk.utils.Utils; import java.util.Locale; +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.widget.Toolbar; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/full/java/com/topjohnwu/magisk/DonationActivity.java b/app/src/full/java/com/topjohnwu/magisk/DonationActivity.java index 16d7dafe0..01b6d2c20 100644 --- a/app/src/full/java/com/topjohnwu/magisk/DonationActivity.java +++ b/app/src/full/java/com/topjohnwu/magisk/DonationActivity.java @@ -2,14 +2,14 @@ package com.topjohnwu.magisk; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.Toolbar; import com.topjohnwu.magisk.components.AboutCardRow; import com.topjohnwu.magisk.components.BaseActivity; import com.topjohnwu.magisk.utils.Utils; +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.widget.Toolbar; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/full/java/com/topjohnwu/magisk/FlashActivity.java b/app/src/full/java/com/topjohnwu/magisk/FlashActivity.java index b95090fb3..48217084d 100644 --- a/app/src/full/java/com/topjohnwu/magisk/FlashActivity.java +++ b/app/src/full/java/com/topjohnwu/magisk/FlashActivity.java @@ -4,8 +4,6 @@ import android.Manifest; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.Toolbar; import android.text.TextUtils; import android.view.View; import android.widget.Button; @@ -31,6 +29,8 @@ import java.util.Calendar; import java.util.List; import java.util.Locale; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.widget.Toolbar; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; diff --git a/app/src/full/java/com/topjohnwu/magisk/MainActivity.java b/app/src/full/java/com/topjohnwu/magisk/MainActivity.java index 406a1c7dc..dcbd12dfc 100644 --- a/app/src/full/java/com/topjohnwu/magisk/MainActivity.java +++ b/app/src/full/java/com/topjohnwu/magisk/MainActivity.java @@ -3,17 +3,11 @@ package com.topjohnwu.magisk; import android.content.Intent; import android.os.Bundle; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.design.widget.NavigationView; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentTransaction; -import android.support.v4.widget.DrawerLayout; -import android.support.v7.app.ActionBarDrawerToggle; -import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import android.view.View; +import com.google.android.material.navigation.NavigationView; import com.topjohnwu.magisk.components.BaseActivity; import com.topjohnwu.magisk.fragments.LogFragment; import com.topjohnwu.magisk.fragments.MagiskFragment; @@ -26,6 +20,12 @@ import com.topjohnwu.magisk.utils.Download; import com.topjohnwu.magisk.utils.Topic; import com.topjohnwu.superuser.Shell; +import androidx.annotation.NonNull; +import androidx.appcompat.app.ActionBarDrawerToggle; +import androidx.appcompat.widget.Toolbar; +import androidx.drawerlayout.widget.DrawerLayout; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentTransaction; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/full/java/com/topjohnwu/magisk/NoUIActivity.java b/app/src/full/java/com/topjohnwu/magisk/NoUIActivity.java index c2527b002..a79c15d9f 100644 --- a/app/src/full/java/com/topjohnwu/magisk/NoUIActivity.java +++ b/app/src/full/java/com/topjohnwu/magisk/NoUIActivity.java @@ -1,9 +1,9 @@ package com.topjohnwu.magisk; -import android.support.annotation.NonNull; - import com.topjohnwu.magisk.components.BaseActivity; +import androidx.annotation.NonNull; + public class NoUIActivity extends BaseActivity { @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { diff --git a/app/src/full/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java b/app/src/full/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java index 56bfb947b..11f432758 100644 --- a/app/src/full/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java +++ b/app/src/full/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java @@ -6,8 +6,6 @@ import android.content.pm.PackageManager; import android.content.res.Configuration; import android.content.res.Resources; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; @@ -28,6 +26,8 @@ import java.util.Collections; import java.util.Iterator; import java.util.List; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/full/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java b/app/src/full/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java index 9ce3614f6..a8c222596 100644 --- a/app/src/full/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java +++ b/app/src/full/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java @@ -1,8 +1,6 @@ package com.topjohnwu.magisk.adapters; import android.content.Context; -import android.support.design.widget.Snackbar; -import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; @@ -11,6 +9,7 @@ import android.widget.CheckBox; import android.widget.ImageView; import android.widget.TextView; +import com.google.android.material.snackbar.Snackbar; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.components.SnackbarMaker; import com.topjohnwu.magisk.container.Module; @@ -18,6 +17,7 @@ import com.topjohnwu.superuser.Shell; import java.util.List; +import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/full/java/com/topjohnwu/magisk/adapters/PolicyAdapter.java b/app/src/full/java/com/topjohnwu/magisk/adapters/PolicyAdapter.java index 78383bd97..59d3013b8 100644 --- a/app/src/full/java/com/topjohnwu/magisk/adapters/PolicyAdapter.java +++ b/app/src/full/java/com/topjohnwu/magisk/adapters/PolicyAdapter.java @@ -2,8 +2,6 @@ package com.topjohnwu.magisk.adapters; import android.app.Activity; import android.content.pm.PackageManager; -import android.support.design.widget.Snackbar; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -11,6 +9,7 @@ import android.widget.ImageView; import android.widget.Switch; import android.widget.TextView; +import com.google.android.material.snackbar.Snackbar; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.components.CustomAlertDialog; import com.topjohnwu.magisk.components.ExpandableView; @@ -22,6 +21,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; +import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/full/java/com/topjohnwu/magisk/adapters/ReposAdapter.java b/app/src/full/java/com/topjohnwu/magisk/adapters/ReposAdapter.java index 7eb283946..f62e57d54 100644 --- a/app/src/full/java/com/topjohnwu/magisk/adapters/ReposAdapter.java +++ b/app/src/full/java/com/topjohnwu/magisk/adapters/ReposAdapter.java @@ -2,7 +2,6 @@ package com.topjohnwu.magisk.adapters; import android.content.Context; import android.database.Cursor; -import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.util.Pair; import android.view.LayoutInflater; @@ -25,6 +24,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/full/java/com/topjohnwu/magisk/adapters/SectionedAdapter.java b/app/src/full/java/com/topjohnwu/magisk/adapters/SectionedAdapter.java index cbfab0698..39fd040b1 100644 --- a/app/src/full/java/com/topjohnwu/magisk/adapters/SectionedAdapter.java +++ b/app/src/full/java/com/topjohnwu/magisk/adapters/SectionedAdapter.java @@ -1,8 +1,9 @@ package com.topjohnwu.magisk.adapters; -import android.support.v7.widget.RecyclerView; import android.view.ViewGroup; +import androidx.recyclerview.widget.RecyclerView; + public abstract class SectionedAdapter extends RecyclerView.Adapter { diff --git a/app/src/full/java/com/topjohnwu/magisk/adapters/SuLogAdapter.java b/app/src/full/java/com/topjohnwu/magisk/adapters/SuLogAdapter.java index 0d9138d9b..28555e6bd 100644 --- a/app/src/full/java/com/topjohnwu/magisk/adapters/SuLogAdapter.java +++ b/app/src/full/java/com/topjohnwu/magisk/adapters/SuLogAdapter.java @@ -1,7 +1,6 @@ package com.topjohnwu.magisk.adapters; import android.database.Cursor; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -20,6 +19,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; +import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/full/java/com/topjohnwu/magisk/adapters/TabFragmentAdapter.java b/app/src/full/java/com/topjohnwu/magisk/adapters/TabFragmentAdapter.java index c7daba71f..da75cf222 100644 --- a/app/src/full/java/com/topjohnwu/magisk/adapters/TabFragmentAdapter.java +++ b/app/src/full/java/com/topjohnwu/magisk/adapters/TabFragmentAdapter.java @@ -1,13 +1,13 @@ package com.topjohnwu.magisk.adapters; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; - import java.util.ArrayList; import java.util.List; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; + public class TabFragmentAdapter extends FragmentPagerAdapter { private List fragmentList; diff --git a/app/src/full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java b/app/src/full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java index daccc3bf8..f38ce4f09 100644 --- a/app/src/full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java +++ b/app/src/full/java/com/topjohnwu/magisk/asyncs/InstallMagisk.java @@ -4,7 +4,6 @@ import android.app.Activity; import android.app.ProgressDialog; import android.net.Uri; import android.os.Build; -import android.support.annotation.NonNull; import android.text.TextUtils; import android.view.View; import android.widget.Toast; @@ -44,6 +43,8 @@ import java.net.HttpURLConnection; import java.util.Arrays; import java.util.List; +import androidx.annotation.NonNull; + public class InstallMagisk extends ParallelTask { private static final int PATCH_MODE = 0; diff --git a/app/src/full/java/com/topjohnwu/magisk/asyncs/MarkDownWindow.java b/app/src/full/java/com/topjohnwu/magisk/asyncs/MarkDownWindow.java index 9ca059432..65a8d5e82 100644 --- a/app/src/full/java/com/topjohnwu/magisk/asyncs/MarkDownWindow.java +++ b/app/src/full/java/com/topjohnwu/magisk/asyncs/MarkDownWindow.java @@ -1,7 +1,6 @@ package com.topjohnwu.magisk.asyncs; import android.app.Activity; -import android.support.v7.app.AlertDialog; import android.webkit.WebView; import com.topjohnwu.magisk.Data; @@ -18,6 +17,8 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; +import androidx.appcompat.app.AlertDialog; + public class MarkDownWindow extends ParallelTask { private String mTitle; diff --git a/app/src/full/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java b/app/src/full/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java index b7e94c27b..276f70bde 100644 --- a/app/src/full/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java +++ b/app/src/full/java/com/topjohnwu/magisk/asyncs/ProcessRepoZip.java @@ -4,7 +4,6 @@ import android.Manifest; import android.app.ProgressDialog; import android.content.Intent; import android.net.Uri; -import android.support.annotation.NonNull; import android.widget.Toast; import com.topjohnwu.magisk.Const; @@ -35,6 +34,8 @@ import java.util.jar.JarEntry; import java.util.jar.JarInputStream; import java.util.jar.JarOutputStream; +import androidx.annotation.NonNull; + public class ProcessRepoZip extends ParallelTask { private ProgressDialog progressDialog; diff --git a/app/src/full/java/com/topjohnwu/magisk/components/BaseFragment.java b/app/src/full/java/com/topjohnwu/magisk/components/BaseFragment.java index c5582ad45..b156af9c6 100644 --- a/app/src/full/java/com/topjohnwu/magisk/components/BaseFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/components/BaseFragment.java @@ -1,12 +1,13 @@ package com.topjohnwu.magisk.components; import android.content.Intent; -import android.support.v4.app.Fragment; import com.topjohnwu.magisk.Data; import com.topjohnwu.magisk.MagiskManager; import com.topjohnwu.magisk.utils.Topic; +import androidx.fragment.app.Fragment; + public class BaseFragment extends Fragment implements Topic.AutoSubscriber { public MagiskManager mm; diff --git a/app/src/full/java/com/topjohnwu/magisk/components/CustomAlertDialog.java b/app/src/full/java/com/topjohnwu/magisk/components/CustomAlertDialog.java index 2c6d064aa..330544dc0 100644 --- a/app/src/full/java/com/topjohnwu/magisk/components/CustomAlertDialog.java +++ b/app/src/full/java/com/topjohnwu/magisk/components/CustomAlertDialog.java @@ -2,11 +2,6 @@ package com.topjohnwu.magisk.components; import android.app.Activity; import android.content.DialogInterface; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.annotation.StyleRes; -import android.support.v7.app.AlertDialog; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; @@ -15,6 +10,11 @@ import android.widget.TextView; import com.topjohnwu.magisk.R; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.annotation.StyleRes; +import androidx.appcompat.app.AlertDialog; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/full/java/com/topjohnwu/magisk/components/EnvFixDialog.java b/app/src/full/java/com/topjohnwu/magisk/components/EnvFixDialog.java index eff0d16de..bb2226583 100644 --- a/app/src/full/java/com/topjohnwu/magisk/components/EnvFixDialog.java +++ b/app/src/full/java/com/topjohnwu/magisk/components/EnvFixDialog.java @@ -1,11 +1,12 @@ package com.topjohnwu.magisk.components; import android.app.Activity; -import android.support.annotation.NonNull; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.asyncs.InstallMagisk; +import androidx.annotation.NonNull; + public class EnvFixDialog extends CustomAlertDialog { public EnvFixDialog(@NonNull Activity activity) { diff --git a/app/src/full/java/com/topjohnwu/magisk/components/FlavorActivity.java b/app/src/full/java/com/topjohnwu/magisk/components/FlavorActivity.java index 6472c1af2..6b01555c0 100644 --- a/app/src/full/java/com/topjohnwu/magisk/components/FlavorActivity.java +++ b/app/src/full/java/com/topjohnwu/magisk/components/FlavorActivity.java @@ -4,9 +4,6 @@ import android.content.Context; import android.content.Intent; import android.content.res.Configuration; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.annotation.StyleRes; -import android.support.v7.app.AppCompatActivity; import android.view.WindowManager; import com.topjohnwu.magisk.Data; @@ -15,6 +12,10 @@ import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.utils.LocaleManager; import com.topjohnwu.magisk.utils.Topic; +import androidx.annotation.Nullable; +import androidx.annotation.StyleRes; +import androidx.appcompat.app.AppCompatActivity; + public abstract class FlavorActivity extends AppCompatActivity implements Topic.AutoSubscriber { private ActivityResultListener activityResultListener; diff --git a/app/src/full/java/com/topjohnwu/magisk/components/InstallMethodDialog.java b/app/src/full/java/com/topjohnwu/magisk/components/InstallMethodDialog.java index 2ae011aa4..680cc71b0 100644 --- a/app/src/full/java/com/topjohnwu/magisk/components/InstallMethodDialog.java +++ b/app/src/full/java/com/topjohnwu/magisk/components/InstallMethodDialog.java @@ -3,10 +3,9 @@ package com.topjohnwu.magisk.components; import android.content.Context; import android.content.Intent; import android.net.Uri; -import android.support.design.widget.Snackbar; -import android.support.v7.app.AlertDialog; import android.widget.Toast; +import com.google.android.material.snackbar.Snackbar; import com.topjohnwu.magisk.Const; import com.topjohnwu.magisk.Data; import com.topjohnwu.magisk.FlashActivity; @@ -17,6 +16,8 @@ import com.topjohnwu.magisk.utils.Utils; import java.util.List; +import androidx.appcompat.app.AlertDialog; + class InstallMethodDialog extends AlertDialog.Builder { InstallMethodDialog(BaseActivity activity, List options) { diff --git a/app/src/full/java/com/topjohnwu/magisk/components/ManagerInstallDialog.java b/app/src/full/java/com/topjohnwu/magisk/components/ManagerInstallDialog.java index fe8cd6747..0db8e0ed8 100644 --- a/app/src/full/java/com/topjohnwu/magisk/components/ManagerInstallDialog.java +++ b/app/src/full/java/com/topjohnwu/magisk/components/ManagerInstallDialog.java @@ -2,7 +2,6 @@ package com.topjohnwu.magisk.components; import android.Manifest; import android.content.Intent; -import android.support.annotation.NonNull; import android.text.TextUtils; import com.topjohnwu.magisk.Const; @@ -13,6 +12,8 @@ import com.topjohnwu.magisk.asyncs.MarkDownWindow; import com.topjohnwu.magisk.receivers.ManagerUpdate; import com.topjohnwu.magisk.utils.Utils; +import androidx.annotation.NonNull; + public class ManagerInstallDialog extends CustomAlertDialog { public ManagerInstallDialog(@NonNull BaseActivity activity) { diff --git a/app/src/full/java/com/topjohnwu/magisk/components/SnackbarMaker.java b/app/src/full/java/com/topjohnwu/magisk/components/SnackbarMaker.java index 038c15057..120f70861 100644 --- a/app/src/full/java/com/topjohnwu/magisk/components/SnackbarMaker.java +++ b/app/src/full/java/com/topjohnwu/magisk/components/SnackbarMaker.java @@ -2,14 +2,15 @@ package com.topjohnwu.magisk.components; import android.app.Activity; import android.net.Uri; -import android.support.annotation.StringRes; -import android.support.design.widget.Snackbar; import android.view.View; import android.widget.TextView; +import com.google.android.material.snackbar.Snackbar; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.utils.Utils; +import androidx.annotation.StringRes; + public class SnackbarMaker { public static Snackbar make(Activity activity, CharSequence text, int duration) { @@ -34,7 +35,7 @@ public class SnackbarMaker { } private static void setup(Snackbar snack) { - TextView text = snack.getView().findViewById(android.support.design.R.id.snackbar_text); + TextView text = snack.getView().findViewById(com.google.android.material.R.id.snackbar_text); text.setMaxLines(Integer.MAX_VALUE); } diff --git a/app/src/full/java/com/topjohnwu/magisk/components/UninstallDialog.java b/app/src/full/java/com/topjohnwu/magisk/components/UninstallDialog.java index 93164f72b..c32b131f2 100644 --- a/app/src/full/java/com/topjohnwu/magisk/components/UninstallDialog.java +++ b/app/src/full/java/com/topjohnwu/magisk/components/UninstallDialog.java @@ -5,7 +5,6 @@ import android.app.ProgressDialog; import android.content.Context; import android.content.Intent; import android.net.Uri; -import android.support.annotation.NonNull; import android.text.TextUtils; import android.widget.Toast; @@ -19,6 +18,8 @@ import com.topjohnwu.magisk.utils.Download; import com.topjohnwu.magisk.utils.Utils; import com.topjohnwu.superuser.Shell; +import androidx.annotation.NonNull; + public class UninstallDialog extends CustomAlertDialog { public UninstallDialog(@NonNull Activity activity) { diff --git a/app/src/full/java/com/topjohnwu/magisk/container/BaseModule.java b/app/src/full/java/com/topjohnwu/magisk/container/BaseModule.java index 1aeea8c4c..594cb6e8d 100644 --- a/app/src/full/java/com/topjohnwu/magisk/container/BaseModule.java +++ b/app/src/full/java/com/topjohnwu/magisk/container/BaseModule.java @@ -3,10 +3,11 @@ package com.topjohnwu.magisk.container; import android.content.ContentValues; import android.database.Cursor; -import android.support.annotation.NonNull; import java.util.List; +import androidx.annotation.NonNull; + public abstract class BaseModule implements Comparable { private String mId = null, mName, mVersion, mAuthor, mDescription; diff --git a/app/src/full/java/com/topjohnwu/magisk/container/Policy.java b/app/src/full/java/com/topjohnwu/magisk/container/Policy.java index 3c3cf60e5..4518ee14c 100644 --- a/app/src/full/java/com/topjohnwu/magisk/container/Policy.java +++ b/app/src/full/java/com/topjohnwu/magisk/container/Policy.java @@ -4,7 +4,8 @@ import android.content.ContentValues; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.database.Cursor; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; public class Policy implements Comparable{ diff --git a/app/src/full/java/com/topjohnwu/magisk/container/ValueSortedMap.java b/app/src/full/java/com/topjohnwu/magisk/container/ValueSortedMap.java index dccd6105c..23be3c4d0 100644 --- a/app/src/full/java/com/topjohnwu/magisk/container/ValueSortedMap.java +++ b/app/src/full/java/com/topjohnwu/magisk/container/ValueSortedMap.java @@ -1,7 +1,5 @@ package com.topjohnwu.magisk.container; -import android.support.annotation.NonNull; - import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -9,6 +7,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import androidx.annotation.NonNull; + public class ValueSortedMap> extends HashMap { private List sorted = new ArrayList<>(); diff --git a/app/src/full/java/com/topjohnwu/magisk/database/MagiskDatabaseHelper.java b/app/src/full/java/com/topjohnwu/magisk/database/MagiskDatabaseHelper.java index be224c2ba..488866af1 100644 --- a/app/src/full/java/com/topjohnwu/magisk/database/MagiskDatabaseHelper.java +++ b/app/src/full/java/com/topjohnwu/magisk/database/MagiskDatabaseHelper.java @@ -7,7 +7,6 @@ import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Build; import android.os.Process; -import android.support.annotation.NonNull; import android.text.TextUtils; import android.widget.Toast; @@ -29,6 +28,8 @@ import java.util.Collections; import java.util.Date; import java.util.List; +import androidx.annotation.NonNull; + public class MagiskDatabaseHelper { private static final int DATABASE_VER = 6; diff --git a/app/src/full/java/com/topjohnwu/magisk/fragments/LogFragment.java b/app/src/full/java/com/topjohnwu/magisk/fragments/LogFragment.java index 0d68820b9..919e01ac2 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/LogFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/LogFragment.java @@ -2,12 +2,11 @@ package com.topjohnwu.magisk.fragments; import android.os.Bundle; -import android.support.design.widget.TabLayout; -import android.support.v4.view.ViewPager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import com.google.android.material.tabs.TabLayout; import com.topjohnwu.magisk.Const; import com.topjohnwu.magisk.Data; import com.topjohnwu.magisk.MainActivity; @@ -15,6 +14,7 @@ import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.adapters.TabFragmentAdapter; import com.topjohnwu.magisk.components.BaseFragment; +import androidx.viewpager.widget.ViewPager; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; diff --git a/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskFragment.java b/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskFragment.java index 62cf2a2d3..45b35c0ad 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskFragment.java @@ -5,11 +5,6 @@ import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.widget.CardView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -41,6 +36,11 @@ import com.topjohnwu.magisk.utils.Topic; import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.ShellUtils; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.cardview.widget.CardView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import butterknife.BindColor; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskHideFragment.java b/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskHideFragment.java index 277810204..009821189 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskHideFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskHideFragment.java @@ -1,10 +1,6 @@ package com.topjohnwu.magisk.fragments; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; @@ -17,6 +13,10 @@ import com.topjohnwu.magisk.adapters.ApplicationAdapter; import com.topjohnwu.magisk.components.BaseFragment; import com.topjohnwu.magisk.utils.Topic; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; diff --git a/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskLogFragment.java b/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskLogFragment.java index f431b3354..5bf8309d1 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskLogFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskLogFragment.java @@ -2,8 +2,6 @@ package com.topjohnwu.magisk.fragments; import android.Manifest; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.Snackbar; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.Menu; @@ -16,6 +14,7 @@ import android.widget.ProgressBar; import android.widget.ScrollView; import android.widget.TextView; +import com.google.android.material.snackbar.Snackbar; import com.topjohnwu.magisk.Const; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.components.BaseFragment; @@ -28,6 +27,7 @@ import java.io.File; import java.io.IOException; import java.util.Calendar; +import androidx.annotation.Nullable; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; diff --git a/app/src/full/java/com/topjohnwu/magisk/fragments/ModulesFragment.java b/app/src/full/java/com/topjohnwu/magisk/fragments/ModulesFragment.java index 59e450b99..d47493f04 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/ModulesFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/ModulesFragment.java @@ -4,10 +4,6 @@ import android.Manifest; import android.app.Activity; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; @@ -30,6 +26,10 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; diff --git a/app/src/full/java/com/topjohnwu/magisk/fragments/ReposFragment.java b/app/src/full/java/com/topjohnwu/magisk/fragments/ReposFragment.java index 8396f0487..b669e15c7 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/ReposFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/ReposFragment.java @@ -2,10 +2,6 @@ package com.topjohnwu.magisk.fragments; import android.app.AlertDialog; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; @@ -26,6 +22,10 @@ import com.topjohnwu.magisk.utils.Topic; import java.util.Map; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; diff --git a/app/src/full/java/com/topjohnwu/magisk/fragments/SettingsFragment.java b/app/src/full/java/com/topjohnwu/magisk/fragments/SettingsFragment.java index 5c40a868a..2c2b10c66 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/SettingsFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/SettingsFragment.java @@ -10,13 +10,6 @@ import android.hardware.fingerprint.FingerprintManager; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.v14.preference.SwitchPreference; -import android.support.v7.app.AlertDialog; -import android.support.v7.preference.ListPreference; -import android.support.v7.preference.Preference; -import android.support.v7.preference.PreferenceCategory; -import android.support.v7.preference.PreferenceFragmentCompat; -import android.support.v7.preference.PreferenceScreen; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; @@ -44,6 +37,14 @@ import com.topjohnwu.superuser.ShellUtils; import java.io.IOException; import java.util.Locale; +import androidx.appcompat.app.AlertDialog; +import androidx.preference.ListPreference; +import androidx.preference.Preference; +import androidx.preference.PreferenceCategory; +import androidx.preference.PreferenceFragmentCompat; +import androidx.preference.PreferenceScreen; +import androidx.preference.SwitchPreference; + public class SettingsFragment extends PreferenceFragmentCompat implements SharedPreferences.OnSharedPreferenceChangeListener, Topic.Subscriber, Topic.AutoSubscriber { diff --git a/app/src/full/java/com/topjohnwu/magisk/fragments/SuLogFragment.java b/app/src/full/java/com/topjohnwu/magisk/fragments/SuLogFragment.java index 12dce4f88..b5a3349d6 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/SuLogFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/SuLogFragment.java @@ -1,8 +1,6 @@ package com.topjohnwu.magisk.fragments; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; @@ -15,6 +13,8 @@ import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.adapters.SuLogAdapter; import com.topjohnwu.magisk.components.BaseFragment; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; diff --git a/app/src/full/java/com/topjohnwu/magisk/fragments/SuperuserFragment.java b/app/src/full/java/com/topjohnwu/magisk/fragments/SuperuserFragment.java index 1b1e263a7..2773a6253 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/SuperuserFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/SuperuserFragment.java @@ -2,8 +2,6 @@ package com.topjohnwu.magisk.fragments; import android.content.pm.PackageManager; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -16,6 +14,8 @@ import com.topjohnwu.magisk.container.Policy; import java.util.List; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; diff --git a/app/src/full/java/com/topjohnwu/magisk/receivers/ShortcutReceiver.java b/app/src/full/java/com/topjohnwu/magisk/receivers/ShortcutReceiver.java index 9997f64cd..ceb1b155b 100644 --- a/app/src/full/java/com/topjohnwu/magisk/receivers/ShortcutReceiver.java +++ b/app/src/full/java/com/topjohnwu/magisk/receivers/ShortcutReceiver.java @@ -7,7 +7,6 @@ import android.content.pm.ShortcutInfo; import android.content.pm.ShortcutManager; import android.graphics.drawable.Icon; import android.os.Build; -import android.support.annotation.RequiresApi; import com.topjohnwu.magisk.Const; import com.topjohnwu.magisk.Data; @@ -18,6 +17,8 @@ import com.topjohnwu.superuser.Shell; import java.util.ArrayList; +import androidx.annotation.RequiresApi; + public class ShortcutReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { diff --git a/app/src/full/java/com/topjohnwu/magisk/services/OnBootService.java b/app/src/full/java/com/topjohnwu/magisk/services/OnBootService.java index 6ad589f10..b2856e542 100644 --- a/app/src/full/java/com/topjohnwu/magisk/services/OnBootService.java +++ b/app/src/full/java/com/topjohnwu/magisk/services/OnBootService.java @@ -2,14 +2,15 @@ package com.topjohnwu.magisk.services; import android.content.Context; import android.content.Intent; -import android.support.annotation.NonNull; -import android.support.v4.app.JobIntentService; import com.topjohnwu.magisk.Const; import com.topjohnwu.magisk.utils.NotificationMgr; import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.ShellUtils; +import androidx.annotation.NonNull; +import androidx.core.app.JobIntentService; + public class OnBootService extends JobIntentService { public static void enqueueWork(Context context) { diff --git a/app/src/full/java/com/topjohnwu/magisk/utils/BootSigner.java b/app/src/full/java/com/topjohnwu/magisk/utils/BootSigner.java index 82204912d..a3a37a970 100644 --- a/app/src/full/java/com/topjohnwu/magisk/utils/BootSigner.java +++ b/app/src/full/java/com/topjohnwu/magisk/utils/BootSigner.java @@ -1,12 +1,12 @@ package com.topjohnwu.magisk.utils; -import android.support.annotation.Keep; - import com.topjohnwu.utils.SignBoot; import java.io.FileInputStream; import java.io.InputStream; +import androidx.annotation.Keep; + public class BootSigner { @Keep diff --git a/app/src/full/java/com/topjohnwu/magisk/utils/ISafetyNetHelper.java b/app/src/full/java/com/topjohnwu/magisk/utils/ISafetyNetHelper.java index f55a6f5f8..ee4f4dad1 100644 --- a/app/src/full/java/com/topjohnwu/magisk/utils/ISafetyNetHelper.java +++ b/app/src/full/java/com/topjohnwu/magisk/utils/ISafetyNetHelper.java @@ -1,6 +1,6 @@ package com.topjohnwu.magisk.utils; -import android.support.annotation.Keep; +import androidx.annotation.Keep; public interface ISafetyNetHelper { diff --git a/app/src/full/java/com/topjohnwu/magisk/utils/LocaleManager.java b/app/src/full/java/com/topjohnwu/magisk/utils/LocaleManager.java index 67fea47a8..d4d03daa4 100644 --- a/app/src/full/java/com/topjohnwu/magisk/utils/LocaleManager.java +++ b/app/src/full/java/com/topjohnwu/magisk/utils/LocaleManager.java @@ -3,7 +3,6 @@ package com.topjohnwu.magisk.utils; import android.content.res.Configuration; import android.content.res.Resources; import android.os.AsyncTask; -import android.support.annotation.StringRes; import com.topjohnwu.magisk.Const; import com.topjohnwu.magisk.Data; @@ -16,6 +15,8 @@ import java.util.HashSet; import java.util.List; import java.util.Locale; +import androidx.annotation.StringRes; + public class LocaleManager { public static Locale locale = Locale.getDefault(); public final static Locale defaultLocale = Locale.getDefault(); diff --git a/app/src/full/java/com/topjohnwu/magisk/utils/NotificationMgr.java b/app/src/full/java/com/topjohnwu/magisk/utils/NotificationMgr.java index 1f13871d3..4728f7a93 100644 --- a/app/src/full/java/com/topjohnwu/magisk/utils/NotificationMgr.java +++ b/app/src/full/java/com/topjohnwu/magisk/utils/NotificationMgr.java @@ -4,8 +4,6 @@ import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.TaskStackBuilder; import com.topjohnwu.magisk.Const; import com.topjohnwu.magisk.Data; @@ -15,6 +13,9 @@ import com.topjohnwu.magisk.SplashActivity; import com.topjohnwu.magisk.receivers.ManagerUpdate; import com.topjohnwu.magisk.receivers.RebootReceiver; +import androidx.core.app.NotificationCompat; +import androidx.core.app.TaskStackBuilder; + public class NotificationMgr { public static void magiskUpdate() { diff --git a/app/src/full/java/com/topjohnwu/magisk/utils/RootUtils.java b/app/src/full/java/com/topjohnwu/magisk/utils/RootUtils.java index 1f2bab4fb..7c686052e 100644 --- a/app/src/full/java/com/topjohnwu/magisk/utils/RootUtils.java +++ b/app/src/full/java/com/topjohnwu/magisk/utils/RootUtils.java @@ -1,7 +1,6 @@ package com.topjohnwu.magisk.utils; import android.content.Context; -import android.support.annotation.NonNull; import com.topjohnwu.magisk.Const; import com.topjohnwu.magisk.Data; @@ -14,6 +13,8 @@ import com.topjohnwu.superuser.io.SuFile; import java.io.File; import java.io.InputStream; +import androidx.annotation.NonNull; + public class RootUtils extends Shell.Initializer { static { diff --git a/app/src/full/java/com/topjohnwu/magisk/utils/Topic.java b/app/src/full/java/com/topjohnwu/magisk/utils/Topic.java index 11b7f7951..e1aab2115 100644 --- a/app/src/full/java/com/topjohnwu/magisk/utils/Topic.java +++ b/app/src/full/java/com/topjohnwu/magisk/utils/Topic.java @@ -1,7 +1,5 @@ package com.topjohnwu.magisk.utils; -import android.support.annotation.IntDef; - import com.topjohnwu.magisk.Data; import java.lang.annotation.Retention; @@ -9,6 +7,8 @@ import java.lang.annotation.RetentionPolicy; import java.util.HashSet; import java.util.Set; +import androidx.annotation.IntDef; + public class Topic { public static final int MAGISK_HIDE_DONE = 0; diff --git a/app/src/full/res/layout/activity_about.xml b/app/src/full/res/layout/activity_about.xml index 3eb5142dc..8e1fbdbb2 100644 --- a/app/src/full/res/layout/activity_about.xml +++ b/app/src/full/res/layout/activity_about.xml @@ -20,7 +20,7 @@ android:layout_height="wrap_content" android:orientation="vertical"> - - + diff --git a/app/src/full/res/layout/activity_donation.xml b/app/src/full/res/layout/activity_donation.xml index 48be5f29a..a1ba2ca67 100644 --- a/app/src/full/res/layout/activity_donation.xml +++ b/app/src/full/res/layout/activity_donation.xml @@ -20,7 +20,7 @@ android:layout_height="wrap_content" android:orientation="vertical"> - - + diff --git a/app/src/full/res/layout/activity_main.xml b/app/src/full/res/layout/activity_main.xml index 82154d459..3489c737c 100644 --- a/app/src/full/res/layout/activity_main.xml +++ b/app/src/full/res/layout/activity_main.xml @@ -1,5 +1,5 @@ - - - + diff --git a/app/src/full/res/layout/fragment_log.xml b/app/src/full/res/layout/fragment_log.xml index 2d902ce38..895f1afb1 100644 --- a/app/src/full/res/layout/fragment_log.xml +++ b/app/src/full/res/layout/fragment_log.xml @@ -7,7 +7,7 @@ android:orientation="vertical" tools:context="com.topjohnwu.magisk.fragments.LogFragment"> - - + - diff --git a/app/src/full/res/layout/fragment_magisk.xml b/app/src/full/res/layout/fragment_magisk.xml index b3ddec4a2..837578232 100644 --- a/app/src/full/res/layout/fragment_magisk.xml +++ b/app/src/full/res/layout/fragment_magisk.xml @@ -1,5 +1,5 @@ - - - + - - + - - + - - + - - + - - + - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/full/res/layout/fragment_magisk_hide.xml b/app/src/full/res/layout/fragment_magisk_hide.xml index a2486a363..2779c6ddf 100644 --- a/app/src/full/res/layout/fragment_magisk_hide.xml +++ b/app/src/full/res/layout/fragment_magisk_hide.xml @@ -1,5 +1,5 @@ - android:layout_height="match_parent" android:orientation="vertical"> - + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/full/res/layout/fragment_modules.xml b/app/src/full/res/layout/fragment_modules.xml index 02306f04d..b6721a463 100644 --- a/app/src/full/res/layout/fragment_modules.xml +++ b/app/src/full/res/layout/fragment_modules.xml @@ -1,5 +1,5 @@ - - - + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> - - + - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/full/res/layout/fragment_repos.xml b/app/src/full/res/layout/fragment_repos.xml index 9d33752ac..15bbbe1d9 100644 --- a/app/src/full/res/layout/fragment_repos.xml +++ b/app/src/full/res/layout/fragment_repos.xml @@ -1,5 +1,5 @@ - - + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/full/res/layout/fragment_su_log.xml b/app/src/full/res/layout/fragment_su_log.xml index e50fa4569..3abaa9783 100644 --- a/app/src/full/res/layout/fragment_su_log.xml +++ b/app/src/full/res/layout/fragment_su_log.xml @@ -18,11 +18,11 @@ android:textStyle="italic" android:visibility="gone" /> - + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> diff --git a/app/src/full/res/layout/fragment_superuser.xml b/app/src/full/res/layout/fragment_superuser.xml index 1092c5b0f..2145f4a6d 100644 --- a/app/src/full/res/layout/fragment_superuser.xml +++ b/app/src/full/res/layout/fragment_superuser.xml @@ -17,11 +17,11 @@ android:textStyle="italic" android:visibility="gone" /> - + app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> diff --git a/app/src/full/res/layout/list_item_app.xml b/app/src/full/res/layout/list_item_app.xml index 5e3709e86..a21eb16e1 100644 --- a/app/src/full/res/layout/list_item_app.xml +++ b/app/src/full/res/layout/list_item_app.xml @@ -1,6 +1,6 @@ - - + diff --git a/app/src/full/res/layout/list_item_module.xml b/app/src/full/res/layout/list_item_module.xml index 2cffcca7b..c79b576c5 100644 --- a/app/src/full/res/layout/list_item_module.xml +++ b/app/src/full/res/layout/list_item_module.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/full/res/layout/list_item_policy.xml b/app/src/full/res/layout/list_item_policy.xml index 6df19b83b..685f1fa17 100644 --- a/app/src/full/res/layout/list_item_policy.xml +++ b/app/src/full/res/layout/list_item_policy.xml @@ -1,5 +1,5 @@ - - + diff --git a/app/src/full/res/layout/list_item_repo.xml b/app/src/full/res/layout/list_item_repo.xml index 6c19cb3af..4ebc51fbd 100644 --- a/app/src/full/res/layout/list_item_repo.xml +++ b/app/src/full/res/layout/list_item_repo.xml @@ -1,5 +1,5 @@ - - + diff --git a/app/src/full/res/layout/list_item_sulog.xml b/app/src/full/res/layout/list_item_sulog.xml index dae9ec209..81b06f44c 100644 --- a/app/src/full/res/layout/list_item_sulog.xml +++ b/app/src/full/res/layout/list_item_sulog.xml @@ -1,5 +1,5 @@ - - + diff --git a/app/src/full/res/layout/toolbar.xml b/app/src/full/res/layout/toolbar.xml index f7311d812..f96cb2eb8 100644 --- a/app/src/full/res/layout/toolbar.xml +++ b/app/src/full/res/layout/toolbar.xml @@ -1,5 +1,5 @@ - diff --git a/app/src/main/java/com/topjohnwu/magisk/components/BaseActivity.java b/app/src/main/java/com/topjohnwu/magisk/components/BaseActivity.java index 51d8378f7..66cfab260 100644 --- a/app/src/main/java/com/topjohnwu/magisk/components/BaseActivity.java +++ b/app/src/main/java/com/topjohnwu/magisk/components/BaseActivity.java @@ -4,16 +4,17 @@ import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; import android.widget.Toast; import com.topjohnwu.magisk.NoUIActivity; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.utils.Download; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; + public abstract class BaseActivity extends FlavorActivity { public static final String INTENT_PERM = "perm_dialog"; diff --git a/app/src/main/java/com/topjohnwu/magisk/receivers/ManagerInstall.java b/app/src/main/java/com/topjohnwu/magisk/receivers/ManagerInstall.java index 87138a77f..a0f881ad4 100644 --- a/app/src/main/java/com/topjohnwu/magisk/receivers/ManagerInstall.java +++ b/app/src/main/java/com/topjohnwu/magisk/receivers/ManagerInstall.java @@ -4,10 +4,11 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Build; -import android.support.v4.content.FileProvider; import java.io.File; +import androidx.core.content.FileProvider; + public class ManagerInstall extends DownloadReceiver { @Override public void onDownloadDone(Context context, Uri uri) { diff --git a/build.gradle b/build.gradle index 08d100a44..1e39012d6 100644 --- a/build.gradle +++ b/build.gradle @@ -26,7 +26,7 @@ allprojects { ext { compileSdkVersion = 28 buildToolsVersion = "28.0.2" - supportLibVersion = "27.1.1" + androidXVersion = "1.0.0-rc02" } task clean(type: Delete) { diff --git a/gradle.properties b/gradle.properties index d13e92712..cc455b747 100644 --- a/gradle.properties +++ b/gradle.properties @@ -20,3 +20,7 @@ org.gradle.parallel=true # When set to true the Gradle daemon is used to run the build. For local developer builds this is our favorite property. # The developer environment is optimized for speed and feedback so we nearly always run Gradle jobs with the daemon. org.gradle.daemon=true + +#AndroidX +android.useAndroidX=true +android.enableJetifier=true diff --git a/snet/src/main/java/com/topjohnwu/snet/SafetyNetHelper.java b/snet/src/main/java/com/topjohnwu/snet/SafetyNetHelper.java index 4009a8191..3a0ac0b7c 100644 --- a/snet/src/main/java/com/topjohnwu/snet/SafetyNetHelper.java +++ b/snet/src/main/java/com/topjohnwu/snet/SafetyNetHelper.java @@ -5,7 +5,7 @@ import android.app.AlertDialog; import android.app.Dialog; import android.content.Context; import android.content.Intent; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Base64; import android.util.Log;