Settings: Add PixelLauncher to allowlist for settings search

* Adapt to kotlin.

Co-authored-by: Joey Huab <joey@evolution-x.org>
This commit is contained in:
Quick
2024-12-27 14:29:50 +09:00
committed by Joey
parent 1a26a26df3
commit 1201585298

View File

@@ -40,9 +40,11 @@ open class SearchFeatureProviderImpl : SearchFeatureProvider {
"ExternalSettingsTrampoline intents must be called with startActivityForResult" "ExternalSettingsTrampoline intents must be called with startActivityForResult"
} }
val isSettingsPackage = callerPackage == context.packageName val isSettingsPackage = callerPackage == context.packageName
if (isSettingsPackage || val isAllowlistedPackage = isSignatureAllowlisted(context, callerPackage) ||
callerPackage == getSettingsIntelligencePkgName(context) || callerPackage == "com.google.android.apps.nexuslauncher"
isSignatureAllowlisted(context, callerPackage)) {
if (isSettingsPackage || isAllowlistedPackage ||
callerPackage == getSettingsIntelligencePkgName(context)) {
return return
} }
throw SecurityException( throw SecurityException(