Update SysUi dependency injection to allow for a null LocalBluetoothManager

Test: emulator with automotive target
Change-Id: I487b473fe8cca28ad05ed97e1d5bb7c4b29464f2
This commit is contained in:
Brad Stenning
2018-12-20 11:25:06 -08:00
parent 793806444f
commit 32cedc1907
3 changed files with 3 additions and 1 deletions

View File

@@ -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>

View File

@@ -218,6 +218,7 @@ public class Dependency extends SystemUI {
@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;

View File

@@ -415,6 +415,7 @@ public class DependencyProvider {
@Singleton
@Provides
@Nullable
public LocalBluetoothManager provideLocalBluetoothController(Context context,
@Named(BG_HANDLER_NAME) Handler bgHandler) {
return LocalBluetoothManager.create(context, bgHandler,