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"
}
val isSettingsPackage = callerPackage == context.packageName
if (isSettingsPackage ||
callerPackage == getSettingsIntelligencePkgName(context) ||
isSignatureAllowlisted(context, callerPackage)) {
val isAllowlistedPackage = isSignatureAllowlisted(context, callerPackage) ||
callerPackage == "com.google.android.apps.nexuslauncher"
if (isSettingsPackage || isAllowlistedPackage ||
callerPackage == getSettingsIntelligencePkgName(context)) {
return
}
throw SecurityException(