From 9a6d1bd70005dc99b860fe0ab698914de59ca29b Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Wed, 20 Dec 2017 15:46:04 +0800 Subject: [PATCH] Add self package into blacklist --- .../com/topjohnwu/magisk/adapters/ApplicationAdapter.java | 2 +- src/main/java/com/topjohnwu/magisk/utils/Const.java | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java b/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java index a78fc849c..4a204d7bb 100644 --- a/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java +++ b/src/main/java/com/topjohnwu/magisk/adapters/ApplicationAdapter.java @@ -149,7 +149,7 @@ public class ApplicationAdapter extends RecyclerView.Adapter 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(); } } diff --git a/src/main/java/com/topjohnwu/magisk/utils/Const.java b/src/main/java/com/topjohnwu/magisk/utils/Const.java index 141abfe7a..7afd65463 100644 --- a/src/main/java/com/topjohnwu/magisk/utils/Const.java +++ b/src/main/java/com/topjohnwu/magisk/utils/Const.java @@ -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 SN_BLACKLIST = Arrays.asList( + public static final List HIDE_BLACKLIST = Arrays.asList( "android", - "com.topjohnwu.magisk", + MagiskManager.get().getPackageName(), "com.google.android.gms" );