Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1da23870 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Don't time out device listener service connections" into sc-dev

parents 874b0a96 2573e000
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -1120,11 +1120,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 {