From 32c65d8a88ad813b2e644b2e93e9024f58329910 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 7 Mar 2019 03:41:24 -0500 Subject: [PATCH] Upgrade Android Studio --- .../main/java/com/topjohnwu/magisk/Const.java | 2 -- .../magisk/container/BaseModule.java | 4 ++-- .../topjohnwu/magisk/container/Policy.java | 4 ++-- .../magisk/container/ValueSortedMap.java | 4 ++-- .../magisk/tasks/MagiskInstaller.java | 6 +++--- .../topjohnwu/magisk/utils/LocaleManager.java | 4 ++-- .../com/topjohnwu/magisk/utils/RootUtils.java | 4 ++-- .../com/topjohnwu/magisk/utils/Topic.java | 4 ++-- .../com/topjohnwu/magisk/FlashActivity.java | 9 +++++---- .../com/topjohnwu/magisk/MainActivity.java | 13 +++++++------ .../com/topjohnwu/magisk/SplashActivity.java | 4 ++-- .../topjohnwu/magisk/SuRequestActivity.java | 6 +++--- .../magisk/adapters/ModulesAdapter.java | 5 +++-- .../magisk/adapters/PolicyAdapter.java | 7 ++++--- .../magisk/adapters/ReposAdapter.java | 3 ++- .../magisk/adapters/StringListAdapter.java | 4 ++-- .../magisk/adapters/SuLogAdapter.java | 3 ++- .../magisk/adapters/TabFragmentAdapter.java | 6 +++--- .../magisk/components/BaseActivity.java | 14 +++++++------- .../magisk/components/BaseFragment.java | 3 ++- .../components/BasePreferenceFragment.java | 8 ++++---- .../magisk/components/DelegateWorker.java | 12 ++++++------ .../components/DownloadModuleService.java | 4 ++-- .../magisk/components/UpdateCheckService.java | 6 +++--- .../magisk/dialogs/CustomAlertDialog.java | 5 +++-- .../magisk/dialogs/EnvFixDialog.java | 4 ++-- .../magisk/dialogs/FingerprintAuthDialog.java | 6 +++--- .../magisk/dialogs/InstallMethodDialog.java | 4 ++-- .../magisk/dialogs/ManagerInstallDialog.java | 4 ++-- .../magisk/dialogs/UninstallDialog.java | 4 ++-- .../magisk/fragments/LogFragment.java | 3 ++- .../magisk/fragments/MagiskFragment.java | 19 ++++++++++--------- .../magisk/fragments/MagiskHideFragment.java | 9 +++++---- .../magisk/fragments/MagiskLogFragment.java | 7 ++++--- .../magisk/fragments/ModulesFragment.java | 9 +++++---- .../magisk/fragments/ReposFragment.java | 9 +++++---- .../magisk/fragments/SettingsFragment.java | 14 +++++++------- .../magisk/fragments/SuLogFragment.java | 5 +++-- .../magisk/fragments/SuperuserFragment.java | 5 +++-- .../magisk/uicomponents/MarkDownWindow.java | 5 +++-- .../magisk/uicomponents/Notifications.java | 8 ++++---- .../uicomponents/ProgressNotification.java | 4 ++-- .../magisk/uicomponents/SafetyNet.java | 5 +++-- .../magisk/uicomponents/Shortcuts.java | 4 ++-- .../magisk/uicomponents/SnackbarMaker.java | 4 ++-- .../com/topjohnwu/magisk/utils/AppUtils.java | 12 ++++++------ .../com/topjohnwu/magisk/utils/PatchAPK.java | 4 ++-- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 4 ++-- .../java/com/topjohnwu/net/BadRequest.java | 1 - 50 files changed, 157 insertions(+), 142 deletions(-) diff --git a/app-core/src/main/java/com/topjohnwu/magisk/Const.java b/app-core/src/main/java/com/topjohnwu/magisk/Const.java index 945010514..4eb01cfa2 100644 --- a/app-core/src/main/java/com/topjohnwu/magisk/Const.java +++ b/app-core/src/main/java/com/topjohnwu/magisk/Const.java @@ -4,8 +4,6 @@ import android.os.Environment; import android.os.Process; import java.io.File; -import java.util.Arrays; -import java.util.List; public class Const { diff --git a/app-core/src/main/java/com/topjohnwu/magisk/container/BaseModule.java b/app-core/src/main/java/com/topjohnwu/magisk/container/BaseModule.java index 58cbf4e91..eeb536625 100644 --- a/app-core/src/main/java/com/topjohnwu/magisk/container/BaseModule.java +++ b/app-core/src/main/java/com/topjohnwu/magisk/container/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-core/src/main/java/com/topjohnwu/magisk/container/Policy.java b/app-core/src/main/java/com/topjohnwu/magisk/container/Policy.java index 3897ab5dc..6ff51f25a 100644 --- a/app-core/src/main/java/com/topjohnwu/magisk/container/Policy.java +++ b/app-core/src/main/java/com/topjohnwu/magisk/container/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-core/src/main/java/com/topjohnwu/magisk/container/ValueSortedMap.java b/app-core/src/main/java/com/topjohnwu/magisk/container/ValueSortedMap.java index 23be3c4d0..9f5047d75 100644 --- a/app-core/src/main/java/com/topjohnwu/magisk/container/ValueSortedMap.java +++ b/app-core/src/main/java/com/topjohnwu/magisk/container/ValueSortedMap.java @@ -1,5 +1,7 @@ package com.topjohnwu.magisk.container; +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-core/src/main/java/com/topjohnwu/magisk/tasks/MagiskInstaller.java b/app-core/src/main/java/com/topjohnwu/magisk/tasks/MagiskInstaller.java index d4c56a443..7cb8f2a9c 100644 --- a/app-core/src/main/java/com/topjohnwu/magisk/tasks/MagiskInstaller.java +++ b/app-core/src/main/java/com/topjohnwu/magisk/tasks/MagiskInstaller.java @@ -4,6 +4,9 @@ import android.net.Uri; import android.os.Build; import android.text.TextUtils; +import androidx.annotation.MainThread; +import androidx.annotation.WorkerThread; + import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.Config; import com.topjohnwu.magisk.Const; @@ -37,9 +40,6 @@ import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; -import androidx.annotation.MainThread; -import androidx.annotation.WorkerThread; - public abstract class MagiskInstaller { private List console, logs; diff --git a/app-core/src/main/java/com/topjohnwu/magisk/utils/LocaleManager.java b/app-core/src/main/java/com/topjohnwu/magisk/utils/LocaleManager.java index 3b0d4a3b6..680e60c6d 100644 --- a/app-core/src/main/java/com/topjohnwu/magisk/utils/LocaleManager.java +++ b/app-core/src/main/java/com/topjohnwu/magisk/utils/LocaleManager.java @@ -6,6 +6,8 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.os.Build; +import androidx.annotation.StringRes; + import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.Config; import com.topjohnwu.superuser.Shell; @@ -17,8 +19,6 @@ 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-core/src/main/java/com/topjohnwu/magisk/utils/RootUtils.java b/app-core/src/main/java/com/topjohnwu/magisk/utils/RootUtils.java index b49ef02d9..b28b16490 100644 --- a/app-core/src/main/java/com/topjohnwu/magisk/utils/RootUtils.java +++ b/app-core/src/main/java/com/topjohnwu/magisk/utils/RootUtils.java @@ -2,6 +2,8 @@ package com.topjohnwu.magisk.utils; import android.content.Context; +import androidx.annotation.NonNull; + import com.topjohnwu.magisk.Config; import com.topjohnwu.magisk.Const; import com.topjohnwu.magisk.core.R; @@ -11,8 +13,6 @@ import com.topjohnwu.superuser.io.SuFile; import java.io.InputStream; -import androidx.annotation.NonNull; - public class RootUtils extends Shell.Initializer { public static void rmAndLaunch(String rm, String launch) { diff --git a/app-core/src/main/java/com/topjohnwu/magisk/utils/Topic.java b/app-core/src/main/java/com/topjohnwu/magisk/utils/Topic.java index 886689524..b6d23926a 100644 --- a/app-core/src/main/java/com/topjohnwu/magisk/utils/Topic.java +++ b/app-core/src/main/java/com/topjohnwu/magisk/utils/Topic.java @@ -1,5 +1,7 @@ package com.topjohnwu.magisk.utils; +import androidx.annotation.IntDef; + import com.topjohnwu.superuser.internal.UiThreadHandler; import java.lang.annotation.Retention; @@ -7,8 +9,6 @@ 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/java/com/topjohnwu/magisk/FlashActivity.java b/app/src/full/java/com/topjohnwu/magisk/FlashActivity.java index 095bbefca..e779016ae 100644 --- a/app/src/full/java/com/topjohnwu/magisk/FlashActivity.java +++ b/app/src/full/java/com/topjohnwu/magisk/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.adapters.StringListAdapter; import com.topjohnwu.magisk.components.BaseActivity; import com.topjohnwu.magisk.tasks.FlashZip; @@ -26,10 +31,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/full/java/com/topjohnwu/magisk/MainActivity.java b/app/src/full/java/com/topjohnwu/magisk/MainActivity.java index 6514cddd4..9b4a8082f 100644 --- a/app/src/full/java/com/topjohnwu/magisk/MainActivity.java +++ b/app/src/full/java/com/topjohnwu/magisk/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.components.BaseActivity; import com.topjohnwu.magisk.fragments.LogFragment; @@ -22,12 +29,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/full/java/com/topjohnwu/magisk/SplashActivity.java b/app/src/full/java/com/topjohnwu/magisk/SplashActivity.java index c91b290f5..add260199 100644 --- a/app/src/full/java/com/topjohnwu/magisk/SplashActivity.java +++ b/app/src/full/java/com/topjohnwu/magisk/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.components.BaseActivity; import com.topjohnwu.magisk.database.RepoDatabaseHelper; import com.topjohnwu.magisk.tasks.UpdateRepos; @@ -16,8 +18,6 @@ import com.topjohnwu.magisk.utils.Utils; import com.topjohnwu.net.Networking; import com.topjohnwu.superuser.Shell; -import androidx.appcompat.app.AlertDialog; - public class SplashActivity extends BaseActivity { @Override diff --git a/app/src/full/java/com/topjohnwu/magisk/SuRequestActivity.java b/app/src/full/java/com/topjohnwu/magisk/SuRequestActivity.java index 260b9c518..67b636c06 100644 --- a/app/src/full/java/com/topjohnwu/magisk/SuRequestActivity.java +++ b/app/src/full/java/com/topjohnwu/magisk/SuRequestActivity.java @@ -4,7 +4,6 @@ import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.hardware.fingerprint.FingerprintManager; -import android.os.Build; import android.os.Bundle; import android.os.CountDownTimer; import android.text.TextUtils; @@ -17,6 +16,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.components.BaseActivity; import com.topjohnwu.magisk.container.Policy; import com.topjohnwu.magisk.utils.FingerprintHelper; @@ -25,8 +27,6 @@ import com.topjohnwu.magisk.utils.Utils; import java.io.IOException; -import androidx.annotation.Nullable; -import androidx.appcompat.content.res.AppCompatResources; import butterknife.BindView; public class SuRequestActivity extends BaseActivity { 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 24cd83fcb..604cba6f5 100644 --- a/app/src/full/java/com/topjohnwu/magisk/adapters/ModulesAdapter.java +++ b/app/src/full/java/com/topjohnwu/magisk/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.container.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/full/java/com/topjohnwu/magisk/adapters/PolicyAdapter.java b/app/src/full/java/com/topjohnwu/magisk/adapters/PolicyAdapter.java index 95bc6a946..4a59f7769 100644 --- a/app/src/full/java/com/topjohnwu/magisk/adapters/PolicyAdapter.java +++ b/app/src/full/java/com/topjohnwu/magisk/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.container.Policy; @@ -22,9 +26,6 @@ import com.topjohnwu.magisk.utils.FingerprintHelper; 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/full/java/com/topjohnwu/magisk/adapters/ReposAdapter.java b/app/src/full/java/com/topjohnwu/magisk/adapters/ReposAdapter.java index 15101fb27..01ac6ab48 100644 --- a/app/src/full/java/com/topjohnwu/magisk/adapters/ReposAdapter.java +++ b/app/src/full/java/com/topjohnwu/magisk/adapters/ReposAdapter.java @@ -12,6 +12,8 @@ import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; +import androidx.recyclerview.widget.RecyclerView; + import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.components.BaseActivity; @@ -26,7 +28,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; public class ReposAdapter extends SectionedAdapter { diff --git a/app/src/full/java/com/topjohnwu/magisk/adapters/StringListAdapter.java b/app/src/full/java/com/topjohnwu/magisk/adapters/StringListAdapter.java index 0aacad2e8..fb13c87bd 100644 --- a/app/src/full/java/com/topjohnwu/magisk/adapters/StringListAdapter.java +++ b/app/src/full/java/com/topjohnwu/magisk/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/full/java/com/topjohnwu/magisk/adapters/SuLogAdapter.java b/app/src/full/java/com/topjohnwu/magisk/adapters/SuLogAdapter.java index 167e32c9b..84c0a3449 100644 --- a/app/src/full/java/com/topjohnwu/magisk/adapters/SuLogAdapter.java +++ b/app/src/full/java/com/topjohnwu/magisk/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.container.SuLogEntry; import com.topjohnwu.magisk.database.MagiskDB; @@ -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/full/java/com/topjohnwu/magisk/adapters/TabFragmentAdapter.java b/app/src/full/java/com/topjohnwu/magisk/adapters/TabFragmentAdapter.java index da75cf222..d0eea2be7 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 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/full/java/com/topjohnwu/magisk/components/BaseActivity.java b/app/src/full/java/com/topjohnwu/magisk/components/BaseActivity.java index 9512ef543..672bd0933 100644 --- a/app/src/full/java/com/topjohnwu/magisk/components/BaseActivity.java +++ b/app/src/full/java/com/topjohnwu/magisk/components/BaseActivity.java @@ -10,13 +10,6 @@ import android.text.TextUtils; import android.view.WindowManager; import android.widget.Toast; -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.LocaleManager; -import com.topjohnwu.magisk.utils.Topic; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.StyleRes; @@ -25,6 +18,13 @@ import androidx.appcompat.app.AppCompatDelegate; 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.LocaleManager; +import com.topjohnwu.magisk.utils.Topic; + public abstract class BaseActivity extends AppCompatActivity implements Topic.AutoSubscriber { public static final String INTENT_PERM = "perm_dialog"; 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 a3c0e8b6d..d3fa9a887 100644 --- a/app/src/full/java/com/topjohnwu/magisk/components/BaseFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/components/BaseFragment.java @@ -2,10 +2,11 @@ package com.topjohnwu.magisk.components; import android.content.Intent; +import androidx.fragment.app.Fragment; + import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.utils.Topic; -import androidx.fragment.app.Fragment; import butterknife.Unbinder; public abstract class BaseFragment extends Fragment implements Topic.AutoSubscriber { diff --git a/app/src/full/java/com/topjohnwu/magisk/components/BasePreferenceFragment.java b/app/src/full/java/com/topjohnwu/magisk/components/BasePreferenceFragment.java index 842b6a1db..7e1cc85ff 100644 --- a/app/src/full/java/com/topjohnwu/magisk/components/BasePreferenceFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/components/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.Topic; - 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.Topic; + public abstract class BasePreferenceFragment extends PreferenceFragmentCompat implements SharedPreferences.OnSharedPreferenceChangeListener, Topic.AutoSubscriber { diff --git a/app/src/full/java/com/topjohnwu/magisk/components/DelegateWorker.java b/app/src/full/java/com/topjohnwu/magisk/components/DelegateWorker.java index 7e6d392fb..609cbb114 100644 --- a/app/src/full/java/com/topjohnwu/magisk/components/DelegateWorker.java +++ b/app/src/full/java/com/topjohnwu/magisk/components/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/full/java/com/topjohnwu/magisk/components/DownloadModuleService.java b/app/src/full/java/com/topjohnwu/magisk/components/DownloadModuleService.java index b8413e944..f0557b4b2 100644 --- a/app/src/full/java/com/topjohnwu/magisk/components/DownloadModuleService.java +++ b/app/src/full/java/com/topjohnwu/magisk/components/DownloadModuleService.java @@ -6,6 +6,8 @@ import android.net.Uri; import android.os.IBinder; import android.widget.Toast; +import androidx.annotation.Nullable; + import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.Const; import com.topjohnwu.magisk.FlashActivity; @@ -27,8 +29,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 boolean running = false; diff --git a/app/src/full/java/com/topjohnwu/magisk/components/UpdateCheckService.java b/app/src/full/java/com/topjohnwu/magisk/components/UpdateCheckService.java index 416b04ab2..bacf5da85 100644 --- a/app/src/full/java/com/topjohnwu/magisk/components/UpdateCheckService.java +++ b/app/src/full/java/com/topjohnwu/magisk/components/UpdateCheckService.java @@ -1,14 +1,14 @@ package com.topjohnwu.magisk.components; +import androidx.annotation.NonNull; +import androidx.work.ListenableWorker; + import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.Config; import com.topjohnwu.magisk.tasks.CheckUpdates; import com.topjohnwu.magisk.uicomponents.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/full/java/com/topjohnwu/magisk/dialogs/CustomAlertDialog.java b/app/src/full/java/com/topjohnwu/magisk/dialogs/CustomAlertDialog.java index c1a075cf2..e45ea5cdd 100644 --- a/app/src/full/java/com/topjohnwu/magisk/dialogs/CustomAlertDialog.java +++ b/app/src/full/java/com/topjohnwu/magisk/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/full/java/com/topjohnwu/magisk/dialogs/EnvFixDialog.java b/app/src/full/java/com/topjohnwu/magisk/dialogs/EnvFixDialog.java index 684e88d57..2a3263409 100644 --- a/app/src/full/java/com/topjohnwu/magisk/dialogs/EnvFixDialog.java +++ b/app/src/full/java/com/topjohnwu/magisk/dialogs/EnvFixDialog.java @@ -5,6 +5,8 @@ import android.app.ProgressDialog; import android.content.Intent; import android.widget.Toast; +import androidx.annotation.NonNull; + import com.topjohnwu.magisk.ClassMap; import com.topjohnwu.magisk.R; import com.topjohnwu.magisk.SplashActivity; @@ -15,8 +17,6 @@ import com.topjohnwu.superuser.io.SuFile; import java.io.IOException; -import androidx.annotation.NonNull; - public class EnvFixDialog extends CustomAlertDialog { public EnvFixDialog(@NonNull Activity activity) { diff --git a/app/src/full/java/com/topjohnwu/magisk/dialogs/FingerprintAuthDialog.java b/app/src/full/java/com/topjohnwu/magisk/dialogs/FingerprintAuthDialog.java index d44440ef3..725e1f54d 100644 --- a/app/src/full/java/com/topjohnwu/magisk/dialogs/FingerprintAuthDialog.java +++ b/app/src/full/java/com/topjohnwu/magisk/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/full/java/com/topjohnwu/magisk/dialogs/InstallMethodDialog.java b/app/src/full/java/com/topjohnwu/magisk/dialogs/InstallMethodDialog.java index 6f3cb6ca0..beefd622b 100644 --- a/app/src/full/java/com/topjohnwu/magisk/dialogs/InstallMethodDialog.java +++ b/app/src/full/java/com/topjohnwu/magisk/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/full/java/com/topjohnwu/magisk/dialogs/ManagerInstallDialog.java b/app/src/full/java/com/topjohnwu/magisk/dialogs/ManagerInstallDialog.java index c08ac8630..d13d5372f 100644 --- a/app/src/full/java/com/topjohnwu/magisk/dialogs/ManagerInstallDialog.java +++ b/app/src/full/java/com/topjohnwu/magisk/dialogs/ManagerInstallDialog.java @@ -3,14 +3,14 @@ package com.topjohnwu.magisk.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.uicomponents.MarkDownWindow; import com.topjohnwu.magisk.utils.DownloadApp; import com.topjohnwu.magisk.utils.Utils; -import androidx.annotation.NonNull; - public class ManagerInstallDialog extends CustomAlertDialog { public ManagerInstallDialog(@NonNull Activity a) { diff --git a/app/src/full/java/com/topjohnwu/magisk/dialogs/UninstallDialog.java b/app/src/full/java/com/topjohnwu/magisk/dialogs/UninstallDialog.java index dd0afc243..8460e314f 100644 --- a/app/src/full/java/com/topjohnwu/magisk/dialogs/UninstallDialog.java +++ b/app/src/full/java/com/topjohnwu/magisk/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/app/src/full/java/com/topjohnwu/magisk/fragments/LogFragment.java b/app/src/full/java/com/topjohnwu/magisk/fragments/LogFragment.java index 96781b001..d068b3bb1 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/LogFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/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.MainActivity; 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; public class LogFragment extends BaseFragment { 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 c810cc70f..29b13f043 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/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; @@ -33,15 +43,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/full/java/com/topjohnwu/magisk/fragments/MagiskHideFragment.java b/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskHideFragment.java index 5eaa1c45a..c7bae793a 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskHideFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/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.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; public class MagiskHideFragment extends BaseFragment implements Topic.Subscriber { 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 c321ef336..cf546e97d 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskLogFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/MagiskLogFragment.java @@ -9,6 +9,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; @@ -24,9 +28,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/full/java/com/topjohnwu/magisk/fragments/ModulesFragment.java b/app/src/full/java/com/topjohnwu/magisk/fragments/ModulesFragment.java index d8aba23ba..32188b283 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/ModulesFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/ModulesFragment.java @@ -12,6 +12,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.FlashActivity; @@ -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/full/java/com/topjohnwu/magisk/fragments/ReposFragment.java b/app/src/full/java/com/topjohnwu/magisk/fragments/ReposFragment.java index 034c0f519..2ef28eabd 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/ReposFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/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.adapters.ReposAdapter; @@ -21,10 +26,6 @@ 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; public class ReposFragment extends BaseFragment implements Topic.Subscriber { 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 c709c8764..0334a42b6 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/SettingsFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/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 com.topjohnwu.superuser.Shell; 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.PreferenceScreen; -import androidx.preference.SwitchPreferenceCompat; - public class SettingsFragment extends BasePreferenceFragment implements Topic.Subscriber { private ListPreference updateChannel, autoRes, suNotification, 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 da0c87110..e22b415e6 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/SuLogFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/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.adapters.SuLogAdapter; import com.topjohnwu.magisk.components.BaseFragment; -import androidx.annotation.Nullable; -import androidx.recyclerview.widget.RecyclerView; import butterknife.BindView; public class SuLogFragment extends BaseFragment { 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 7e459d290..26132abb7 100644 --- a/app/src/full/java/com/topjohnwu/magisk/fragments/SuperuserFragment.java +++ b/app/src/full/java/com/topjohnwu/magisk/fragments/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.adapters.PolicyAdapter; import com.topjohnwu.magisk.components.BaseFragment; @@ -14,8 +17,6 @@ import com.topjohnwu.magisk.container.Policy; 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/full/java/com/topjohnwu/magisk/uicomponents/MarkDownWindow.java b/app/src/full/java/com/topjohnwu/magisk/uicomponents/MarkDownWindow.java index 61748bc8e..c0a64e538 100644 --- a/app/src/full/java/com/topjohnwu/magisk/uicomponents/MarkDownWindow.java +++ b/app/src/full/java/com/topjohnwu/magisk/uicomponents/MarkDownWindow.java @@ -8,6 +8,9 @@ import android.graphics.drawable.Drawable; import android.view.LayoutInflater; import android.view.View; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; + import com.caverock.androidsvg.SVG; import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.R; @@ -22,8 +25,6 @@ import java.io.IOException; import java.io.InputStream; import java.util.concurrent.Callable; -import androidx.annotation.NonNull; -import androidx.appcompat.app.AlertDialog; import ru.noties.markwon.Markwon; import ru.noties.markwon.SpannableConfiguration; import ru.noties.markwon.spans.AsyncDrawable; diff --git a/app/src/full/java/com/topjohnwu/magisk/uicomponents/Notifications.java b/app/src/full/java/com/topjohnwu/magisk/uicomponents/Notifications.java index 6c13781f2..e90956f35 100644 --- a/app/src/full/java/com/topjohnwu/magisk/uicomponents/Notifications.java +++ b/app/src/full/java/com/topjohnwu/magisk/uicomponents/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.SplashActivity; import com.topjohnwu.magisk.components.GeneralReceiver; 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/full/java/com/topjohnwu/magisk/uicomponents/ProgressNotification.java b/app/src/full/java/com/topjohnwu/magisk/uicomponents/ProgressNotification.java index 56ccef491..fedd2d01f 100644 --- a/app/src/full/java/com/topjohnwu/magisk/uicomponents/ProgressNotification.java +++ b/app/src/full/java/com/topjohnwu/magisk/uicomponents/ProgressNotification.java @@ -3,13 +3,13 @@ package com.topjohnwu.magisk.uicomponents; import android.app.Notification; 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/full/java/com/topjohnwu/magisk/uicomponents/SafetyNet.java b/app/src/full/java/com/topjohnwu/magisk/uicomponents/SafetyNet.java index ab77e30f4..8b08d9674 100644 --- a/app/src/full/java/com/topjohnwu/magisk/uicomponents/SafetyNet.java +++ b/app/src/full/java/com/topjohnwu/magisk/uicomponents/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/full/java/com/topjohnwu/magisk/uicomponents/Shortcuts.java b/app/src/full/java/com/topjohnwu/magisk/uicomponents/Shortcuts.java index 33a087018..a0c313556 100644 --- a/app/src/full/java/com/topjohnwu/magisk/uicomponents/Shortcuts.java +++ b/app/src/full/java/com/topjohnwu/magisk/uicomponents/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/full/java/com/topjohnwu/magisk/uicomponents/SnackbarMaker.java b/app/src/full/java/com/topjohnwu/magisk/uicomponents/SnackbarMaker.java index 8a57bfe2b..431eb2221 100644 --- a/app/src/full/java/com/topjohnwu/magisk/uicomponents/SnackbarMaker.java +++ b/app/src/full/java/com/topjohnwu/magisk/uicomponents/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/full/java/com/topjohnwu/magisk/utils/AppUtils.java b/app/src/full/java/com/topjohnwu/magisk/utils/AppUtils.java index 1f3dda5ee..8e4d3c7bb 100644 --- a/app/src/full/java/com/topjohnwu/magisk/utils/AppUtils.java +++ b/app/src/full/java/com/topjohnwu/magisk/utils/AppUtils.java @@ -5,6 +5,12 @@ import android.content.Intent; import android.net.Uri; 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.ClassMap; import com.topjohnwu.magisk.Config; import com.topjohnwu.magisk.Const; @@ -14,12 +20,6 @@ import com.topjohnwu.magisk.tasks.CheckUpdates; 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 AppUtils { public static void scheduleUpdateCheck() { diff --git a/app/src/full/java/com/topjohnwu/magisk/utils/PatchAPK.java b/app/src/full/java/com/topjohnwu/magisk/utils/PatchAPK.java index d8989d03d..6c5770ef9 100644 --- a/app/src/full/java/com/topjohnwu/magisk/utils/PatchAPK.java +++ b/app/src/full/java/com/topjohnwu/magisk/utils/PatchAPK.java @@ -2,6 +2,8 @@ package com.topjohnwu.magisk.utils; import android.widget.Toast; +import androidx.core.app.NotificationCompat; + import com.topjohnwu.magisk.App; import com.topjohnwu.magisk.BuildConfig; import com.topjohnwu.magisk.Config; @@ -24,8 +26,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/build.gradle b/build.gradle index 336a4f9d6..1e5a1df27 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.3.2' + classpath 'com.android.tools.build:gradle:3.5.0-alpha06' // NOTE: Do not place your application dependencies here; they belong diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 452e1fa10..08c7ffcb7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Jan 14 14:36:28 EST 2019 +#Thu Mar 07 02:26:20 EST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip diff --git a/net/src/main/java/com/topjohnwu/net/BadRequest.java b/net/src/main/java/com/topjohnwu/net/BadRequest.java index 76923d055..f6be4ef78 100644 --- a/net/src/main/java/com/topjohnwu/net/BadRequest.java +++ b/net/src/main/java/com/topjohnwu/net/BadRequest.java @@ -6,7 +6,6 @@ import org.json.JSONObject; import java.io.File; import java.io.IOException; import java.io.InputStream; -import java.util.concurrent.Executor; class BadRequest extends Request {