Update SysUi dependency injection to allow for a null LocalBluetoothManager
Test: emulator with automotive target
Change-Id: I487b473fe8cca28ad05ed97e1d5bb7c4b29464f2
diff --git a/packages/CarSystemUI/res/values/config.xml b/packages/CarSystemUI/res/values/config.xml
index c527711..2e05c38 100644
--- a/packages/CarSystemUI/res/values/config.xml
+++ b/packages/CarSystemUI/res/values/config.xml
@@ -32,7 +32,7 @@
SystemUi b/c it can't be overlayed at this level for now
-->
<string-array name="config_systemUIServiceComponents" translatable="false">
- <item>com.android.systemui.Dependency</item>
+ <item>com.android.systemui.Dependency$DependencyCreator</item>
<item>com.android.systemui.util.NotificationChannels</item>
<item>com.android.systemui.statusbar.CommandQueue$CommandQueueStart</item>
<item>com.android.systemui.keyguard.KeyguardViewMediator</item>
diff --git a/packages/SystemUI/src/com/android/systemui/Dependency.java b/packages/SystemUI/src/com/android/systemui/Dependency.java
index 445d156..51c4863 100644
--- a/packages/SystemUI/src/com/android/systemui/Dependency.java
+++ b/packages/SystemUI/src/com/android/systemui/Dependency.java
@@ -218,6 +218,7 @@
@Inject Lazy<FragmentService> mFragmentService;
@Inject Lazy<ExtensionController> mExtensionController;
@Inject Lazy<PluginDependencyProvider> mPluginDependencyProvider;
+ @Nullable
@Inject Lazy<LocalBluetoothManager> mLocalBluetoothManager;
@Inject Lazy<VolumeDialogController> mVolumeDialogController;
@Inject Lazy<MetricsLogger> mMetricsLogger;
diff --git a/packages/SystemUI/src/com/android/systemui/DependencyProvider.java b/packages/SystemUI/src/com/android/systemui/DependencyProvider.java
index b11e189..3ca7b97 100644
--- a/packages/SystemUI/src/com/android/systemui/DependencyProvider.java
+++ b/packages/SystemUI/src/com/android/systemui/DependencyProvider.java
@@ -415,6 +415,7 @@
@Singleton
@Provides
+ @Nullable
public LocalBluetoothManager provideLocalBluetoothController(Context context,
@Named(BG_HANDLER_NAME) Handler bgHandler) {
return LocalBluetoothManager.create(context, bgHandler,