Verified Commit 45d4dffb authored by Marvin W.'s avatar Marvin W. 🐿

Add service to list, fix unknown service behavior

parent b7717e5d
......@@ -101,6 +101,7 @@ public enum GmsService {
WORK_ACCOUNT(120),
AD_CACHE(123, "com.google.android.gms.ads.service.CACHE"),
DYNAMIC_LINKS(131, "com.google.firebase.dynamiclinks.service.START"),
IDENTITY_SIGN_IN(212, "com.google.android.gms.auth.api.identity.service.signin.START"),
NEARBY_EXPOSURE(236, "com.google.android.gms.nearby.exposurenotification.START"),
;
......
......@@ -30,7 +30,7 @@ class ServiceProvider : ContentProvider() {
when (method) {
"serviceIntentCall" -> {
val serviceAction = extras?.getString("serviceActionBundleKey") ?: return null
val ourServiceAction = GmsService.byAction(serviceAction)?.takeIf { it.SERVICE_ID > 0 }?.ACTION
val ourServiceAction = GmsService.byAction(serviceAction)?.takeIf { it.SERVICE_ID > 0 }?.ACTION ?: serviceAction
val context = context!!
val intent = Intent(ourServiceAction).apply { `package` = context.packageName }
val resolveInfo = context.packageManager.resolveService(intent, 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment