binderHasSystemService method

  1. @override
Future<bool> binderHasSystemService(
  1. String serviceName, {
  2. PrivBinderServiceSource source = PrivBinderServiceSource.currentProcess,
  3. int? userServiceHandle,
})
override

Whether serviceName can be resolved from source.

source defaults to PrivBinderServiceSource.currentProcess.

userServiceHandle forwards the lookup through a bound UserService connection, as returned by bindUserService.

Implementation

@override
Future<bool> binderHasSystemService(
  String serviceName, {
  PrivBinderServiceSource source = PrivBinderServiceSource.currentProcess,
  int? userServiceHandle,
}) async =>
    await methodChannel
        .invokeMethod<bool>('binderHasSystemService', <String, Object?>{
          'serviceName': serviceName,
          'source': source.wireName,
          'userServiceHandle': userServiceHandle,
        }) ??
    false;