binderFromSystemService method

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

Resolves serviceName into a handle Dart can inspect.

Returns null when the service is not available from source.

source defaults to PrivBinderServiceSource.currentProcess.

userServiceHandle forwards both the lookup and the wrapper's transactions through a bound UserService connection.

A Binder cannot cross the platform channel, so Dart only gets an integer handle. Issuing the service's own transactions has to happen in Kotlin, the same way a UserService is called.

Implementation

Future<int?> binderFromSystemService(
  String serviceName, {
  PrivBinderServiceSource source = PrivBinderServiceSource.currentProcess,
  int? userServiceHandle,
}) {
  throw UnimplementedError(
    'binderFromSystemService() has not been implemented.',
  );
}