diff options
| author | 2022-11-04 20:53:55 +0000 | |
|---|---|---|
| committer | 2022-11-04 20:53:55 +0000 | |
| commit | 3345f99f8b66c735aa04094b97bbb37c07c1ff35 (patch) | |
| tree | 0da2f8c534312ec7f87005f689e3372d6e51882a | |
| parent | 91d982458cda226a267159fff0eb3975144a5c29 (diff) | |
| parent | 5f141f2a46262207d3d368254e05501f231c61be (diff) | |
Merge "Split ReferenceSysUIComponent off of SysUIComponent." into tm-qpr-dev
5 files changed, 96 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIInitializerImpl.kt b/packages/SystemUI/src/com/android/systemui/SystemUIInitializerImpl.kt index 8920c928da09..8aa3040c6015 100644 --- a/packages/SystemUI/src/com/android/systemui/SystemUIInitializerImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/SystemUIInitializerImpl.kt @@ -17,7 +17,7 @@ package com.android.systemui import android.content.Context -import com.android.systemui.dagger.DaggerGlobalRootComponent +import com.android.systemui.dagger.DaggerReferenceGlobalRootComponent import com.android.systemui.dagger.GlobalRootComponent /** @@ -25,6 +25,6 @@ import com.android.systemui.dagger.GlobalRootComponent */ class SystemUIInitializerImpl(context: Context) : SystemUIInitializer(context) { override fun getGlobalRootComponentBuilder(): GlobalRootComponent.Builder { - return DaggerGlobalRootComponent.builder() + return DaggerReferenceGlobalRootComponent.builder() } } diff --git a/packages/SystemUI/src/com/android/systemui/dagger/GlobalRootComponent.java b/packages/SystemUI/src/com/android/systemui/dagger/GlobalRootComponent.java index 9e33ee1faab3..fe89c9a1e3b9 100644 --- a/packages/SystemUI/src/com/android/systemui/dagger/GlobalRootComponent.java +++ b/packages/SystemUI/src/com/android/systemui/dagger/GlobalRootComponent.java @@ -27,7 +27,9 @@ import dagger.BindsInstance; import dagger.Component; /** - * Root component for Dagger injection. + * Base root component for Dagger injection. + * + * See {@link ReferenceGlobalRootComponent} for the one actually used by AOSP. */ @Singleton @Component(modules = {GlobalModule.class}) @@ -51,7 +53,7 @@ public interface GlobalRootComponent { WMComponent.Builder getWMComponentBuilder(); /** - * Builder for a {@link SysUIComponent}, which makes it a subcomponent of this class. + * Builder for a {@link ReferenceSysUIComponent}, which makes it a subcomponent of this class. */ SysUIComponent.Builder getSysUIComponent(); diff --git a/packages/SystemUI/src/com/android/systemui/dagger/ReferenceGlobalRootComponent.java b/packages/SystemUI/src/com/android/systemui/dagger/ReferenceGlobalRootComponent.java new file mode 100644 index 000000000000..be93c9fdf395 --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/dagger/ReferenceGlobalRootComponent.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.dagger; + +import javax.inject.Singleton; + +import dagger.Component; + +/** + * Root component for Dagger injection used in AOSP. + */ +@Singleton +@Component(modules = {GlobalModule.class}) +public interface ReferenceGlobalRootComponent extends GlobalRootComponent { + + /** + * Builder for a ReferenceGlobalRootComponent. + */ + @Component.Builder + interface Builder extends GlobalRootComponent.Builder { + ReferenceGlobalRootComponent build(); + } + + /** + * Builder for a {@link ReferenceSysUIComponent}, which makes it a subcomponent of this class. + */ + ReferenceSysUIComponent.Builder getSysUIComponent(); +} diff --git a/packages/SystemUI/src/com/android/systemui/dagger/ReferenceSysUIComponent.java b/packages/SystemUI/src/com/android/systemui/dagger/ReferenceSysUIComponent.java new file mode 100644 index 000000000000..7ab36e84178e --- /dev/null +++ b/packages/SystemUI/src/com/android/systemui/dagger/ReferenceSysUIComponent.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.dagger; + +import com.android.systemui.statusbar.QsFrameTranslateModule; + +import dagger.Subcomponent; + +/** + * Dagger Subcomponent for Core SysUI used in AOSP. + */ +@SysUISingleton +@Subcomponent(modules = { + DefaultComponentBinder.class, + DependencyProvider.class, + QsFrameTranslateModule.class, + SystemUIBinder.class, + SystemUIModule.class, + SystemUICoreStartableModule.class, + ReferenceSystemUIModule.class}) +public interface ReferenceSysUIComponent extends SysUIComponent { + + /** + * Builder for a ReferenceSysUIComponent. + */ + @SysUISingleton + @Subcomponent.Builder + interface Builder extends SysUIComponent.Builder { + ReferenceSysUIComponent build(); + } +} diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SysUIComponent.java b/packages/SystemUI/src/com/android/systemui/dagger/SysUIComponent.java index c260b7df2b45..a14b0ee04d8a 100644 --- a/packages/SystemUI/src/com/android/systemui/dagger/SysUIComponent.java +++ b/packages/SystemUI/src/com/android/systemui/dagger/SysUIComponent.java @@ -57,7 +57,9 @@ import dagger.BindsInstance; import dagger.Subcomponent; /** - * Dagger Subcomponent for Core SysUI. + * An example Dagger Subcomponent for Core SysUI. + * + * See {@link ReferenceSysUIComponent} for the one actually used by AOSP. */ @SysUISingleton @Subcomponent(modules = { |