code: private boolean validateServiceIntent(Context context, Intent intent) {
          ResolveInfo resolveInfo = context.getPackageManager().resolveService(intent, 0);
          if (resolveInfo == null) {
              return false;
          }
  
          return validateAppSignatureForPackage(context, resolveInfo.serviceInfo.packageName);
      }
docs: Helper to validate a service intent by resolving and checking the
  provider's package signature.
  
  @param context
  @param intent
  @return true if the service intent resolution happens successfully and
  the signatures match.