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

Commit eea2eedd authored by Dave Mankoff's avatar Dave Mankoff
Browse files

3/N Introduce Car/TV SysUIComponent Variants

Bug: 162923491
Test: manual
Change-Id: I66c2f45631816c6ae1cf9a7ad66f4ddc2380c3be
parent 8416d1e5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -50,4 +50,7 @@ public interface CarGlobalRootComponent extends GlobalRootComponent {
    interface Builder extends GlobalRootComponent.Builder {
        CarGlobalRootComponent build();
    }

    @Override
    CarSysUIComponent.Builder getSysUIComponent();
}
+38 −0
Original line number 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();
    }
}
+9 −2
Original line number Diff line number Diff line
@@ -79,8 +79,15 @@ import dagger.Binds;
import dagger.Module;
import dagger.Provides;

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

    @Singleton
    @Provides
+4 −2
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import com.android.systemui.dagger.DependencyProvider;
import com.android.systemui.dagger.GlobalRootComponent;
import com.android.systemui.dagger.SystemServicesModule;
import com.android.systemui.dagger.SystemUIBinder;
import com.android.systemui.dagger.SystemUIDefaultModule;
import com.android.systemui.dagger.SystemUIModule;
import com.android.systemui.onehanded.dagger.OneHandedModule;

@@ -42,7 +41,7 @@ import dagger.Component;
        SystemServicesModule.class,
        SystemUIBinder.class,
        SystemUIModule.class,
        SystemUIDefaultModule.class,
        TvSystemUIModule.class,
        TvSystemUIBinder.class})
public interface TvGlobalRootComponent extends GlobalRootComponent {
    /**
@@ -52,4 +51,7 @@ public interface TvGlobalRootComponent extends GlobalRootComponent {
    interface Builder extends GlobalRootComponent.Builder {
        TvGlobalRootComponent build();
    }

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

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 TvSysUIComponent extends SysUIComponent {

    /**
     * Builder for a SysUIComponent.
     */
    @Subcomponent.Builder
    interface Builder extends SysUIComponent.Builder {
        TvSysUIComponent build();
    }
}
Loading