Creating a BluetoothDeviceConnectionPolicy in CarService for Bluetooth Autoconnect.
A policy driven approach to trigger connection attempts to devices that have
previously connected to the vehicle. The policy listens for signals from the car
to decide on when to make the attempt and maintains a list of devices that it
can attempt the connections on for a given profile.
Bug: b/33080250
Test: New feature, testing using Car tests.
Change-Id: I6086c65a934f1721550a1049f5f7d95ae1d5251a
diff --git a/service/src/com/android/car/ICarImpl.java b/service/src/com/android/car/ICarImpl.java
index e05efaa..459682d 100644
--- a/service/src/com/android/car/ICarImpl.java
+++ b/service/src/com/android/car/ICarImpl.java
@@ -70,6 +70,7 @@
private final InstrumentClusterService mInstrumentClusterService;
private final SystemStateControllerService mSystemStateControllerService;
private final CarVendorExtensionService mCarVendorExtensionService;
+ private final CarBluetoothService mCarBluetoothService;
private final CarServiceBase[] mAllServices;
@@ -104,6 +105,7 @@
mCarPowerManagementService, mCarAudioService, this);
mCarVendorExtensionService = new CarVendorExtensionService(serviceContext,
mHal.getVendorExtensionHal());
+ mCarBluetoothService = new CarBluetoothService(serviceContext, mCarCabinService);
// Be careful with order. Service depending on other service should be inited later.
mAllServices = new CarServiceBase[]{
@@ -124,7 +126,8 @@
mInstrumentClusterService,
mCarProjectionService,
mSystemStateControllerService,
- mCarVendorExtensionService
+ mCarVendorExtensionService,
+ mCarBluetoothService
};
}