Updated locations of nearly all files
This has been done in preparations for rewrite to kotlin and upcoming design changes. Nothing should be broken but use caution.
This commit is contained in:
parent
f006a85fec
commit
bea5308ab7
7
app/proguard-rules.pro
vendored
7
app/proguard-rules.pro
vendored
@ -30,7 +30,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
# DelegateWorker
|
# DelegateWorker
|
||||||
-keep,allowobfuscation class * extends com.topjohnwu.magisk.components.DelegateWorker
|
-keep,allowobfuscation class * extends com.topjohnwu.magisk.model.worker.DelegateWorker
|
||||||
|
|
||||||
# BootSigner
|
# BootSigner
|
||||||
-keepclassmembers class com.topjohnwu.signing.BootSigner { *; }
|
-keepclassmembers class com.topjohnwu.signing.BootSigner { *; }
|
||||||
@ -49,3 +49,8 @@
|
|||||||
# Excessive obfuscation
|
# Excessive obfuscation
|
||||||
-repackageclasses 'a'
|
-repackageclasses 'a'
|
||||||
-allowaccessmodification
|
-allowaccessmodification
|
||||||
|
|
||||||
|
# QOL
|
||||||
|
-dontnote **
|
||||||
|
-dontwarn com.caverock.androidsvg.**
|
||||||
|
-dontwarn ru.noties.markwon.**
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package a;
|
package a;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.MainActivity;
|
import com.topjohnwu.magisk.ui.MainActivity;
|
||||||
|
|
||||||
public class b extends MainActivity {
|
public class b extends MainActivity {
|
||||||
/* stub */
|
/* stub */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package a;
|
package a;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.SplashActivity;
|
import com.topjohnwu.magisk.ui.SplashActivity;
|
||||||
|
|
||||||
public class c extends SplashActivity {
|
public class c extends SplashActivity {
|
||||||
/* stub */
|
/* stub */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package a;
|
package a;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.FlashActivity;
|
import com.topjohnwu.magisk.ui.flash.FlashActivity;
|
||||||
|
|
||||||
public class f extends FlashActivity {
|
public class f extends FlashActivity {
|
||||||
/* stub */
|
/* stub */
|
||||||
|
@ -2,7 +2,7 @@ package a;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.components.UpdateCheckService;
|
import com.topjohnwu.magisk.model.update.UpdateCheckService;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.work.WorkerParameters;
|
import androidx.work.WorkerParameters;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package a;
|
package a;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.components.GeneralReceiver;
|
import com.topjohnwu.magisk.model.receiver.GeneralReceiver;
|
||||||
|
|
||||||
public class h extends GeneralReceiver {
|
public class h extends GeneralReceiver {
|
||||||
/* stub */
|
/* stub */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package a;
|
package a;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.components.DownloadModuleService;
|
import com.topjohnwu.magisk.model.download.DownloadModuleService;
|
||||||
|
|
||||||
public class j extends DownloadModuleService {
|
public class j extends DownloadModuleService {
|
||||||
/* stub */
|
/* stub */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package a;
|
package a;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.SuRequestActivity;
|
import com.topjohnwu.magisk.ui.surequest.SuRequestActivity;
|
||||||
|
|
||||||
public class m extends SuRequestActivity {
|
public class m extends SuRequestActivity {
|
||||||
/* stub */
|
/* stub */
|
||||||
|
@ -2,7 +2,7 @@ package a;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.components.DelegateWorker;
|
import com.topjohnwu.magisk.model.worker.DelegateWorker;
|
||||||
|
|
||||||
import java.lang.reflect.ParameterizedType;
|
import java.lang.reflect.ParameterizedType;
|
||||||
|
|
||||||
|
@ -10,13 +10,9 @@ import android.os.Build;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import com.topjohnwu.magisk.data.database.MagiskDB;
|
||||||
import androidx.annotation.Nullable;
|
import com.topjohnwu.magisk.data.database.RepoDatabaseHelper;
|
||||||
import androidx.appcompat.app.AppCompatDelegate;
|
import com.topjohnwu.magisk.ui.base.BaseActivity;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.components.BaseActivity;
|
|
||||||
import com.topjohnwu.magisk.database.MagiskDB;
|
|
||||||
import com.topjohnwu.magisk.database.RepoDatabaseHelper;
|
|
||||||
import com.topjohnwu.magisk.utils.LocaleManager;
|
import com.topjohnwu.magisk.utils.LocaleManager;
|
||||||
import com.topjohnwu.magisk.utils.RootUtils;
|
import com.topjohnwu.magisk.utils.RootUtils;
|
||||||
import com.topjohnwu.net.Networking;
|
import com.topjohnwu.net.Networking;
|
||||||
@ -24,6 +20,10 @@ import com.topjohnwu.superuser.Shell;
|
|||||||
|
|
||||||
import java.util.concurrent.ThreadPoolExecutor;
|
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 class App extends Application implements Application.ActivityLifecycleCallbacks {
|
||||||
|
|
||||||
public static App self;
|
public static App self;
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
package com.topjohnwu.magisk;
|
package com.topjohnwu.magisk;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.components.DownloadModuleService;
|
import com.topjohnwu.magisk.model.download.DownloadModuleService;
|
||||||
import com.topjohnwu.magisk.components.GeneralReceiver;
|
import com.topjohnwu.magisk.model.receiver.GeneralReceiver;
|
||||||
import com.topjohnwu.magisk.components.UpdateCheckService;
|
import com.topjohnwu.magisk.model.update.UpdateCheckService;
|
||||||
|
import com.topjohnwu.magisk.ui.MainActivity;
|
||||||
|
import com.topjohnwu.magisk.ui.SplashActivity;
|
||||||
|
import com.topjohnwu.magisk.ui.flash.FlashActivity;
|
||||||
|
import com.topjohnwu.magisk.ui.surequest.SuRequestActivity;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.database;
|
package com.topjohnwu.magisk.data.database;
|
||||||
|
|
||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@ -7,8 +7,8 @@ import android.text.TextUtils;
|
|||||||
|
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.Const;
|
import com.topjohnwu.magisk.Const;
|
||||||
import com.topjohnwu.magisk.container.Policy;
|
import com.topjohnwu.magisk.model.entity.Policy;
|
||||||
import com.topjohnwu.magisk.container.SuLogEntry;
|
import com.topjohnwu.magisk.model.entity.SuLogEntry;
|
||||||
import com.topjohnwu.magisk.utils.LocaleManager;
|
import com.topjohnwu.magisk.utils.LocaleManager;
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.database;
|
package com.topjohnwu.magisk.data.database;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
@ -6,7 +6,7 @@ import android.database.sqlite.SQLiteDatabase;
|
|||||||
import android.database.sqlite.SQLiteOpenHelper;
|
import android.database.sqlite.SQLiteOpenHelper;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.container.Repo;
|
import com.topjohnwu.magisk.model.entity.Repo;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.adapters;
|
package com.topjohnwu.magisk.model.adapters;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.pm.ApplicationInfo;
|
import android.content.pm.ApplicationInfo;
|
||||||
@ -13,20 +13,14 @@ import android.widget.CheckBox;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
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.buildware.widget.indeterm.IndeterminateCheckBox;
|
||||||
import com.topjohnwu.magisk.App;
|
import com.topjohnwu.magisk.App;
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.uicomponents.ArrowExpandable;
|
|
||||||
import com.topjohnwu.magisk.uicomponents.Expandable;
|
|
||||||
import com.topjohnwu.magisk.utils.Event;
|
import com.topjohnwu.magisk.utils.Event;
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
|
import com.topjohnwu.magisk.view.ArrowExpandable;
|
||||||
|
import com.topjohnwu.magisk.view.Expandable;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
import com.topjohnwu.superuser.internal.UiThreadHandler;
|
import com.topjohnwu.superuser.internal.UiThreadHandler;
|
||||||
|
|
||||||
@ -35,6 +29,11 @@ import java.util.Comparator;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
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 butterknife.BindView;
|
||||||
import java9.util.Comparators;
|
import java9.util.Comparators;
|
||||||
import java9.util.Lists;
|
import java9.util.Lists;
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.adapters;
|
package com.topjohnwu.magisk.model.adapters;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
@ -9,17 +9,16 @@ import android.widget.CheckBox;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.google.android.material.snackbar.Snackbar;
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.container.Module;
|
import com.topjohnwu.magisk.model.entity.Module;
|
||||||
import com.topjohnwu.magisk.uicomponents.SnackbarMaker;
|
import com.topjohnwu.magisk.view.SnackbarMaker;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
|
|
||||||
public class ModulesAdapter extends RecyclerView.Adapter<ModulesAdapter.ViewHolder> {
|
public class ModulesAdapter extends RecyclerView.Adapter<ModulesAdapter.ViewHolder> {
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.adapters;
|
package com.topjohnwu.magisk.model.adapters;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
@ -9,24 +9,23 @@ import android.view.ViewGroup;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
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.google.android.material.snackbar.Snackbar;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.container.Policy;
|
import com.topjohnwu.magisk.data.database.MagiskDB;
|
||||||
import com.topjohnwu.magisk.database.MagiskDB;
|
import com.topjohnwu.magisk.model.entity.Policy;
|
||||||
import com.topjohnwu.magisk.dialogs.CustomAlertDialog;
|
|
||||||
import com.topjohnwu.magisk.dialogs.FingerprintAuthDialog;
|
|
||||||
import com.topjohnwu.magisk.uicomponents.ArrowExpandable;
|
|
||||||
import com.topjohnwu.magisk.uicomponents.Expandable;
|
|
||||||
import com.topjohnwu.magisk.uicomponents.ExpandableViewHolder;
|
|
||||||
import com.topjohnwu.magisk.uicomponents.SnackbarMaker;
|
|
||||||
import com.topjohnwu.magisk.utils.FingerprintHelper;
|
import com.topjohnwu.magisk.utils.FingerprintHelper;
|
||||||
|
import com.topjohnwu.magisk.view.ArrowExpandable;
|
||||||
|
import com.topjohnwu.magisk.view.Expandable;
|
||||||
|
import com.topjohnwu.magisk.view.ExpandableViewHolder;
|
||||||
|
import com.topjohnwu.magisk.view.SnackbarMaker;
|
||||||
|
import com.topjohnwu.magisk.view.dialogs.CustomAlertDialog;
|
||||||
|
import com.topjohnwu.magisk.view.dialogs.FingerprintAuthDialog;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.appcompat.widget.SwitchCompat;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
|
|
||||||
public class PolicyAdapter extends RecyclerView.Adapter<PolicyAdapter.ViewHolder> {
|
public class PolicyAdapter extends RecyclerView.Adapter<PolicyAdapter.ViewHolder> {
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.adapters;
|
package com.topjohnwu.magisk.model.adapters;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -13,25 +13,24 @@ import android.widget.ImageView;
|
|||||||
import android.widget.SearchView;
|
import android.widget.SearchView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.App;
|
import com.topjohnwu.magisk.App;
|
||||||
import com.topjohnwu.magisk.ClassMap;
|
import com.topjohnwu.magisk.ClassMap;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.components.BaseActivity;
|
import com.topjohnwu.magisk.data.database.RepoDatabaseHelper;
|
||||||
import com.topjohnwu.magisk.components.DownloadModuleService;
|
import com.topjohnwu.magisk.model.download.DownloadModuleService;
|
||||||
import com.topjohnwu.magisk.container.Module;
|
import com.topjohnwu.magisk.model.entity.Module;
|
||||||
import com.topjohnwu.magisk.container.Repo;
|
import com.topjohnwu.magisk.model.entity.Repo;
|
||||||
import com.topjohnwu.magisk.database.RepoDatabaseHelper;
|
import com.topjohnwu.magisk.ui.base.BaseActivity;
|
||||||
import com.topjohnwu.magisk.dialogs.CustomAlertDialog;
|
|
||||||
import com.topjohnwu.magisk.uicomponents.MarkDownWindow;
|
|
||||||
import com.topjohnwu.magisk.utils.Event;
|
import com.topjohnwu.magisk.utils.Event;
|
||||||
|
import com.topjohnwu.magisk.view.MarkDownWindow;
|
||||||
|
import com.topjohnwu.magisk.view.dialogs.CustomAlertDialog;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import java9.util.stream.StreamSupport;
|
import java9.util.stream.StreamSupport;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.adapters;
|
package com.topjohnwu.magisk.model.adapters;
|
||||||
|
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.adapters;
|
package com.topjohnwu.magisk.model.adapters;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
@ -7,13 +7,13 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import androidx.annotation.IdRes;
|
import androidx.annotation.IdRes;
|
||||||
import androidx.annotation.LayoutRes;
|
import androidx.annotation.LayoutRes;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public abstract class StringListAdapter<VH extends StringListAdapter.ViewHolder>
|
public abstract class StringListAdapter<VH extends StringListAdapter.ViewHolder>
|
||||||
extends RecyclerView.Adapter<VH> {
|
extends RecyclerView.Adapter<VH> {
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.adapters;
|
package com.topjohnwu.magisk.model.adapters;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -9,18 +9,17 @@ import android.view.animation.RotateAnimation;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.container.SuLogEntry;
|
import com.topjohnwu.magisk.data.database.MagiskDB;
|
||||||
import com.topjohnwu.magisk.database.MagiskDB;
|
import com.topjohnwu.magisk.model.entity.SuLogEntry;
|
||||||
import com.topjohnwu.magisk.uicomponents.ExpandableViewHolder;
|
import com.topjohnwu.magisk.view.ExpandableViewHolder;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
|
|
||||||
public class SuLogAdapter extends SectionedAdapter<SuLogAdapter.SectionHolder, SuLogAdapter.LogViewHolder> {
|
public class SuLogAdapter extends SectionedAdapter<SuLogAdapter.SectionHolder, SuLogAdapter.LogViewHolder> {
|
@ -1,13 +1,13 @@
|
|||||||
package com.topjohnwu.magisk.adapters;
|
package com.topjohnwu.magisk.model.adapters;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.fragment.app.FragmentPagerAdapter;
|
import androidx.fragment.app.FragmentPagerAdapter;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class TabFragmentAdapter extends FragmentPagerAdapter {
|
public class TabFragmentAdapter extends FragmentPagerAdapter {
|
||||||
|
|
||||||
private List<Fragment> fragmentList;
|
private List<Fragment> fragmentList;
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.components;
|
package com.topjohnwu.magisk.model.download;
|
||||||
|
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
@ -6,15 +6,13 @@ import android.content.Intent;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.App;
|
import com.topjohnwu.magisk.App;
|
||||||
import com.topjohnwu.magisk.ClassMap;
|
import com.topjohnwu.magisk.ClassMap;
|
||||||
import com.topjohnwu.magisk.Const;
|
import com.topjohnwu.magisk.Const;
|
||||||
import com.topjohnwu.magisk.FlashActivity;
|
import com.topjohnwu.magisk.model.entity.Repo;
|
||||||
import com.topjohnwu.magisk.container.Repo;
|
import com.topjohnwu.magisk.ui.flash.FlashActivity;
|
||||||
import com.topjohnwu.magisk.uicomponents.Notifications;
|
import com.topjohnwu.magisk.view.Notifications;
|
||||||
import com.topjohnwu.magisk.uicomponents.ProgressNotification;
|
import com.topjohnwu.magisk.view.ProgressNotification;
|
||||||
import com.topjohnwu.net.Networking;
|
import com.topjohnwu.net.Networking;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
import com.topjohnwu.superuser.ShellUtils;
|
import com.topjohnwu.superuser.ShellUtils;
|
||||||
@ -25,12 +23,15 @@ import java.io.FileOutputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.zip.ZipEntry;
|
import java.util.zip.ZipEntry;
|
||||||
import java.util.zip.ZipInputStream;
|
import java.util.zip.ZipInputStream;
|
||||||
import java.util.zip.ZipOutputStream;
|
import java.util.zip.ZipOutputStream;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
public class DownloadModuleService extends Service {
|
public class DownloadModuleService extends Service {
|
||||||
|
|
||||||
private List<ProgressNotification> notifications;
|
private List<ProgressNotification> notifications;
|
||||||
@ -136,7 +137,7 @@ public class DownloadModuleService extends Service {
|
|||||||
ShellUtils.pump(update_bin, zout);
|
ShellUtils.pump(update_bin, zout);
|
||||||
}
|
}
|
||||||
zout.putNextEntry(new ZipEntry("META-INF/com/google/android/updater-script"));
|
zout.putNextEntry(new ZipEntry("META-INF/com/google/android/updater-script"));
|
||||||
zout.write("#MAGISK\n".getBytes("UTF-8"));
|
zout.write("#MAGISK\n".getBytes(StandardCharsets.UTF_8));
|
||||||
}
|
}
|
||||||
|
|
||||||
int off = -1;
|
int off = -1;
|
@ -1,14 +1,14 @@
|
|||||||
package com.topjohnwu.magisk.container;
|
package com.topjohnwu.magisk.model.entity;
|
||||||
|
|
||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
public abstract class BaseModule implements Comparable<BaseModule>, Parcelable {
|
public abstract class BaseModule implements Comparable<BaseModule>, Parcelable {
|
||||||
|
|
||||||
private String mId, mName, mVersion, mAuthor, mDescription;
|
private String mId, mName, mVersion, mAuthor, mDescription;
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.container;
|
package com.topjohnwu.magisk.model.entity;
|
||||||
|
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
@ -1,13 +1,13 @@
|
|||||||
package com.topjohnwu.magisk.container;
|
package com.topjohnwu.magisk.model.entity;
|
||||||
|
|
||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
import android.content.pm.ApplicationInfo;
|
import android.content.pm.ApplicationInfo;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
|
||||||
public class Policy implements Comparable<Policy>{
|
public class Policy implements Comparable<Policy>{
|
||||||
public static final int INTERACTIVE = 0;
|
public static final int INTERACTIVE = 0;
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.container;
|
package com.topjohnwu.magisk.model.entity;
|
||||||
|
|
||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.container;
|
package com.topjohnwu.magisk.model.entity;
|
||||||
|
|
||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.components;
|
package com.topjohnwu.magisk.model.receiver;
|
||||||
|
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@ -8,11 +8,11 @@ import com.topjohnwu.magisk.App;
|
|||||||
import com.topjohnwu.magisk.ClassMap;
|
import com.topjohnwu.magisk.ClassMap;
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.Const;
|
import com.topjohnwu.magisk.Const;
|
||||||
import com.topjohnwu.magisk.SuRequestActivity;
|
import com.topjohnwu.magisk.ui.surequest.SuRequestActivity;
|
||||||
import com.topjohnwu.magisk.uicomponents.Notifications;
|
|
||||||
import com.topjohnwu.magisk.uicomponents.Shortcuts;
|
|
||||||
import com.topjohnwu.magisk.utils.DownloadApp;
|
import com.topjohnwu.magisk.utils.DownloadApp;
|
||||||
import com.topjohnwu.magisk.utils.SuLogger;
|
import com.topjohnwu.magisk.utils.SuLogger;
|
||||||
|
import com.topjohnwu.magisk.view.Notifications;
|
||||||
|
import com.topjohnwu.magisk.view.Shortcuts;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
|
|
||||||
public class GeneralReceiver extends BroadcastReceiver {
|
public class GeneralReceiver extends BroadcastReceiver {
|
@ -1,15 +1,16 @@
|
|||||||
package com.topjohnwu.magisk.components;
|
package com.topjohnwu.magisk.model.update;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.work.ListenableWorker;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.App;
|
import com.topjohnwu.magisk.App;
|
||||||
import com.topjohnwu.magisk.BuildConfig;
|
import com.topjohnwu.magisk.BuildConfig;
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
|
import com.topjohnwu.magisk.model.worker.DelegateWorker;
|
||||||
import com.topjohnwu.magisk.tasks.CheckUpdates;
|
import com.topjohnwu.magisk.tasks.CheckUpdates;
|
||||||
import com.topjohnwu.magisk.uicomponents.Notifications;
|
import com.topjohnwu.magisk.view.Notifications;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.work.ListenableWorker;
|
||||||
|
|
||||||
public class UpdateCheckService extends DelegateWorker {
|
public class UpdateCheckService extends DelegateWorker {
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
@ -1,9 +1,15 @@
|
|||||||
package com.topjohnwu.magisk.components;
|
package com.topjohnwu.magisk.model.worker;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.net.Network;
|
import android.net.Network;
|
||||||
import android.net.Uri;
|
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.MainThread;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
@ -11,12 +17,6 @@ import androidx.annotation.RequiresApi;
|
|||||||
import androidx.work.Data;
|
import androidx.work.Data;
|
||||||
import androidx.work.ListenableWorker;
|
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 {
|
public abstract class DelegateWorker {
|
||||||
|
|
||||||
private ListenableWorker worker;
|
private ListenableWorker worker;
|
@ -6,7 +6,7 @@ import android.util.Pair;
|
|||||||
import com.topjohnwu.magisk.App;
|
import com.topjohnwu.magisk.App;
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.Const;
|
import com.topjohnwu.magisk.Const;
|
||||||
import com.topjohnwu.magisk.container.Repo;
|
import com.topjohnwu.magisk.model.entity.Repo;
|
||||||
import com.topjohnwu.magisk.utils.Event;
|
import com.topjohnwu.magisk.utils.Event;
|
||||||
import com.topjohnwu.magisk.utils.Logger;
|
import com.topjohnwu.magisk.utils.Logger;
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk;
|
package com.topjohnwu.magisk.ui;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
@ -8,26 +8,29 @@ import android.view.Menu;
|
|||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
|
import com.google.android.material.navigation.NavigationView;
|
||||||
|
import com.topjohnwu.magisk.ClassMap;
|
||||||
|
import com.topjohnwu.magisk.Config;
|
||||||
|
import com.topjohnwu.magisk.Const;
|
||||||
|
import com.topjohnwu.magisk.R;
|
||||||
|
import com.topjohnwu.magisk.ui.base.BaseActivity;
|
||||||
|
import com.topjohnwu.magisk.ui.hide.MagiskHideFragment;
|
||||||
|
import com.topjohnwu.magisk.ui.home.MagiskFragment;
|
||||||
|
import com.topjohnwu.magisk.ui.log.LogFragment;
|
||||||
|
import com.topjohnwu.magisk.ui.module.ModulesFragment;
|
||||||
|
import com.topjohnwu.magisk.ui.module.ReposFragment;
|
||||||
|
import com.topjohnwu.magisk.ui.settings.SettingsFragment;
|
||||||
|
import com.topjohnwu.magisk.ui.superuser.SuperuserFragment;
|
||||||
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
|
import com.topjohnwu.net.Networking;
|
||||||
|
import com.topjohnwu.superuser.Shell;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
import androidx.drawerlayout.widget.DrawerLayout;
|
import androidx.drawerlayout.widget.DrawerLayout;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.fragment.app.FragmentTransaction;
|
import androidx.fragment.app.FragmentTransaction;
|
||||||
|
|
||||||
import com.google.android.material.navigation.NavigationView;
|
|
||||||
import com.topjohnwu.magisk.components.BaseActivity;
|
|
||||||
import com.topjohnwu.magisk.fragments.LogFragment;
|
|
||||||
import com.topjohnwu.magisk.fragments.MagiskFragment;
|
|
||||||
import com.topjohnwu.magisk.fragments.MagiskHideFragment;
|
|
||||||
import com.topjohnwu.magisk.fragments.ModulesFragment;
|
|
||||||
import com.topjohnwu.magisk.fragments.ReposFragment;
|
|
||||||
import com.topjohnwu.magisk.fragments.SettingsFragment;
|
|
||||||
import com.topjohnwu.magisk.fragments.SuperuserFragment;
|
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
|
||||||
import com.topjohnwu.net.Networking;
|
|
||||||
import com.topjohnwu.superuser.Shell;
|
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
|
|
||||||
public class MainActivity extends BaseActivity
|
public class MainActivity extends BaseActivity
|
@ -1,23 +1,28 @@
|
|||||||
package com.topjohnwu.magisk;
|
package com.topjohnwu.magisk.ui;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import com.topjohnwu.magisk.BuildConfig;
|
||||||
|
import com.topjohnwu.magisk.ClassMap;
|
||||||
import com.topjohnwu.magisk.components.BaseActivity;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.database.RepoDatabaseHelper;
|
import com.topjohnwu.magisk.Const;
|
||||||
|
import com.topjohnwu.magisk.R;
|
||||||
|
import com.topjohnwu.magisk.data.database.RepoDatabaseHelper;
|
||||||
import com.topjohnwu.magisk.tasks.CheckUpdates;
|
import com.topjohnwu.magisk.tasks.CheckUpdates;
|
||||||
import com.topjohnwu.magisk.tasks.UpdateRepos;
|
import com.topjohnwu.magisk.tasks.UpdateRepos;
|
||||||
import com.topjohnwu.magisk.uicomponents.Notifications;
|
import com.topjohnwu.magisk.ui.base.BaseActivity;
|
||||||
import com.topjohnwu.magisk.uicomponents.Shortcuts;
|
|
||||||
import com.topjohnwu.magisk.utils.LocaleManager;
|
import com.topjohnwu.magisk.utils.LocaleManager;
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
|
import com.topjohnwu.magisk.view.Notifications;
|
||||||
|
import com.topjohnwu.magisk.view.Shortcuts;
|
||||||
import com.topjohnwu.net.Networking;
|
import com.topjohnwu.net.Networking;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
|
||||||
public class SplashActivity extends BaseActivity {
|
public class SplashActivity extends BaseActivity {
|
||||||
|
|
||||||
public static boolean DONE = false;
|
public static boolean DONE = false;
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.components;
|
package com.topjohnwu.magisk.ui.base;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@ -11,6 +11,13 @@ import android.os.Bundle;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.view.WindowManager;
|
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.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.StyleRes;
|
import androidx.annotation.StyleRes;
|
||||||
@ -19,13 +26,6 @@ import androidx.collection.SparseArrayCompat;
|
|||||||
import androidx.core.app.ActivityCompat;
|
import androidx.core.app.ActivityCompat;
|
||||||
import androidx.core.content.ContextCompat;
|
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 {
|
public abstract class BaseActivity extends AppCompatActivity implements Event.AutoListener {
|
||||||
|
|
||||||
static int[] EMPTY_INT_ARRAY = new int[0];
|
static int[] EMPTY_INT_ARRAY = new int[0];
|
@ -1,12 +1,11 @@
|
|||||||
package com.topjohnwu.magisk.components;
|
package com.topjohnwu.magisk.ui.base;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.App;
|
import com.topjohnwu.magisk.App;
|
||||||
import com.topjohnwu.magisk.utils.Event;
|
import com.topjohnwu.magisk.utils.Event;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
import butterknife.Unbinder;
|
import butterknife.Unbinder;
|
||||||
|
|
||||||
public abstract class BaseFragment extends Fragment implements Event.AutoListener {
|
public abstract class BaseFragment extends Fragment implements Event.AutoListener {
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.components;
|
package com.topjohnwu.magisk.ui.base;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
@ -8,6 +8,10 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
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.Preference;
|
||||||
import androidx.preference.PreferenceCategory;
|
import androidx.preference.PreferenceCategory;
|
||||||
import androidx.preference.PreferenceFragmentCompat;
|
import androidx.preference.PreferenceFragmentCompat;
|
||||||
@ -16,10 +20,6 @@ import androidx.preference.PreferenceScreen;
|
|||||||
import androidx.preference.PreferenceViewHolder;
|
import androidx.preference.PreferenceViewHolder;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
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
|
public abstract class BasePreferenceFragment extends PreferenceFragmentCompat
|
||||||
implements SharedPreferences.OnSharedPreferenceChangeListener, Event.AutoListener {
|
implements SharedPreferences.OnSharedPreferenceChangeListener, Event.AutoListener {
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk;
|
package com.topjohnwu.magisk.ui.flash;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
@ -8,15 +8,12 @@ import android.widget.Button;
|
|||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import com.topjohnwu.magisk.Const;
|
||||||
import androidx.appcompat.app.ActionBar;
|
import com.topjohnwu.magisk.R;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
import com.topjohnwu.magisk.model.adapters.StringListAdapter;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.adapters.StringListAdapter;
|
|
||||||
import com.topjohnwu.magisk.components.BaseActivity;
|
|
||||||
import com.topjohnwu.magisk.tasks.FlashZip;
|
import com.topjohnwu.magisk.tasks.FlashZip;
|
||||||
import com.topjohnwu.magisk.tasks.MagiskInstaller;
|
import com.topjohnwu.magisk.tasks.MagiskInstaller;
|
||||||
|
import com.topjohnwu.magisk.ui.base.BaseActivity;
|
||||||
import com.topjohnwu.magisk.utils.RootUtils;
|
import com.topjohnwu.magisk.utils.RootUtils;
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
import com.topjohnwu.superuser.CallbackList;
|
import com.topjohnwu.superuser.CallbackList;
|
||||||
@ -32,6 +29,10 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
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.BindColor;
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.OnClick;
|
import butterknife.OnClick;
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.fragments;
|
package com.topjohnwu.magisk.ui.hide;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -9,17 +9,16 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.SearchView;
|
import android.widget.SearchView;
|
||||||
|
|
||||||
|
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.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
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.Event;
|
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
|
|
||||||
public class MagiskHideFragment extends BaseFragment {
|
public class MagiskHideFragment extends BaseFragment {
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.fragments;
|
package com.topjohnwu.magisk.ui.home;
|
||||||
|
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -9,6 +9,31 @@ import android.widget.CheckBox;
|
|||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
|
import com.topjohnwu.magisk.BuildConfig;
|
||||||
|
import com.topjohnwu.magisk.Config;
|
||||||
|
import com.topjohnwu.magisk.Const;
|
||||||
|
import com.topjohnwu.magisk.R;
|
||||||
|
import com.topjohnwu.magisk.tasks.CheckUpdates;
|
||||||
|
import com.topjohnwu.magisk.ui.MainActivity;
|
||||||
|
import com.topjohnwu.magisk.ui.base.BaseActivity;
|
||||||
|
import com.topjohnwu.magisk.ui.base.BaseFragment;
|
||||||
|
import com.topjohnwu.magisk.utils.Event;
|
||||||
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
|
import com.topjohnwu.magisk.view.ArrowExpandable;
|
||||||
|
import com.topjohnwu.magisk.view.Expandable;
|
||||||
|
import com.topjohnwu.magisk.view.ExpandableViewHolder;
|
||||||
|
import com.topjohnwu.magisk.view.MarkDownWindow;
|
||||||
|
import com.topjohnwu.magisk.view.SafetyNet;
|
||||||
|
import com.topjohnwu.magisk.view.UpdateCardHolder;
|
||||||
|
import com.topjohnwu.magisk.view.dialogs.EnvFixDialog;
|
||||||
|
import com.topjohnwu.magisk.view.dialogs.MagiskInstallDialog;
|
||||||
|
import com.topjohnwu.magisk.view.dialogs.ManagerInstallDialog;
|
||||||
|
import com.topjohnwu.magisk.view.dialogs.UninstallDialog;
|
||||||
|
import com.topjohnwu.net.Networking;
|
||||||
|
import com.topjohnwu.superuser.Shell;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.cardview.widget.CardView;
|
import androidx.cardview.widget.CardView;
|
||||||
@ -18,32 +43,6 @@ import androidx.transition.Fade;
|
|||||||
import androidx.transition.Transition;
|
import androidx.transition.Transition;
|
||||||
import androidx.transition.TransitionManager;
|
import androidx.transition.TransitionManager;
|
||||||
import androidx.transition.TransitionSet;
|
import androidx.transition.TransitionSet;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.BuildConfig;
|
|
||||||
import com.topjohnwu.magisk.Config;
|
|
||||||
import com.topjohnwu.magisk.Const;
|
|
||||||
import com.topjohnwu.magisk.MainActivity;
|
|
||||||
import com.topjohnwu.magisk.R;
|
|
||||||
import com.topjohnwu.magisk.components.BaseActivity;
|
|
||||||
import com.topjohnwu.magisk.components.BaseFragment;
|
|
||||||
import com.topjohnwu.magisk.dialogs.EnvFixDialog;
|
|
||||||
import com.topjohnwu.magisk.dialogs.MagiskInstallDialog;
|
|
||||||
import com.topjohnwu.magisk.dialogs.ManagerInstallDialog;
|
|
||||||
import com.topjohnwu.magisk.dialogs.UninstallDialog;
|
|
||||||
import com.topjohnwu.magisk.tasks.CheckUpdates;
|
|
||||||
import com.topjohnwu.magisk.uicomponents.ArrowExpandable;
|
|
||||||
import com.topjohnwu.magisk.uicomponents.Expandable;
|
|
||||||
import com.topjohnwu.magisk.uicomponents.ExpandableViewHolder;
|
|
||||||
import com.topjohnwu.magisk.uicomponents.MarkDownWindow;
|
|
||||||
import com.topjohnwu.magisk.uicomponents.SafetyNet;
|
|
||||||
import com.topjohnwu.magisk.uicomponents.UpdateCardHolder;
|
|
||||||
import com.topjohnwu.magisk.utils.Event;
|
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
|
||||||
import com.topjohnwu.net.Networking;
|
|
||||||
import com.topjohnwu.superuser.Shell;
|
|
||||||
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
import butterknife.BindColor;
|
import butterknife.BindColor;
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.OnClick;
|
import butterknife.OnClick;
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.fragments;
|
package com.topjohnwu.magisk.ui.log;
|
||||||
|
|
||||||
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
@ -7,14 +7,13 @@ import android.view.LayoutInflater;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import androidx.viewpager.widget.ViewPager;
|
|
||||||
|
|
||||||
import com.google.android.material.tabs.TabLayout;
|
import com.google.android.material.tabs.TabLayout;
|
||||||
import com.topjohnwu.magisk.MainActivity;
|
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.adapters.TabFragmentAdapter;
|
import com.topjohnwu.magisk.model.adapters.TabFragmentAdapter;
|
||||||
import com.topjohnwu.magisk.components.BaseFragment;
|
import com.topjohnwu.magisk.ui.MainActivity;
|
||||||
|
import com.topjohnwu.magisk.ui.base.BaseFragment;
|
||||||
|
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
|
|
||||||
public class LogFragment extends BaseFragment {
|
public class LogFragment extends BaseFragment {
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.fragments;
|
package com.topjohnwu.magisk.ui.log;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -8,17 +8,13 @@ import android.view.MenuItem;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
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.google.android.material.snackbar.Snackbar;
|
||||||
import com.topjohnwu.magisk.Const;
|
import com.topjohnwu.magisk.Const;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.adapters.StringListAdapter;
|
import com.topjohnwu.magisk.model.adapters.StringListAdapter;
|
||||||
import com.topjohnwu.magisk.components.BaseFragment;
|
import com.topjohnwu.magisk.ui.base.BaseFragment;
|
||||||
import com.topjohnwu.magisk.uicomponents.SnackbarMaker;
|
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
|
import com.topjohnwu.magisk.view.SnackbarMaker;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
import com.topjohnwu.superuser.internal.NOPList;
|
import com.topjohnwu.superuser.internal.NOPList;
|
||||||
|
|
||||||
@ -27,6 +23,9 @@ import java.io.IOException;
|
|||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
|
|
||||||
public class MagiskLogFragment extends BaseFragment {
|
public class MagiskLogFragment extends BaseFragment {
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.fragments;
|
package com.topjohnwu.magisk.ui.log;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -9,13 +9,12 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
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.annotation.Nullable;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.R;
|
|
||||||
import com.topjohnwu.magisk.adapters.SuLogAdapter;
|
|
||||||
import com.topjohnwu.magisk.components.BaseFragment;
|
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
|
|
||||||
public class SuLogFragment extends BaseFragment {
|
public class SuLogFragment extends BaseFragment {
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.fragments;
|
package com.topjohnwu.magisk.ui.module;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -11,18 +11,13 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.TextView;
|
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.ClassMap;
|
||||||
import com.topjohnwu.magisk.Const;
|
import com.topjohnwu.magisk.Const;
|
||||||
import com.topjohnwu.magisk.FlashActivity;
|
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.adapters.ModulesAdapter;
|
import com.topjohnwu.magisk.model.adapters.ModulesAdapter;
|
||||||
import com.topjohnwu.magisk.components.BaseFragment;
|
import com.topjohnwu.magisk.model.entity.Module;
|
||||||
import com.topjohnwu.magisk.container.Module;
|
import com.topjohnwu.magisk.ui.base.BaseFragment;
|
||||||
|
import com.topjohnwu.magisk.ui.flash.FlashActivity;
|
||||||
import com.topjohnwu.magisk.utils.Event;
|
import com.topjohnwu.magisk.utils.Event;
|
||||||
import com.topjohnwu.magisk.utils.RootUtils;
|
import com.topjohnwu.magisk.utils.RootUtils;
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
@ -32,6 +27,10 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
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.BindView;
|
||||||
import butterknife.OnClick;
|
import butterknife.OnClick;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.fragments;
|
package com.topjohnwu.magisk.ui.module;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -11,18 +11,17 @@ import android.view.ViewGroup;
|
|||||||
import android.widget.SearchView;
|
import android.widget.SearchView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.topjohnwu.magisk.Config;
|
||||||
|
import com.topjohnwu.magisk.R;
|
||||||
|
import com.topjohnwu.magisk.model.adapters.ReposAdapter;
|
||||||
|
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.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.Config;
|
|
||||||
import com.topjohnwu.magisk.R;
|
|
||||||
import com.topjohnwu.magisk.adapters.ReposAdapter;
|
|
||||||
import com.topjohnwu.magisk.components.BaseFragment;
|
|
||||||
import com.topjohnwu.magisk.tasks.UpdateRepos;
|
|
||||||
import com.topjohnwu.magisk.utils.Event;
|
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
|
|
||||||
public class ReposFragment extends BaseFragment {
|
public class ReposFragment extends BaseFragment {
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.fragments;
|
package com.topjohnwu.magisk.ui.settings;
|
||||||
|
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
@ -8,26 +8,19 @@ import android.view.View;
|
|||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.Toast;
|
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.BuildConfig;
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.Const;
|
import com.topjohnwu.magisk.Const;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.components.BasePreferenceFragment;
|
|
||||||
import com.topjohnwu.magisk.dialogs.FingerprintAuthDialog;
|
|
||||||
import com.topjohnwu.magisk.tasks.CheckUpdates;
|
import com.topjohnwu.magisk.tasks.CheckUpdates;
|
||||||
|
import com.topjohnwu.magisk.ui.base.BasePreferenceFragment;
|
||||||
import com.topjohnwu.magisk.utils.DownloadApp;
|
import com.topjohnwu.magisk.utils.DownloadApp;
|
||||||
import com.topjohnwu.magisk.utils.Event;
|
import com.topjohnwu.magisk.utils.Event;
|
||||||
import com.topjohnwu.magisk.utils.FingerprintHelper;
|
import com.topjohnwu.magisk.utils.FingerprintHelper;
|
||||||
import com.topjohnwu.magisk.utils.LocaleManager;
|
import com.topjohnwu.magisk.utils.LocaleManager;
|
||||||
import com.topjohnwu.magisk.utils.PatchAPK;
|
import com.topjohnwu.magisk.utils.PatchAPK;
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
|
import com.topjohnwu.magisk.view.dialogs.FingerprintAuthDialog;
|
||||||
import com.topjohnwu.net.Networking;
|
import com.topjohnwu.net.Networking;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
|
|
||||||
@ -35,6 +28,13 @@ import java.io.IOException;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Locale;
|
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 {
|
public class SettingsFragment extends BasePreferenceFragment {
|
||||||
|
|
||||||
private ListPreference updateChannel, autoRes, suNotification,
|
private ListPreference updateChannel, autoRes, suNotification,
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.fragments;
|
package com.topjohnwu.magisk.ui.superuser;
|
||||||
|
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -7,16 +7,15 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.adapters.PolicyAdapter;
|
import com.topjohnwu.magisk.model.adapters.PolicyAdapter;
|
||||||
import com.topjohnwu.magisk.components.BaseFragment;
|
import com.topjohnwu.magisk.model.entity.Policy;
|
||||||
import com.topjohnwu.magisk.container.Policy;
|
import com.topjohnwu.magisk.ui.base.BaseFragment;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
|
|
||||||
public class SuperuserFragment extends BaseFragment {
|
public class SuperuserFragment extends BaseFragment {
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk;
|
package com.topjohnwu.magisk.ui.surequest;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -17,11 +17,12 @@ import android.widget.LinearLayout;
|
|||||||
import android.widget.Spinner;
|
import android.widget.Spinner;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import com.topjohnwu.magisk.App;
|
||||||
import androidx.appcompat.content.res.AppCompatResources;
|
import com.topjohnwu.magisk.BuildConfig;
|
||||||
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.components.BaseActivity;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.container.Policy;
|
import com.topjohnwu.magisk.model.entity.Policy;
|
||||||
|
import com.topjohnwu.magisk.ui.base.BaseActivity;
|
||||||
import com.topjohnwu.magisk.utils.FingerprintHelper;
|
import com.topjohnwu.magisk.utils.FingerprintHelper;
|
||||||
import com.topjohnwu.magisk.utils.SuConnector;
|
import com.topjohnwu.magisk.utils.SuConnector;
|
||||||
import com.topjohnwu.magisk.utils.SuLogger;
|
import com.topjohnwu.magisk.utils.SuLogger;
|
||||||
@ -30,6 +31,8 @@ import java.io.IOException;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.content.res.AppCompatResources;
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import java9.lang.Iterables;
|
import java9.lang.Iterables;
|
||||||
|
|
@ -7,8 +7,8 @@ import com.topjohnwu.magisk.BuildConfig;
|
|||||||
import com.topjohnwu.magisk.ClassMap;
|
import com.topjohnwu.magisk.ClassMap;
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.SplashActivity;
|
import com.topjohnwu.magisk.ui.SplashActivity;
|
||||||
import com.topjohnwu.magisk.uicomponents.ProgressNotification;
|
import com.topjohnwu.magisk.view.ProgressNotification;
|
||||||
import com.topjohnwu.net.Networking;
|
import com.topjohnwu.net.Networking;
|
||||||
import com.topjohnwu.net.ResponseListener;
|
import com.topjohnwu.net.ResponseListener;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
|
@ -3,16 +3,14 @@ package com.topjohnwu.magisk.utils;
|
|||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.core.app.NotificationCompat;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.App;
|
import com.topjohnwu.magisk.App;
|
||||||
import com.topjohnwu.magisk.BuildConfig;
|
import com.topjohnwu.magisk.BuildConfig;
|
||||||
import com.topjohnwu.magisk.ClassMap;
|
import com.topjohnwu.magisk.ClassMap;
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.Const;
|
import com.topjohnwu.magisk.Const;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.SplashActivity;
|
import com.topjohnwu.magisk.ui.SplashActivity;
|
||||||
import com.topjohnwu.magisk.uicomponents.Notifications;
|
import com.topjohnwu.magisk.view.Notifications;
|
||||||
import com.topjohnwu.signing.JarMap;
|
import com.topjohnwu.signing.JarMap;
|
||||||
import com.topjohnwu.signing.SignAPK;
|
import com.topjohnwu.signing.SignAPK;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
@ -29,6 +27,8 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.jar.JarEntry;
|
import java.util.jar.JarEntry;
|
||||||
|
|
||||||
|
import androidx.core.app.NotificationCompat;
|
||||||
|
|
||||||
public class PatchAPK {
|
public class PatchAPK {
|
||||||
|
|
||||||
public static final String LOWERALPHA = "abcdefghijklmnopqrstuvwxyz";
|
public static final String LOWERALPHA = "abcdefghijklmnopqrstuvwxyz";
|
||||||
|
@ -9,8 +9,8 @@ import android.widget.Toast;
|
|||||||
import com.topjohnwu.magisk.App;
|
import com.topjohnwu.magisk.App;
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.container.Policy;
|
import com.topjohnwu.magisk.model.entity.Policy;
|
||||||
import com.topjohnwu.magisk.container.SuLogEntry;
|
import com.topjohnwu.magisk.model.entity.SuLogEntry;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
@ -12,21 +12,14 @@ import android.net.Uri;
|
|||||||
import android.provider.OpenableColumns;
|
import android.provider.OpenableColumns;
|
||||||
import android.widget.Toast;
|
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.App;
|
||||||
import com.topjohnwu.magisk.BuildConfig;
|
import com.topjohnwu.magisk.BuildConfig;
|
||||||
import com.topjohnwu.magisk.ClassMap;
|
import com.topjohnwu.magisk.ClassMap;
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.Const;
|
import com.topjohnwu.magisk.Const;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.components.UpdateCheckService;
|
import com.topjohnwu.magisk.model.entity.Module;
|
||||||
import com.topjohnwu.magisk.container.Module;
|
import com.topjohnwu.magisk.model.update.UpdateCheckService;
|
||||||
import com.topjohnwu.magisk.container.ValueSortedMap;
|
|
||||||
import com.topjohnwu.net.Networking;
|
import com.topjohnwu.net.Networking;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
import com.topjohnwu.superuser.internal.UiThreadHandler;
|
import com.topjohnwu.superuser.internal.UiThreadHandler;
|
||||||
@ -37,6 +30,12 @@ import java.util.Locale;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.TimeUnit;
|
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 class Utils {
|
||||||
|
|
||||||
public static void toast(CharSequence msg, int duration) {
|
public static void toast(CharSequence msg, int duration) {
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.container;
|
package com.topjohnwu.magisk.utils;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -9,6 +7,8 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
public class ValueSortedMap<K, V extends Comparable<? super V>> extends HashMap<K, V> {
|
public class ValueSortedMap<K, V extends Comparable<? super V>> extends HashMap<K, V> {
|
||||||
|
|
||||||
private List<V> sorted = new ArrayList<>();
|
private List<V> sorted = new ArrayList<>();
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.uicomponents;
|
package com.topjohnwu.magisk.view;
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.animation.Animation;
|
import android.view.animation.Animation;
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.uicomponents;
|
package com.topjohnwu.magisk.view;
|
||||||
|
|
||||||
public abstract class Expandable {
|
public abstract class Expandable {
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.uicomponents;
|
package com.topjohnwu.magisk.view;
|
||||||
|
|
||||||
import android.animation.ValueAnimator;
|
import android.animation.ValueAnimator;
|
||||||
import android.view.View;
|
import android.view.View;
|
@ -1,11 +1,9 @@
|
|||||||
package com.topjohnwu.magisk.uicomponents;
|
package com.topjohnwu.magisk.view;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.net.Networking;
|
import com.topjohnwu.net.Networking;
|
||||||
import com.topjohnwu.net.ResponseListener;
|
import com.topjohnwu.net.ResponseListener;
|
||||||
@ -13,6 +11,7 @@ import com.topjohnwu.net.ResponseListener;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import ru.noties.markwon.Markwon;
|
import ru.noties.markwon.Markwon;
|
||||||
import ru.noties.markwon.html.HtmlPlugin;
|
import ru.noties.markwon.html.HtmlPlugin;
|
||||||
import ru.noties.markwon.image.ImagesPlugin;
|
import ru.noties.markwon.image.ImagesPlugin;
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.uicomponents;
|
package com.topjohnwu.magisk.view;
|
||||||
|
|
||||||
import android.app.NotificationChannel;
|
import android.app.NotificationChannel;
|
||||||
import android.app.NotificationManager;
|
import android.app.NotificationManager;
|
||||||
@ -7,19 +7,19 @@ import android.content.Context;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Build;
|
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.App;
|
||||||
import com.topjohnwu.magisk.ClassMap;
|
import com.topjohnwu.magisk.ClassMap;
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.Const;
|
import com.topjohnwu.magisk.Const;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.SplashActivity;
|
import com.topjohnwu.magisk.model.receiver.GeneralReceiver;
|
||||||
import com.topjohnwu.magisk.components.GeneralReceiver;
|
import com.topjohnwu.magisk.ui.SplashActivity;
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
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 class Notifications {
|
||||||
|
|
||||||
public static NotificationManagerCompat mgr = NotificationManagerCompat.from(App.self);
|
public static NotificationManagerCompat mgr = NotificationManagerCompat.from(App.self);
|
@ -1,17 +1,17 @@
|
|||||||
package com.topjohnwu.magisk.uicomponents;
|
package com.topjohnwu.magisk.view;
|
||||||
|
|
||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.core.app.NotificationCompat;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.App;
|
import com.topjohnwu.magisk.App;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
import com.topjohnwu.net.DownloadProgressListener;
|
import com.topjohnwu.net.DownloadProgressListener;
|
||||||
|
|
||||||
|
import androidx.core.app.NotificationCompat;
|
||||||
|
|
||||||
public class ProgressNotification implements DownloadProgressListener {
|
public class ProgressNotification implements DownloadProgressListener {
|
||||||
|
|
||||||
private NotificationCompat.Builder builder;
|
private NotificationCompat.Builder builder;
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.uicomponents;
|
package com.topjohnwu.magisk.view;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@ -10,19 +10,18 @@ import android.widget.ImageView;
|
|||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.StringRes;
|
|
||||||
import androidx.cardview.widget.CardView;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.App;
|
import com.topjohnwu.magisk.App;
|
||||||
import com.topjohnwu.magisk.Const;
|
import com.topjohnwu.magisk.Const;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.dialogs.CustomAlertDialog;
|
|
||||||
import com.topjohnwu.magisk.utils.ISafetyNetHelper;
|
import com.topjohnwu.magisk.utils.ISafetyNetHelper;
|
||||||
|
import com.topjohnwu.magisk.view.dialogs.CustomAlertDialog;
|
||||||
import com.topjohnwu.net.Networking;
|
import com.topjohnwu.net.Networking;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
import androidx.annotation.StringRes;
|
||||||
|
import androidx.cardview.widget.CardView;
|
||||||
import butterknife.BindColor;
|
import butterknife.BindColor;
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.OnClick;
|
import butterknife.OnClick;
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.uicomponents;
|
package com.topjohnwu.magisk.view;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -7,18 +7,18 @@ import android.content.pm.ShortcutManager;
|
|||||||
import android.graphics.drawable.Icon;
|
import android.graphics.drawable.Icon;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
|
|
||||||
import androidx.annotation.RequiresApi;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.ClassMap;
|
import com.topjohnwu.magisk.ClassMap;
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.Const;
|
import com.topjohnwu.magisk.Const;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.SplashActivity;
|
import com.topjohnwu.magisk.ui.SplashActivity;
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import androidx.annotation.RequiresApi;
|
||||||
|
|
||||||
public class Shortcuts {
|
public class Shortcuts {
|
||||||
|
|
||||||
public static void setup(Context context) {
|
public static void setup(Context context) {
|
@ -1,16 +1,16 @@
|
|||||||
package com.topjohnwu.magisk.uicomponents;
|
package com.topjohnwu.magisk.view;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.annotation.StringRes;
|
|
||||||
|
|
||||||
import com.google.android.material.snackbar.Snackbar;
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
|
|
||||||
|
import androidx.annotation.StringRes;
|
||||||
|
|
||||||
public class SnackbarMaker {
|
public class SnackbarMaker {
|
||||||
|
|
||||||
public static Snackbar make(Activity activity, CharSequence text, int duration) {
|
public static Snackbar make(Activity activity, CharSequence text, int duration) {
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.uicomponents;
|
package com.topjohnwu.magisk.view;
|
||||||
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.dialogs;
|
package com.topjohnwu.magisk.view.dialogs;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
@ -8,14 +8,13 @@ import android.widget.Button;
|
|||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.topjohnwu.magisk.R;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
import androidx.annotation.StyleRes;
|
import androidx.annotation.StyleRes;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.R;
|
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
|
|
||||||
public class CustomAlertDialog extends AlertDialog.Builder {
|
public class CustomAlertDialog extends AlertDialog.Builder {
|
@ -1,11 +1,9 @@
|
|||||||
package com.topjohnwu.magisk.dialogs;
|
package com.topjohnwu.magisk.view.dialogs;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.tasks.MagiskInstaller;
|
import com.topjohnwu.magisk.tasks.MagiskInstaller;
|
||||||
import com.topjohnwu.magisk.utils.RootUtils;
|
import com.topjohnwu.magisk.utils.RootUtils;
|
||||||
@ -14,6 +12,8 @@ import com.topjohnwu.superuser.Shell;
|
|||||||
import com.topjohnwu.superuser.internal.UiThreadHandler;
|
import com.topjohnwu.superuser.internal.UiThreadHandler;
|
||||||
import com.topjohnwu.superuser.io.SuFile;
|
import com.topjohnwu.superuser.io.SuFile;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
public class EnvFixDialog extends CustomAlertDialog {
|
public class EnvFixDialog extends CustomAlertDialog {
|
||||||
|
|
||||||
public EnvFixDialog(@NonNull Activity activity) {
|
public EnvFixDialog(@NonNull Activity activity) {
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.dialogs;
|
package com.topjohnwu.magisk.view.dialogs;
|
||||||
|
|
||||||
import android.annotation.TargetApi;
|
import android.annotation.TargetApi;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
@ -11,13 +11,13 @@ import android.os.Build;
|
|||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.utils.FingerprintHelper;
|
import com.topjohnwu.magisk.utils.FingerprintHelper;
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
|
||||||
@TargetApi(Build.VERSION_CODES.M)
|
@TargetApi(Build.VERSION_CODES.M)
|
||||||
public class FingerprintAuthDialog extends CustomAlertDialog {
|
public class FingerprintAuthDialog extends CustomAlertDialog {
|
||||||
|
|
@ -1,26 +1,26 @@
|
|||||||
package com.topjohnwu.magisk.dialogs;
|
package com.topjohnwu.magisk.view.dialogs;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
|
||||||
|
|
||||||
import com.google.android.material.snackbar.Snackbar;
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
import com.topjohnwu.magisk.ClassMap;
|
import com.topjohnwu.magisk.ClassMap;
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.Const;
|
import com.topjohnwu.magisk.Const;
|
||||||
import com.topjohnwu.magisk.FlashActivity;
|
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.components.BaseActivity;
|
import com.topjohnwu.magisk.ui.base.BaseActivity;
|
||||||
import com.topjohnwu.magisk.uicomponents.ProgressNotification;
|
import com.topjohnwu.magisk.ui.flash.FlashActivity;
|
||||||
import com.topjohnwu.magisk.uicomponents.SnackbarMaker;
|
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
|
import com.topjohnwu.magisk.view.ProgressNotification;
|
||||||
|
import com.topjohnwu.magisk.view.SnackbarMaker;
|
||||||
import com.topjohnwu.net.Networking;
|
import com.topjohnwu.net.Networking;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AlertDialog;
|
||||||
|
|
||||||
class InstallMethodDialog extends AlertDialog.Builder {
|
class InstallMethodDialog extends AlertDialog.Builder {
|
||||||
|
|
||||||
InstallMethodDialog(BaseActivity activity, List<String> options) {
|
InstallMethodDialog(BaseActivity activity, List<String> options) {
|
@ -1,13 +1,13 @@
|
|||||||
package com.topjohnwu.magisk.dialogs;
|
package com.topjohnwu.magisk.view.dialogs;
|
||||||
|
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.components.BaseActivity;
|
import com.topjohnwu.magisk.ui.base.BaseActivity;
|
||||||
import com.topjohnwu.magisk.uicomponents.MarkDownWindow;
|
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
|
import com.topjohnwu.magisk.view.MarkDownWindow;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
import com.topjohnwu.superuser.ShellUtils;
|
import com.topjohnwu.superuser.ShellUtils;
|
||||||
|
|
@ -1,15 +1,15 @@
|
|||||||
package com.topjohnwu.magisk.dialogs;
|
package com.topjohnwu.magisk.view.dialogs;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.uicomponents.MarkDownWindow;
|
|
||||||
import com.topjohnwu.magisk.utils.DownloadApp;
|
import com.topjohnwu.magisk.utils.DownloadApp;
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
|
import com.topjohnwu.magisk.view.MarkDownWindow;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
public class ManagerInstallDialog extends CustomAlertDialog {
|
public class ManagerInstallDialog extends CustomAlertDialog {
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.topjohnwu.magisk.dialogs;
|
package com.topjohnwu.magisk.view.dialogs;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.ProgressDialog;
|
import android.app.ProgressDialog;
|
||||||
@ -7,20 +7,20 @@ import android.net.Uri;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import com.topjohnwu.magisk.ClassMap;
|
import com.topjohnwu.magisk.ClassMap;
|
||||||
import com.topjohnwu.magisk.Config;
|
import com.topjohnwu.magisk.Config;
|
||||||
import com.topjohnwu.magisk.Const;
|
import com.topjohnwu.magisk.Const;
|
||||||
import com.topjohnwu.magisk.FlashActivity;
|
|
||||||
import com.topjohnwu.magisk.R;
|
import com.topjohnwu.magisk.R;
|
||||||
import com.topjohnwu.magisk.uicomponents.ProgressNotification;
|
import com.topjohnwu.magisk.ui.flash.FlashActivity;
|
||||||
import com.topjohnwu.magisk.utils.Utils;
|
import com.topjohnwu.magisk.utils.Utils;
|
||||||
|
import com.topjohnwu.magisk.view.ProgressNotification;
|
||||||
import com.topjohnwu.net.Networking;
|
import com.topjohnwu.net.Networking;
|
||||||
import com.topjohnwu.superuser.Shell;
|
import com.topjohnwu.superuser.Shell;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
public class UninstallDialog extends CustomAlertDialog {
|
public class UninstallDialog extends CustomAlertDialog {
|
||||||
|
|
||||||
public UninstallDialog(@NonNull Activity activity) {
|
public UninstallDialog(@NonNull Activity activity) {
|
Loading…
Reference in New Issue
Block a user