mirror of https://github.com/YTVanced/VancedMicroG
Add service to list, fix unknown service behavior
This commit is contained in:
parent
b7717e5d92
commit
45d4dffb88
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue