Merge "Split ReferenceSysUIComponent off of SysUIComponent." into tm-qpr-dev
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
package com.android.systemui
|
package com.android.systemui
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import com.android.systemui.dagger.DaggerGlobalRootComponent
|
import com.android.systemui.dagger.DaggerReferenceGlobalRootComponent
|
||||||
import com.android.systemui.dagger.GlobalRootComponent
|
import com.android.systemui.dagger.GlobalRootComponent
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,6 +25,6 @@ import com.android.systemui.dagger.GlobalRootComponent
|
|||||||
*/
|
*/
|
||||||
class SystemUIInitializerImpl(context: Context) : SystemUIInitializer(context) {
|
class SystemUIInitializerImpl(context: Context) : SystemUIInitializer(context) {
|
||||||
override fun getGlobalRootComponentBuilder(): GlobalRootComponent.Builder {
|
override fun getGlobalRootComponentBuilder(): GlobalRootComponent.Builder {
|
||||||
return DaggerGlobalRootComponent.builder()
|
return DaggerReferenceGlobalRootComponent.builder()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ import dagger.BindsInstance;
|
|||||||
import dagger.Component;
|
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
|
@Singleton
|
||||||
@Component(modules = {GlobalModule.class})
|
@Component(modules = {GlobalModule.class})
|
||||||
@@ -51,7 +53,7 @@ public interface GlobalRootComponent {
|
|||||||
WMComponent.Builder getWMComponentBuilder();
|
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();
|
SysUIComponent.Builder getSysUIComponent();
|
||||||
|
|
||||||
|
|||||||
@@ -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();
|
||||||
|
}
|
||||||
@@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -57,7 +57,9 @@ import dagger.BindsInstance;
|
|||||||
import dagger.Subcomponent;
|
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
|
@SysUISingleton
|
||||||
@Subcomponent(modules = {
|
@Subcomponent(modules = {
|
||||||
|
|||||||
Reference in New Issue
Block a user