Skip to content

Commit

Permalink
Add service to list, fix unknown service behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
mar-v-in committed Dec 21, 2020
1 parent b7717e5 commit 45d4dff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 45d4dff

Please sign in to comment.