From a6395d35db9240cfd65f3d4071b5c4fdb4767b7e Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Fri, 12 Apr 2019 01:58:42 -0400 Subject: [PATCH] Refactor with AS 3.5 --- .../main/java/com/topjohnwu/magisk/App.java | 8 ++++---- .../model/adapters/ApplicationAdapter.java | 11 ++++++----- .../magisk/model/adapters/ModulesAdapter.java | 5 +++-- .../magisk/model/adapters/PolicyAdapter.java | 7 ++++--- .../magisk/model/adapters/ReposAdapter.java | 3 ++- .../model/adapters/StringListAdapter.java | 4 ++-- .../magisk/model/adapters/SuLogAdapter.java | 3 ++- .../model/adapters/TabFragmentAdapter.java | 6 +++--- .../model/download/DownloadModuleService.java | 4 ++-- .../magisk/model/entity/BaseModule.java | 4 ++-- .../topjohnwu/magisk/model/entity/Policy.java | 4 ++-- .../model/update/UpdateCheckService.java | 6 +++--- .../magisk/model/worker/DelegateWorker.java | 12 ++++++------ .../com/topjohnwu/magisk/ui/MainActivity.java | 13 +++++++------ .../topjohnwu/magisk/ui/SplashActivity.java | 4 ++-- .../magisk/ui/base/BaseActivity.java | 14 +++++++------- .../magisk/ui/base/BaseFragment.java | 3 ++- .../ui/base/BasePreferenceFragment.java | 8 ++++---- .../magisk/ui/flash/FlashActivity.java | 9 +++++---- .../magisk/ui/hide/MagiskHideFragment.java | 9 +++++---- .../magisk/ui/home/MagiskFragment.java | 19 ++++++++++--------- .../topjohnwu/magisk/ui/log/LogFragment.java | 3 ++- .../magisk/ui/log/MagiskLogFragment.java | 7 ++++--- .../magisk/ui/log/SuLogFragment.java | 5 +++-- .../magisk/ui/module/ModulesFragment.java | 9 +++++---- .../magisk/ui/module/ReposFragment.java | 9 +++++---- .../magisk/ui/settings/SettingsFragment.java | 14 +++++++------- .../ui/superuser/SuperuserFragment.java | 5 +++-- .../ui/surequest/SuRequestActivity.java | 5 +++-- .../com/topjohnwu/magisk/utils/PatchAPK.java | 4 ++-- .../com/topjohnwu/magisk/utils/Utils.java | 12 ++++++------ .../magisk/utils/ValueSortedMap.java | 4 ++-- .../topjohnwu/magisk/view/MarkDownWindow.java | 3 ++- .../topjohnwu/magisk/view/Notifications.java | 8 ++++---- .../magisk/view/ProgressNotification.java | 4 ++-- .../com/topjohnwu/magisk/view/SafetyNet.java | 5 +++-- .../com/topjohnwu/magisk/view/Shortcuts.java | 4 ++-- .../topjohnwu/magisk/view/SnackbarMaker.java | 4 ++-- .../view/dialogs/CustomAlertDialog.java | 5 +++-- .../magisk/view/dialogs/EnvFixDialog.java | 4 ++-- .../view/dialogs/FingerprintAuthDialog.java | 6 +++--- .../view/dialogs/InstallMethodDialog.java | 4 ++-- .../view/dialogs/ManagerInstallDialog.java | 4 ++-- .../magisk/view/dialogs/UninstallDialog.java | 4 ++-- build.gradle | 2 +- 45 files changed, 155 insertions(+), 135 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/App.java b/app/src/main/java/com/topjohnwu/magisk/App.java index 179419249..301aa151e 100644 --- a/app/src/main/java/com/topjohnwu/magisk/App.java +++ b/app/src/main/java/com/topjohnwu/magisk/App.java @@ -10,6 +10,10 @@ import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatDelegate; + import com.topjohnwu.magisk.data.database.MagiskDB; import com.topjohnwu.magisk.data.database.RepoDatabaseHelper; import com.topjohnwu.magisk.ui.base.BaseActivity; @@ -20,10 +24,6 @@ import com.topjohnwu.superuser.Shell; import java.util.concurrent.ThreadPoolExecutor; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.appcompat.app.AppCompatDelegate; - public class App extends Application implements Application.ActivityLifecycleCallbacks { public static App self; diff --git a/app/src/main/java/com/topjohnwu/magisk/model/adapters/ApplicationAdapter.java b/app/src/main/java/com/topjohnwu/magisk/model/adapters/ApplicationAdapter.java index 6c7d86eeb..3eaa65383 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/adapters/ApplicationAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/model/adapters/ApplicationAdapter.java @@ -13,6 +13,12 @@ import android.widget.CheckBox; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.WorkerThread; +import androidx.collection.ArraySet; +import androidx.recyclerview.widget.RecyclerView; + import com.buildware.widget.indeterm.IndeterminateCheckBox; import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.Config; @@ -29,11 +35,6 @@ import java.util.Comparator; import java.util.List; import java.util.Set; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.annotation.WorkerThread; -import androidx.collection.ArraySet; -import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import java9.util.Comparators; import java9.util.Lists; diff --git a/app/src/main/java/com/topjohnwu/magisk/model/adapters/ModulesAdapter.java b/app/src/main/java/com/topjohnwu/magisk/model/adapters/ModulesAdapter.java index e82481ffa..59dc327cd 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/adapters/ModulesAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/model/adapters/ModulesAdapter.java @@ -9,6 +9,9 @@ import android.widget.CheckBox; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + import com.google.android.material.snackbar.Snackbar; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.model.entity.Module; @@ -17,8 +20,6 @@ import com.topjohnwu.superuser.Shell; import java.util.List; -import androidx.annotation.NonNull; -import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; public class ModulesAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/com/topjohnwu/magisk/model/adapters/PolicyAdapter.java b/app/src/main/java/com/topjohnwu/magisk/model/adapters/PolicyAdapter.java index 6b285dcc7..71f4a0bc1 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/adapters/PolicyAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/model/adapters/PolicyAdapter.java @@ -9,6 +9,10 @@ import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.appcompat.widget.SwitchCompat; +import androidx.recyclerview.widget.RecyclerView; + import com.google.android.material.snackbar.Snackbar; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.data.database.MagiskDB; @@ -23,9 +27,6 @@ import com.topjohnwu.magisk.view.dialogs.FingerprintAuthDialog; import java.util.List; -import androidx.annotation.NonNull; -import androidx.appcompat.widget.SwitchCompat; -import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; public class PolicyAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/com/topjohnwu/magisk/model/adapters/ReposAdapter.java b/app/src/main/java/com/topjohnwu/magisk/model/adapters/ReposAdapter.java index 162b809fb..1541c76d1 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/adapters/ReposAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/model/adapters/ReposAdapter.java @@ -13,6 +13,8 @@ import android.widget.ImageView; import android.widget.SearchView; import android.widget.TextView; +import androidx.recyclerview.widget.RecyclerView; + import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.R; @@ -30,7 +32,6 @@ import java.util.Collections; import java.util.List; import java.util.Map; -import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; import java9.util.stream.StreamSupport; diff --git a/app/src/main/java/com/topjohnwu/magisk/model/adapters/StringListAdapter.java b/app/src/main/java/com/topjohnwu/magisk/model/adapters/StringListAdapter.java index b76064220..300ff1658 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/adapters/StringListAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/model/adapters/StringListAdapter.java @@ -7,13 +7,13 @@ import android.view.View; import android.view.ViewGroup; import android.widget.TextView; -import java.util.List; - import androidx.annotation.IdRes; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; +import java.util.List; + public abstract class StringListAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/com/topjohnwu/magisk/model/adapters/SuLogAdapter.java b/app/src/main/java/com/topjohnwu/magisk/model/adapters/SuLogAdapter.java index b1afdd51d..1a43172bb 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/adapters/SuLogAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/model/adapters/SuLogAdapter.java @@ -9,6 +9,8 @@ import android.view.animation.RotateAnimation; import android.widget.ImageView; import android.widget.TextView; +import androidx.recyclerview.widget.RecyclerView; + import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.data.database.MagiskDB; import com.topjohnwu.magisk.model.entity.SuLogEntry; @@ -19,7 +21,6 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; public class SuLogAdapter extends SectionedAdapter { diff --git a/app/src/main/java/com/topjohnwu/magisk/model/adapters/TabFragmentAdapter.java b/app/src/main/java/com/topjohnwu/magisk/model/adapters/TabFragmentAdapter.java index eddb897fb..aece29667 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/adapters/TabFragmentAdapter.java +++ b/app/src/main/java/com/topjohnwu/magisk/model/adapters/TabFragmentAdapter.java @@ -1,13 +1,13 @@ package com.topjohnwu.magisk.model.adapters; -import java.util.ArrayList; -import java.util.List; - import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentPagerAdapter; +import java.util.ArrayList; +import java.util.List; + public class TabFragmentAdapter extends FragmentPagerAdapter { private List fragmentList; diff --git a/app/src/main/java/com/topjohnwu/magisk/model/download/DownloadModuleService.java b/app/src/main/java/com/topjohnwu/magisk/model/download/DownloadModuleService.java index 8b1ce786a..a3d5e0987 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/download/DownloadModuleService.java +++ b/app/src/main/java/com/topjohnwu/magisk/model/download/DownloadModuleService.java @@ -6,6 +6,8 @@ import android.content.Intent; import android.net.Uri; import android.os.IBinder; +import androidx.annotation.Nullable; + import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.Const; @@ -30,8 +32,6 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; -import androidx.annotation.Nullable; - public class DownloadModuleService extends Service { private List notifications; diff --git a/app/src/main/java/com/topjohnwu/magisk/model/entity/BaseModule.java b/app/src/main/java/com/topjohnwu/magisk/model/entity/BaseModule.java index 20ccc4bec..ba746cb97 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/entity/BaseModule.java +++ b/app/src/main/java/com/topjohnwu/magisk/model/entity/BaseModule.java @@ -5,10 +5,10 @@ import android.database.Cursor; import android.os.Parcel; import android.os.Parcelable; -import java.util.List; - import androidx.annotation.NonNull; +import java.util.List; + public abstract class BaseModule implements Comparable, Parcelable { private String mId, mName, mVersion, mAuthor, mDescription; diff --git a/app/src/main/java/com/topjohnwu/magisk/model/entity/Policy.java b/app/src/main/java/com/topjohnwu/magisk/model/entity/Policy.java index 10cc6dac6..adc54c8fa 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/entity/Policy.java +++ b/app/src/main/java/com/topjohnwu/magisk/model/entity/Policy.java @@ -4,10 +4,10 @@ import android.content.ContentValues; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; -import com.topjohnwu.magisk.utils.Utils; - import androidx.annotation.NonNull; +import com.topjohnwu.magisk.utils.Utils; + public class Policy implements Comparable{ public static final int INTERACTIVE = 0; diff --git a/app/src/main/java/com/topjohnwu/magisk/model/update/UpdateCheckService.java b/app/src/main/java/com/topjohnwu/magisk/model/update/UpdateCheckService.java index 87c6544ef..c51378d6b 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/update/UpdateCheckService.java +++ b/app/src/main/java/com/topjohnwu/magisk/model/update/UpdateCheckService.java @@ -1,5 +1,8 @@ package com.topjohnwu.magisk.model.update; +import androidx.annotation.NonNull; +import androidx.work.ListenableWorker; + import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.Config; @@ -8,9 +11,6 @@ import com.topjohnwu.magisk.tasks.CheckUpdates; import com.topjohnwu.magisk.view.Notifications; import com.topjohnwu.superuser.Shell; -import androidx.annotation.NonNull; -import androidx.work.ListenableWorker; - public class UpdateCheckService extends DelegateWorker { @NonNull diff --git a/app/src/main/java/com/topjohnwu/magisk/model/worker/DelegateWorker.java b/app/src/main/java/com/topjohnwu/magisk/model/worker/DelegateWorker.java index 670e88d1c..f9460e824 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/worker/DelegateWorker.java +++ b/app/src/main/java/com/topjohnwu/magisk/model/worker/DelegateWorker.java @@ -4,12 +4,6 @@ import android.content.Context; import android.net.Network; import android.net.Uri; -import com.google.common.util.concurrent.ListenableFuture; - -import java.util.List; -import java.util.Set; -import java.util.UUID; - import androidx.annotation.MainThread; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -17,6 +11,12 @@ import androidx.annotation.RequiresApi; import androidx.work.Data; import androidx.work.ListenableWorker; +import com.google.common.util.concurrent.ListenableFuture; + +import java.util.List; +import java.util.Set; +import java.util.UUID; + public abstract class DelegateWorker { private ListenableWorker worker; diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.java b/app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.java index 3da71cf37..1f566a259 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.java @@ -8,6 +8,13 @@ import android.view.Menu; import android.view.MenuItem; import android.view.View; +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 com.google.android.material.navigation.NavigationView; import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.Config; @@ -25,12 +32,6 @@ import com.topjohnwu.magisk.utils.Utils; import com.topjohnwu.net.Networking; 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; public class MainActivity extends BaseActivity diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/SplashActivity.java b/app/src/main/java/com/topjohnwu/magisk/ui/SplashActivity.java index ee0d8014d..09732bb8d 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/SplashActivity.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/SplashActivity.java @@ -5,6 +5,8 @@ import android.content.pm.PackageManager; import android.os.Bundle; import android.text.TextUtils; +import androidx.appcompat.app.AlertDialog; + import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.Config; @@ -21,8 +23,6 @@ import com.topjohnwu.magisk.view.Shortcuts; import com.topjohnwu.net.Networking; import com.topjohnwu.superuser.Shell; -import androidx.appcompat.app.AlertDialog; - public class SplashActivity extends BaseActivity { public static boolean DONE = false; diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/base/BaseActivity.java b/app/src/main/java/com/topjohnwu/magisk/ui/base/BaseActivity.java index ed42d5b10..cdefa4e7c 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/base/BaseActivity.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/base/BaseActivity.java @@ -11,13 +11,6 @@ import android.os.Bundle; import android.text.TextUtils; import android.view.WindowManager; -import com.topjohnwu.magisk.App; -import com.topjohnwu.magisk.Config; -import com.topjohnwu.magisk.Const; -import com.topjohnwu.magisk.R; -import com.topjohnwu.magisk.utils.Event; -import com.topjohnwu.magisk.utils.LocaleManager; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.StyleRes; @@ -26,6 +19,13 @@ import androidx.collection.SparseArrayCompat; import androidx.core.app.ActivityCompat; import androidx.core.content.ContextCompat; +import com.topjohnwu.magisk.App; +import com.topjohnwu.magisk.Config; +import com.topjohnwu.magisk.Const; +import com.topjohnwu.magisk.R; +import com.topjohnwu.magisk.utils.Event; +import com.topjohnwu.magisk.utils.LocaleManager; + public abstract class BaseActivity extends AppCompatActivity implements Event.AutoListener { static int[] EMPTY_INT_ARRAY = new int[0]; diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/base/BaseFragment.java b/app/src/main/java/com/topjohnwu/magisk/ui/base/BaseFragment.java index 3594a4c19..93cbd6629 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/base/BaseFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/base/BaseFragment.java @@ -2,10 +2,11 @@ package com.topjohnwu.magisk.ui.base; import android.content.Intent; +import androidx.fragment.app.Fragment; + import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.utils.Event; -import androidx.fragment.app.Fragment; import butterknife.Unbinder; public abstract class BaseFragment extends Fragment implements Event.AutoListener { diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/base/BasePreferenceFragment.java b/app/src/main/java/com/topjohnwu/magisk/ui/base/BasePreferenceFragment.java index 02e04ac3e..2daa57f6e 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/base/BasePreferenceFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/base/BasePreferenceFragment.java @@ -8,10 +8,6 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import com.topjohnwu.magisk.App; -import com.topjohnwu.magisk.R; -import com.topjohnwu.magisk.utils.Event; - import androidx.preference.Preference; import androidx.preference.PreferenceCategory; import androidx.preference.PreferenceFragmentCompat; @@ -20,6 +16,10 @@ import androidx.preference.PreferenceScreen; import androidx.preference.PreferenceViewHolder; import androidx.recyclerview.widget.RecyclerView; +import com.topjohnwu.magisk.App; +import com.topjohnwu.magisk.R; +import com.topjohnwu.magisk.utils.Event; + public abstract class BasePreferenceFragment extends PreferenceFragmentCompat implements SharedPreferences.OnSharedPreferenceChangeListener, Event.AutoListener { diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/flash/FlashActivity.java b/app/src/main/java/com/topjohnwu/magisk/ui/flash/FlashActivity.java index 741050e77..ba1c54aa1 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/flash/FlashActivity.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/flash/FlashActivity.java @@ -8,6 +8,11 @@ import android.widget.Button; import android.widget.LinearLayout; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.widget.Toolbar; +import androidx.recyclerview.widget.RecyclerView; + import com.topjohnwu.magisk.Const; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.model.adapters.StringListAdapter; @@ -29,10 +34,6 @@ import java.util.Collections; import java.util.List; import java.util.Locale; -import androidx.annotation.NonNull; -import androidx.appcompat.app.ActionBar; -import androidx.appcompat.widget.Toolbar; -import androidx.recyclerview.widget.RecyclerView; import butterknife.BindColor; import butterknife.BindView; import butterknife.OnClick; diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/hide/MagiskHideFragment.java b/app/src/main/java/com/topjohnwu/magisk/ui/hide/MagiskHideFragment.java index c7f4c3356..1bb686ffe 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/hide/MagiskHideFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/hide/MagiskHideFragment.java @@ -9,16 +9,17 @@ import android.view.View; import android.view.ViewGroup; import android.widget.SearchView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; + import com.topjohnwu.magisk.Config; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.model.adapters.ApplicationAdapter; import com.topjohnwu.magisk.ui.base.BaseFragment; import com.topjohnwu.magisk.utils.Event; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.recyclerview.widget.RecyclerView; -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import butterknife.BindView; public class MagiskHideFragment extends BaseFragment { diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.java b/app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.java index 4a1864214..8dbc449a3 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.java @@ -9,6 +9,16 @@ import android.widget.CheckBox; import android.widget.ImageView; import android.widget.LinearLayout; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.cardview.widget.CardView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; +import androidx.transition.ChangeBounds; +import androidx.transition.Fade; +import androidx.transition.Transition; +import androidx.transition.TransitionManager; +import androidx.transition.TransitionSet; + import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.Config; import com.topjohnwu.magisk.Const; @@ -34,15 +44,6 @@ import com.topjohnwu.superuser.Shell; import java.util.Locale; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.cardview.widget.CardView; -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; -import androidx.transition.ChangeBounds; -import androidx.transition.Fade; -import androidx.transition.Transition; -import androidx.transition.TransitionManager; -import androidx.transition.TransitionSet; import butterknife.BindColor; import butterknife.BindView; import butterknife.OnClick; diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/log/LogFragment.java b/app/src/main/java/com/topjohnwu/magisk/ui/log/LogFragment.java index d684e1d6f..7757d743d 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/log/LogFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/log/LogFragment.java @@ -7,13 +7,14 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import androidx.viewpager.widget.ViewPager; + import com.google.android.material.tabs.TabLayout; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.model.adapters.TabFragmentAdapter; import com.topjohnwu.magisk.ui.MainActivity; import com.topjohnwu.magisk.ui.base.BaseFragment; -import androidx.viewpager.widget.ViewPager; import butterknife.BindView; public class LogFragment extends BaseFragment { diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/log/MagiskLogFragment.java b/app/src/main/java/com/topjohnwu/magisk/ui/log/MagiskLogFragment.java index 0e44c25e9..231b1a161 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/log/MagiskLogFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/log/MagiskLogFragment.java @@ -8,6 +8,10 @@ import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; + import com.google.android.material.snackbar.Snackbar; import com.topjohnwu.magisk.Const; import com.topjohnwu.magisk.R; @@ -23,9 +27,6 @@ import java.io.IOException; import java.util.Calendar; import java.util.List; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; public class MagiskLogFragment extends BaseFragment { diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/log/SuLogFragment.java b/app/src/main/java/com/topjohnwu/magisk/ui/log/SuLogFragment.java index 9f6595d00..31588c26d 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/log/SuLogFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/log/SuLogFragment.java @@ -9,12 +9,13 @@ import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; + import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.model.adapters.SuLogAdapter; import com.topjohnwu.magisk.ui.base.BaseFragment; -import androidx.annotation.Nullable; -import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; public class SuLogFragment extends BaseFragment { diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/module/ModulesFragment.java b/app/src/main/java/com/topjohnwu/magisk/ui/module/ModulesFragment.java index 78d5989a7..d217b0e73 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/module/ModulesFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/module/ModulesFragment.java @@ -11,6 +11,11 @@ import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; + import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.Const; import com.topjohnwu.magisk.R; @@ -27,10 +32,6 @@ 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.OnClick; diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/module/ReposFragment.java b/app/src/main/java/com/topjohnwu/magisk/ui/module/ReposFragment.java index 4c12fee70..2048d5dc1 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/module/ReposFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/module/ReposFragment.java @@ -11,6 +11,11 @@ import android.view.ViewGroup; import android.widget.SearchView; import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; + import com.topjohnwu.magisk.Config; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.model.adapters.ReposAdapter; @@ -18,10 +23,6 @@ import com.topjohnwu.magisk.tasks.UpdateRepos; import com.topjohnwu.magisk.ui.base.BaseFragment; import com.topjohnwu.magisk.utils.Event; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.recyclerview.widget.RecyclerView; -import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import butterknife.BindView; public class ReposFragment extends BaseFragment { diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsFragment.java b/app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsFragment.java index 7938275b8..f74a61f50 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/settings/SettingsFragment.java @@ -8,6 +8,13 @@ import android.view.View; import android.widget.EditText; import android.widget.Toast; +import androidx.appcompat.app.AlertDialog; +import androidx.preference.ListPreference; +import androidx.preference.Preference; +import androidx.preference.PreferenceCategory; +import androidx.preference.PreferenceScreen; +import androidx.preference.SwitchPreferenceCompat; + import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.Config; import com.topjohnwu.magisk.Const; @@ -28,13 +35,6 @@ import java.io.IOException; import java.util.Arrays; import java.util.Locale; -import androidx.appcompat.app.AlertDialog; -import androidx.preference.ListPreference; -import androidx.preference.Preference; -import androidx.preference.PreferenceCategory; -import androidx.preference.PreferenceScreen; -import androidx.preference.SwitchPreferenceCompat; - public class SettingsFragment extends BasePreferenceFragment { private ListPreference updateChannel, autoRes, suNotification, diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserFragment.java b/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserFragment.java index 2f5beaf7b..775b00217 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserFragment.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/superuser/SuperuserFragment.java @@ -7,6 +7,9 @@ import android.view.View; import android.view.ViewGroup; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; + import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.model.adapters.PolicyAdapter; import com.topjohnwu.magisk.model.entity.Policy; @@ -14,8 +17,6 @@ import com.topjohnwu.magisk.ui.base.BaseFragment; import java.util.List; -import androidx.annotation.Nullable; -import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; public class SuperuserFragment extends BaseFragment { diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/surequest/SuRequestActivity.java b/app/src/main/java/com/topjohnwu/magisk/ui/surequest/SuRequestActivity.java index 481956be5..b3ea3aee0 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/surequest/SuRequestActivity.java +++ b/app/src/main/java/com/topjohnwu/magisk/ui/surequest/SuRequestActivity.java @@ -17,6 +17,9 @@ import android.widget.LinearLayout; import android.widget.Spinner; import android.widget.TextView; +import androidx.annotation.Nullable; +import androidx.appcompat.content.res.AppCompatResources; + import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.Config; @@ -31,8 +34,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import androidx.annotation.Nullable; -import androidx.appcompat.content.res.AppCompatResources; import butterknife.BindView; import java9.lang.Iterables; diff --git a/app/src/main/java/com/topjohnwu/magisk/utils/PatchAPK.java b/app/src/main/java/com/topjohnwu/magisk/utils/PatchAPK.java index 0d77c058a..fb7c8e678 100644 --- a/app/src/main/java/com/topjohnwu/magisk/utils/PatchAPK.java +++ b/app/src/main/java/com/topjohnwu/magisk/utils/PatchAPK.java @@ -3,6 +3,8 @@ package com.topjohnwu.magisk.utils; import android.content.ComponentName; import android.widget.Toast; +import androidx.core.app.NotificationCompat; + import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.ClassMap; @@ -27,8 +29,6 @@ import java.util.ArrayList; import java.util.List; import java.util.jar.JarEntry; -import androidx.core.app.NotificationCompat; - public class PatchAPK { public static final String LOWERALPHA = "abcdefghijklmnopqrstuvwxyz"; diff --git a/app/src/main/java/com/topjohnwu/magisk/utils/Utils.java b/app/src/main/java/com/topjohnwu/magisk/utils/Utils.java index 1cbcb06d5..2d73d2cf0 100644 --- a/app/src/main/java/com/topjohnwu/magisk/utils/Utils.java +++ b/app/src/main/java/com/topjohnwu/magisk/utils/Utils.java @@ -12,6 +12,12 @@ import android.net.Uri; import android.provider.OpenableColumns; import android.widget.Toast; +import androidx.work.Constraints; +import androidx.work.ExistingPeriodicWorkPolicy; +import androidx.work.NetworkType; +import androidx.work.PeriodicWorkRequest; +import androidx.work.WorkManager; + import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.ClassMap; @@ -30,12 +36,6 @@ import java.util.Locale; import java.util.Map; import java.util.concurrent.TimeUnit; -import androidx.work.Constraints; -import androidx.work.ExistingPeriodicWorkPolicy; -import androidx.work.NetworkType; -import androidx.work.PeriodicWorkRequest; -import androidx.work.WorkManager; - public class Utils { public static void toast(CharSequence msg, int duration) { diff --git a/app/src/main/java/com/topjohnwu/magisk/utils/ValueSortedMap.java b/app/src/main/java/com/topjohnwu/magisk/utils/ValueSortedMap.java index babd8ba79..ff19f1aa3 100644 --- a/app/src/main/java/com/topjohnwu/magisk/utils/ValueSortedMap.java +++ b/app/src/main/java/com/topjohnwu/magisk/utils/ValueSortedMap.java @@ -1,5 +1,7 @@ package com.topjohnwu.magisk.utils; +import androidx.annotation.NonNull; + import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -7,8 +9,6 @@ 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/main/java/com/topjohnwu/magisk/view/MarkDownWindow.java b/app/src/main/java/com/topjohnwu/magisk/view/MarkDownWindow.java index f7e3b3dae..bcf65c8b3 100644 --- a/app/src/main/java/com/topjohnwu/magisk/view/MarkDownWindow.java +++ b/app/src/main/java/com/topjohnwu/magisk/view/MarkDownWindow.java @@ -4,6 +4,8 @@ import android.app.Activity; import android.view.LayoutInflater; import android.view.View; +import androidx.appcompat.app.AlertDialog; + import com.topjohnwu.magisk.R; import com.topjohnwu.net.Networking; import com.topjohnwu.net.ResponseListener; @@ -11,7 +13,6 @@ import com.topjohnwu.net.ResponseListener; import java.io.InputStream; import java.util.Scanner; -import androidx.appcompat.app.AlertDialog; import ru.noties.markwon.Markwon; import ru.noties.markwon.html.HtmlPlugin; import ru.noties.markwon.image.ImagesPlugin; diff --git a/app/src/main/java/com/topjohnwu/magisk/view/Notifications.java b/app/src/main/java/com/topjohnwu/magisk/view/Notifications.java index 244c51b25..c8b1d0817 100644 --- a/app/src/main/java/com/topjohnwu/magisk/view/Notifications.java +++ b/app/src/main/java/com/topjohnwu/magisk/view/Notifications.java @@ -7,6 +7,10 @@ import android.content.Context; import android.content.Intent; import android.os.Build; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationManagerCompat; +import androidx.core.app.TaskStackBuilder; + import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.Config; @@ -16,10 +20,6 @@ import com.topjohnwu.magisk.model.receiver.GeneralReceiver; import com.topjohnwu.magisk.ui.SplashActivity; import com.topjohnwu.magisk.utils.Utils; -import androidx.core.app.NotificationCompat; -import androidx.core.app.NotificationManagerCompat; -import androidx.core.app.TaskStackBuilder; - public class Notifications { public static NotificationManagerCompat mgr = NotificationManagerCompat.from(App.self); diff --git a/app/src/main/java/com/topjohnwu/magisk/view/ProgressNotification.java b/app/src/main/java/com/topjohnwu/magisk/view/ProgressNotification.java index a7ff7721d..e8424c435 100644 --- a/app/src/main/java/com/topjohnwu/magisk/view/ProgressNotification.java +++ b/app/src/main/java/com/topjohnwu/magisk/view/ProgressNotification.java @@ -5,13 +5,13 @@ import android.app.PendingIntent; import android.content.Intent; import android.widget.Toast; +import androidx.core.app.NotificationCompat; + import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.utils.Utils; import com.topjohnwu.net.DownloadProgressListener; -import androidx.core.app.NotificationCompat; - public class ProgressNotification implements DownloadProgressListener { private NotificationCompat.Builder builder; diff --git a/app/src/main/java/com/topjohnwu/magisk/view/SafetyNet.java b/app/src/main/java/com/topjohnwu/magisk/view/SafetyNet.java index 8796bac8d..72ae3a5bb 100644 --- a/app/src/main/java/com/topjohnwu/magisk/view/SafetyNet.java +++ b/app/src/main/java/com/topjohnwu/magisk/view/SafetyNet.java @@ -10,6 +10,9 @@ import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.TextView; +import androidx.annotation.StringRes; +import androidx.cardview.widget.CardView; + import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.Const; import com.topjohnwu.magisk.R; @@ -20,8 +23,6 @@ import com.topjohnwu.superuser.Shell; import java.io.File; -import androidx.annotation.StringRes; -import androidx.cardview.widget.CardView; import butterknife.BindColor; import butterknife.BindView; import butterknife.OnClick; diff --git a/app/src/main/java/com/topjohnwu/magisk/view/Shortcuts.java b/app/src/main/java/com/topjohnwu/magisk/view/Shortcuts.java index ba841564c..1cefd9e52 100644 --- a/app/src/main/java/com/topjohnwu/magisk/view/Shortcuts.java +++ b/app/src/main/java/com/topjohnwu/magisk/view/Shortcuts.java @@ -7,6 +7,8 @@ import android.content.pm.ShortcutManager; import android.graphics.drawable.Icon; import android.os.Build; +import androidx.annotation.RequiresApi; + import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.Config; import com.topjohnwu.magisk.Const; @@ -17,8 +19,6 @@ import com.topjohnwu.superuser.Shell; import java.util.ArrayList; -import androidx.annotation.RequiresApi; - public class Shortcuts { public static void setup(Context context) { diff --git a/app/src/main/java/com/topjohnwu/magisk/view/SnackbarMaker.java b/app/src/main/java/com/topjohnwu/magisk/view/SnackbarMaker.java index dc0f1ca61..f4c4b2ac4 100644 --- a/app/src/main/java/com/topjohnwu/magisk/view/SnackbarMaker.java +++ b/app/src/main/java/com/topjohnwu/magisk/view/SnackbarMaker.java @@ -5,12 +5,12 @@ import android.net.Uri; import android.view.View; import android.widget.TextView; +import androidx.annotation.StringRes; + 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) { diff --git a/app/src/main/java/com/topjohnwu/magisk/view/dialogs/CustomAlertDialog.java b/app/src/main/java/com/topjohnwu/magisk/view/dialogs/CustomAlertDialog.java index 4c6919a33..7287b49e3 100644 --- a/app/src/main/java/com/topjohnwu/magisk/view/dialogs/CustomAlertDialog.java +++ b/app/src/main/java/com/topjohnwu/magisk/view/dialogs/CustomAlertDialog.java @@ -8,13 +8,14 @@ import android.widget.Button; import android.widget.LinearLayout; 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 com.topjohnwu.magisk.R; + import butterknife.BindView; public class CustomAlertDialog extends AlertDialog.Builder { diff --git a/app/src/main/java/com/topjohnwu/magisk/view/dialogs/EnvFixDialog.java b/app/src/main/java/com/topjohnwu/magisk/view/dialogs/EnvFixDialog.java index 95e1364b6..4d974e358 100644 --- a/app/src/main/java/com/topjohnwu/magisk/view/dialogs/EnvFixDialog.java +++ b/app/src/main/java/com/topjohnwu/magisk/view/dialogs/EnvFixDialog.java @@ -4,6 +4,8 @@ import android.app.Activity; import android.app.ProgressDialog; import android.widget.Toast; +import androidx.annotation.NonNull; + import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.tasks.MagiskInstaller; import com.topjohnwu.magisk.utils.RootUtils; @@ -12,8 +14,6 @@ import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.internal.UiThreadHandler; import com.topjohnwu.superuser.io.SuFile; -import androidx.annotation.NonNull; - public class EnvFixDialog extends CustomAlertDialog { public EnvFixDialog(@NonNull Activity activity) { diff --git a/app/src/main/java/com/topjohnwu/magisk/view/dialogs/FingerprintAuthDialog.java b/app/src/main/java/com/topjohnwu/magisk/view/dialogs/FingerprintAuthDialog.java index d9f7642e2..92bb88e97 100644 --- a/app/src/main/java/com/topjohnwu/magisk/view/dialogs/FingerprintAuthDialog.java +++ b/app/src/main/java/com/topjohnwu/magisk/view/dialogs/FingerprintAuthDialog.java @@ -11,13 +11,13 @@ import android.os.Build; import android.view.Gravity; import android.widget.Toast; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; + import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.utils.FingerprintHelper; import com.topjohnwu.magisk.utils.Utils; -import androidx.annotation.NonNull; -import androidx.appcompat.app.AlertDialog; - @TargetApi(Build.VERSION_CODES.M) public class FingerprintAuthDialog extends CustomAlertDialog { diff --git a/app/src/main/java/com/topjohnwu/magisk/view/dialogs/InstallMethodDialog.java b/app/src/main/java/com/topjohnwu/magisk/view/dialogs/InstallMethodDialog.java index 6b2970c1f..4ba97f55a 100644 --- a/app/src/main/java/com/topjohnwu/magisk/view/dialogs/InstallMethodDialog.java +++ b/app/src/main/java/com/topjohnwu/magisk/view/dialogs/InstallMethodDialog.java @@ -4,6 +4,8 @@ import android.app.Activity; import android.content.Intent; import android.widget.Toast; +import androidx.appcompat.app.AlertDialog; + import com.google.android.material.snackbar.Snackbar; import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.Config; @@ -19,8 +21,6 @@ import com.topjohnwu.net.Networking; import java.io.File; import java.util.List; -import androidx.appcompat.app.AlertDialog; - class InstallMethodDialog extends AlertDialog.Builder { InstallMethodDialog(BaseActivity activity, List options) { diff --git a/app/src/main/java/com/topjohnwu/magisk/view/dialogs/ManagerInstallDialog.java b/app/src/main/java/com/topjohnwu/magisk/view/dialogs/ManagerInstallDialog.java index debb76719..4863f0daa 100644 --- a/app/src/main/java/com/topjohnwu/magisk/view/dialogs/ManagerInstallDialog.java +++ b/app/src/main/java/com/topjohnwu/magisk/view/dialogs/ManagerInstallDialog.java @@ -3,14 +3,14 @@ package com.topjohnwu.magisk.view.dialogs; import android.app.Activity; import android.text.TextUtils; +import androidx.annotation.NonNull; + import com.topjohnwu.magisk.Config; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.utils.DownloadApp; import com.topjohnwu.magisk.utils.Utils; import com.topjohnwu.magisk.view.MarkDownWindow; -import androidx.annotation.NonNull; - public class ManagerInstallDialog extends CustomAlertDialog { public ManagerInstallDialog(@NonNull Activity a) { diff --git a/app/src/main/java/com/topjohnwu/magisk/view/dialogs/UninstallDialog.java b/app/src/main/java/com/topjohnwu/magisk/view/dialogs/UninstallDialog.java index 4fae38407..eae2dbbd4 100644 --- a/app/src/main/java/com/topjohnwu/magisk/view/dialogs/UninstallDialog.java +++ b/app/src/main/java/com/topjohnwu/magisk/view/dialogs/UninstallDialog.java @@ -7,6 +7,8 @@ import android.net.Uri; import android.text.TextUtils; import android.widget.Toast; +import androidx.annotation.NonNull; + import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.Config; import com.topjohnwu.magisk.Const; @@ -19,8 +21,6 @@ import com.topjohnwu.superuser.Shell; import java.io.File; -import androidx.annotation.NonNull; - public class UninstallDialog extends CustomAlertDialog { public UninstallDialog(@NonNull Activity activity) { diff --git a/build.gradle b/build.gradle index 471d50845..b2fd9b603 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,7 @@ buildscript { } dependencies { classpath 'com.android.tools:r8:1.4.79' - classpath 'com.android.tools.build:gradle:3.3.2' + classpath 'com.android.tools.build:gradle:3.5.0-alpha10' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21"