Merge "Split ReferenceSysUIComponent off of SysUIComponent." into tm-qpr-dev am: 3345f99f8b am: 4b47730c99

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20385291

Change-Id: I8660ee0918a26a820cccde265d172e3d300330d7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Dave Mankoff
2022-11-04 22:47:36 +00:00
committed by Automerger Merge Worker
5 changed files with 96 additions and 5 deletions

View File

@@ -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()
}
}

View File

@@ -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();

View File

@@ -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();
}

View File

@@ -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();
}
}

View File

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