Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 49f75e42 authored by Dave Mankoff's avatar Dave Mankoff Committed by Android (Google) Code Review
Browse files

Merge changes from topic "b162923491-wm-sysui-subcomponents"

* changes:
  5/N Reduce number of accessors of root component.
  4/N Simplify InjectionInflationController.
  3/N Introduce Car/TV SysUIComponent Variants
  2/N: Introduce WMComponent and SysUIComponent.
  1/N: Rename SysuiRootComponent to GlobalRootComponent
parents ca774c06 8552807a
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
-keep class com.android.systemui.CarSystemUIFactory
-keep class com.android.systemui.CarSystemUIFactory
-keep class com.android.car.notification.headsup.animationhelper.**
-keep class com.android.car.notification.headsup.animationhelper.**


-keep class com.android.systemui.CarGlobalRootComponent { *; }

-include ../SystemUI/proguard.flags
-include ../SystemUI/proguard.flags
+9 −5
Original line number Original line Diff line number Diff line
@@ -18,9 +18,9 @@ package com.android.systemui;


import com.android.systemui.dagger.DependencyBinder;
import com.android.systemui.dagger.DependencyBinder;
import com.android.systemui.dagger.DependencyProvider;
import com.android.systemui.dagger.DependencyProvider;
import com.android.systemui.dagger.GlobalRootComponent;
import com.android.systemui.dagger.SystemServicesModule;
import com.android.systemui.dagger.SystemServicesModule;
import com.android.systemui.dagger.SystemUIModule;
import com.android.systemui.dagger.SystemUIModule;
import com.android.systemui.dagger.SystemUIRootComponent;
import com.android.systemui.onehanded.dagger.OneHandedModule;
import com.android.systemui.onehanded.dagger.OneHandedModule;
import com.android.systemui.pip.phone.dagger.PipModule;
import com.android.systemui.pip.phone.dagger.PipModule;


@@ -28,6 +28,7 @@ import javax.inject.Singleton;


import dagger.Component;
import dagger.Component;


/** Car subclass for GlobalRootComponent. */
@Singleton
@Singleton
@Component(
@Component(
        modules = {
        modules = {
@@ -41,12 +42,15 @@ import dagger.Component;
                CarSystemUIModule.class,
                CarSystemUIModule.class,
                CarSystemUIBinder.class
                CarSystemUIBinder.class
        })
        })
public interface CarSystemUIRootComponent extends SystemUIRootComponent {
public interface CarGlobalRootComponent extends GlobalRootComponent {
    /**
    /**
     * Builder for a CarSystemUIRootComponent.
     * Builder for a CarGlobalRootComponent.
     */
     */
    @Component.Builder
    @Component.Builder
    interface Builder extends SystemUIRootComponent.Builder {
    interface Builder extends GlobalRootComponent.Builder {
        CarSystemUIRootComponent build();
        CarGlobalRootComponent build();
    }
    }

    @Override
    CarSysUIComponent.Builder getSysUIComponent();
}
}
+38 −0
Original line number Original line Diff line number Diff line
/*
 * 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;

import com.android.systemui.dagger.SysUIComponent;
import com.android.systemui.dagger.SysUISingleton;

import dagger.Subcomponent;

/**
 * Dagger Subcomponent for Core SysUI.
 */
@SysUISingleton
@Subcomponent(modules = {})
public interface CarSysUIComponent extends SysUIComponent {

    /**
     * Builder for a CarSysUIComponent.
     */
    @Subcomponent.Builder
    interface Builder extends SysUIComponent.Builder {
        CarSysUIComponent build();
    }
}
+3 −3
Original line number Original line Diff line number Diff line
@@ -19,7 +19,7 @@ package com.android.systemui;
import android.content.Context;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.Resources;


import com.android.systemui.dagger.SystemUIRootComponent;
import com.android.systemui.dagger.GlobalRootComponent;


import java.util.HashSet;
import java.util.HashSet;
import java.util.Set;
import java.util.Set;
@@ -30,8 +30,8 @@ import java.util.Set;
public class CarSystemUIFactory extends SystemUIFactory {
public class CarSystemUIFactory extends SystemUIFactory {


    @Override
    @Override
    protected SystemUIRootComponent buildSystemUIRootComponent(Context context) {
    protected GlobalRootComponent buildGlobalRootComponent(Context context) {
        return DaggerCarSystemUIRootComponent.builder()
        return DaggerCarGlobalRootComponent.builder()
                .context(context)
                .context(context)
                .build();
                .build();
    }
    }
+12 −5
Original line number Original line Diff line number Diff line
@@ -32,7 +32,7 @@ import com.android.systemui.car.keyguard.CarKeyguardViewController;
import com.android.systemui.car.statusbar.DozeServiceHost;
import com.android.systemui.car.statusbar.DozeServiceHost;
import com.android.systemui.car.statusbar.DummyNotificationShadeWindowController;
import com.android.systemui.car.statusbar.DummyNotificationShadeWindowController;
import com.android.systemui.car.volume.CarVolumeDialogComponent;
import com.android.systemui.car.volume.CarVolumeDialogComponent;
import com.android.systemui.dagger.SystemUIRootComponent;
import com.android.systemui.dagger.GlobalRootComponent;
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.Background;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dock.DockManager;
import com.android.systemui.dock.DockManager;
@@ -79,8 +79,15 @@ import dagger.Binds;
import dagger.Module;
import dagger.Module;
import dagger.Provides;
import dagger.Provides;


@Module(includes = {DividerModule.class, QSModule.class})
@Module(
public abstract class CarSystemUIModule {
        includes = {
                DividerModule.class,
                QSModule.class
        },
        subcomponents = {
                CarSysUIComponent.class
        })
abstract class CarSystemUIModule {


    @Singleton
    @Singleton
    @Provides
    @Provides
@@ -188,8 +195,8 @@ public abstract class CarSystemUIModule {
    abstract ShadeController provideShadeController(ShadeControllerImpl shadeController);
    abstract ShadeController provideShadeController(ShadeControllerImpl shadeController);


    @Binds
    @Binds
    abstract SystemUIRootComponent bindSystemUIRootComponent(
    abstract GlobalRootComponent bindGlobalRootComponent(
            CarSystemUIRootComponent systemUIRootComponent);
            CarGlobalRootComponent globalRootComponent);


    @Binds
    @Binds
    abstract VolumeDialogComponent bindVolumeDialogComponent(
    abstract VolumeDialogComponent bindVolumeDialogComponent(
Loading