binderFromSystemService method
Future<int?>
binderFromSystemService(
- String serviceName, {
- PrivBinderServiceSource source = PrivBinderServiceSource.currentProcess,
- int? userServiceHandle,
override
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
@override
Future<int?> binderFromSystemService(
String serviceName, {
PrivBinderServiceSource source = PrivBinderServiceSource.currentProcess,
int? userServiceHandle,
}) => methodChannel
.invokeMethod<int>('binderFromSystemService', <String, Object?>{
'serviceName': serviceName,
'source': source.wireName,
'userServiceHandle': userServiceHandle,
});