Don't time out device listener service connections
These service bindings are managed manually based on companion device being nearby Bug: 181344542 Test: presubmit Change-Id: I459d367824c6f1b97eb532bd86f16cd1f90e07fa
This commit is contained in:
@@ -1118,11 +1118,18 @@ public class CompanionDeviceManagerService extends SystemService implements Bind
|
||||
}
|
||||
ComponentName componentName = packageResolveInfos.get(0).serviceInfo.getComponentName();
|
||||
Slog.i(LOG_TAG, "Initializing CompanionDeviceService binding for " + componentName);
|
||||
return new ServiceConnector.Impl<>(getContext(),
|
||||
return new ServiceConnector.Impl<ICompanionDeviceService>(getContext(),
|
||||
new Intent(CompanionDeviceService.SERVICE_INTERFACE).setComponent(componentName),
|
||||
BIND_IMPORTANT,
|
||||
a.getUserId(),
|
||||
ICompanionDeviceService.Stub::asInterface);
|
||||
ICompanionDeviceService.Stub::asInterface) {
|
||||
|
||||
@Override
|
||||
protected long getAutoDisconnectTimeoutMs() {
|
||||
// Service binding is managed manually based on corresponding device being nearby
|
||||
return Long.MAX_VALUE;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private class BleScanCallback extends ScanCallback {
|
||||
|
||||
Reference in New Issue
Block a user