Add self package into blacklist

This commit is contained in:
topjohnwu 2017-12-20 15:46:04 +08:00
parent a7ed6c15d3
commit 9a6d1bd700
2 changed files with 5 additions and 3 deletions

View File

@ -149,7 +149,7 @@ public class ApplicationAdapter extends RecyclerView.Adapter<ApplicationAdapter.
mOriginalList = pm.getInstalledApplications(0);
for (Iterator<ApplicationInfo> i = mOriginalList.iterator(); i.hasNext(); ) {
ApplicationInfo info = i.next();
if (Const.SN_BLACKLIST.contains(info.packageName) || !info.enabled) {
if (Const.HIDE_BLACKLIST.contains(info.packageName) || !info.enabled) {
i.remove();
}
}

View File

@ -3,6 +3,8 @@ package com.topjohnwu.magisk.utils;
import android.os.Environment;
import android.os.Process;
import com.topjohnwu.magisk.MagiskManager;
import java.io.File;
import java.util.Arrays;
import java.util.List;
@ -51,9 +53,9 @@ public class Const {
}
/* A list of apps that should not be shown as hide-able */
public static final List<String> SN_BLACKLIST = Arrays.asList(
public static final List<String> HIDE_BLACKLIST = Arrays.asList(
"android",
"com.topjohnwu.magisk",
MagiskManager.get().getPackageName(),
"com.google.android.gms"
);