Revert "Do not allow gms and gsf is added in any of lists"

This reverts commit 71ea510399.
This commit is contained in:
frknkrc44 2025-09-01 06:46:57 +03:00
commit 67f8126bf4
No known key found for this signature in database
GPG key ID: 784AE1CC0DCFD34F
2 changed files with 4 additions and 5 deletions

View file

@ -9,6 +9,8 @@ public class Constants {
public static final String PROVIDER_AUTHORITY = APP_PACKAGE_NAME + ".ServiceProvider";
public static final String GMS_PACKAGE_NAME = "com.google.android.gms";
public static final String GSF_PACKAGE_NAME = "com.google.android.gsf";
public static final String UPDATE_URL_BASE = "https://api.nullptr.icu/android/hide-my-applist/static/";
public static final String TRANSLATE_URL = "https://crowdin.com/project/hide-my-applist";
public static final String ANDROID_APP_DATA_ISOLATION_ENABLED_PROPERTY = "persist.zygote.app_data_isolation";
public static final String ANDROID_VOLD_APP_DATA_ISOLATION_ENABLED_PROPERTY = "persist.sys.vold_app_data_isolation_enabled";
@ -32,10 +34,6 @@ public class Constants {
"com.android.providers.media.module",
"com.android.providers.settings",
"com.google.android.webview",
"com.google.android.providers.media.module",
// hiding apps from them causes crashes in hidden apps
GMS_PACKAGE_NAME,
GSF_PACKAGE_NAME
"com.google.android.providers.media.module"
);
}

View file

@ -169,6 +169,7 @@ class HMAService(val pms: IPackageManager) : IHMAService.Stub() {
fun shouldHide(caller: String?, query: String?): Boolean {
if (caller == null || query == null) return false
if (caller in Constants.packagesShouldNotHide || query in Constants.packagesShouldNotHide) return false
if ((caller == Constants.GMS_PACKAGE_NAME || caller == Constants.GSF_PACKAGE_NAME) && query == Constants.APP_PACKAGE_NAME) return false // If apply hide on gms, hma app will crash 😓
if (caller == query) return false
val appConfig = config.scope[caller] ?: return false
if (appConfig.useWhitelist && appConfig.excludeSystemApps && query in systemApps) return false