From d85b1641dab5f6d621a57dfcbd9b06e9c252f584 Mon Sep 17 00:00:00 2001 From: Amir Zaidi Date: Fri, 7 Sep 2018 18:07:10 +0200 Subject: [PATCH] Always hide activities from own package --- .../google/android/apps/nexuslauncher/CustomAppFilter.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/google/android/apps/nexuslauncher/CustomAppFilter.java b/src/com/google/android/apps/nexuslauncher/CustomAppFilter.java index 9bb96ab80d..587310e770 100644 --- a/src/com/google/android/apps/nexuslauncher/CustomAppFilter.java +++ b/src/com/google/android/apps/nexuslauncher/CustomAppFilter.java @@ -5,6 +5,7 @@ import android.content.SharedPreferences; import android.os.UserHandle; +import com.android.launcher3.BuildConfig; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherModel; import com.android.launcher3.Utilities; @@ -25,6 +26,9 @@ public CustomAppFilter(Context context) { @Override public boolean shouldShowApp(ComponentName componentName, UserHandle user) { + if (componentName.getPackageName().equals(BuildConfig.APPLICATION_ID)) { + return false; + } if (CustomIconUtils.usingValidPack(mContext)) { return !isHiddenApp(mContext, new ComponentKey(componentName, user)); }