mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-04-23 04:21:33 +00:00
parent
f9ae4ab475
commit
f5f7fd9132
@ -46,6 +46,9 @@ import java9.util.stream.StreamSupport;
|
|||||||
public class ApplicationAdapter extends SectionedAdapter
|
public class ApplicationAdapter extends SectionedAdapter
|
||||||
<ApplicationAdapter.AppViewHolder, ApplicationAdapter.ProcessViewHolder> {
|
<ApplicationAdapter.AppViewHolder, ApplicationAdapter.ProcessViewHolder> {
|
||||||
|
|
||||||
|
private static final String SAFETYNET_PROCESS = "com.google.android.gms.unstable";
|
||||||
|
private static final String GMS_PACKAGE = "com.google.android.gms";
|
||||||
|
|
||||||
/* A list of apps that should not be shown as hide-able */
|
/* A list of apps that should not be shown as hide-able */
|
||||||
private static final List<String> HIDE_BLACKLIST = Arrays.asList(
|
private static final List<String> HIDE_BLACKLIST = Arrays.asList(
|
||||||
App.self.getPackageName(),
|
App.self.getPackageName(),
|
||||||
@ -57,8 +60,10 @@ public class ApplicationAdapter extends SectionedAdapter
|
|||||||
"com.android.webview",
|
"com.android.webview",
|
||||||
"com.google.android.webview"
|
"com.google.android.webview"
|
||||||
);
|
);
|
||||||
private static final String SAFETYNET_PROCESS = "com.google.android.gms.unstable";
|
private static final List<String> DEFAULT_HIDELIST = Arrays.asList(
|
||||||
private static final String GMS_PACKAGE = "com.google.android.gms";
|
GMS_PACKAGE,
|
||||||
|
SAFETYNET_PROCESS
|
||||||
|
);
|
||||||
|
|
||||||
private static int BOTTOM_MARGIN = -1;
|
private static int BOTTOM_MARGIN = -1;
|
||||||
|
|
||||||
@ -197,7 +202,7 @@ public class ApplicationAdapter extends SectionedAdapter
|
|||||||
|
|
||||||
private void setHide(boolean add, HideAppInfo app, HideProcessInfo process) {
|
private void setHide(boolean add, HideAppInfo app, HideProcessInfo process) {
|
||||||
// Don't remove SafetyNet
|
// Don't remove SafetyNet
|
||||||
if (!add && process.name.equals(SAFETYNET_PROCESS))
|
if (!add && DEFAULT_HIDELIST.contains(process.name))
|
||||||
return;
|
return;
|
||||||
Shell.su(Utils.fmt("magiskhide --%s %s %s", add ? "add" : "rm",
|
Shell.su(Utils.fmt("magiskhide --%s %s %s", add ? "add" : "rm",
|
||||||
app.info.packageName, process.name)).submit();
|
app.info.packageName, process.name)).submit();
|
||||||
|
@ -232,6 +232,7 @@ bool init_list() {
|
|||||||
// Add SafetyNet by default
|
// Add SafetyNet by default
|
||||||
rm_list(SAFETYNET_COMPONENT);
|
rm_list(SAFETYNET_COMPONENT);
|
||||||
rm_list(SAFETYNET_PROCESS);
|
rm_list(SAFETYNET_PROCESS);
|
||||||
|
init_list(SAFETYNET_PKG, SAFETYNET_PKG);
|
||||||
init_list(SAFETYNET_PKG, SAFETYNET_PROCESS);
|
init_list(SAFETYNET_PKG, SAFETYNET_PROCESS);
|
||||||
init_list(MICROG_SAFETYNET, SAFETYNET_PROCESS);
|
init_list(MICROG_SAFETYNET, SAFETYNET_PROCESS);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user