Apply internal whitelist only to system Apps

This commit is contained in:
Jonas Lochmann 2022-04-11 02:00:00 +02:00
parent 346a66eb58
commit 8048ae35b9
No known key found for this signature in database
GPG key ID: 8B8C9AEE10FA5B36

View file

@ -112,7 +112,7 @@ sealed class AppBaseHandling {
return PauseLogic return PauseLogic
} else if ( } else if (
(foregroundAppPackageName == BuildConfig.APPLICATION_ID) || (foregroundAppPackageName == BuildConfig.APPLICATION_ID) ||
(foregroundAppPackageName != null && AndroidIntegrationApps.ignoredApps[foregroundAppPackageName].let { (foregroundAppPackageName != null && isSystemImageApp && AndroidIntegrationApps.ignoredApps[foregroundAppPackageName].let {
when (it) { when (it) {
null -> false null -> false
AndroidIntegrationApps.IgnoredAppHandling.Ignore -> true AndroidIntegrationApps.IgnoredAppHandling.Ignore -> true
@ -123,7 +123,7 @@ sealed class AppBaseHandling {
return Whitelist.App return Whitelist.App
} else if ( } else if (
foregroundAppPackageName != null && foregroundAppActivityName != null && foregroundAppPackageName != null && foregroundAppActivityName != null &&
AndroidIntegrationApps.shouldIgnoreActivity(foregroundAppPackageName, foregroundAppActivityName) isSystemImageApp && AndroidIntegrationApps.shouldIgnoreActivity(foregroundAppPackageName, foregroundAppActivityName)
) { ) {
return Whitelist.Activity return Whitelist.Activity
} else if (foregroundAppPackageName != null && deviceRelatedData.temporarilyAllowedApps.contains(foregroundAppPackageName)) { } else if (foregroundAppPackageName != null && deviceRelatedData.temporarilyAllowedApps.contains(foregroundAppPackageName)) {