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

Commit 4a12e037 authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[Central Surfaces] Remove CentralSurfacesComponent.Startable.

There are no more implementations of this interface (see CLs attached to
b/277762009), so it can be removed.

Bug: 277762009
Test: compiles
Change-Id: Iad7dc3c3c1b4bdc04f609021276b41d9a82bbdd2
parent eb46ed0e
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -1635,10 +1635,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {

    private void inflateStatusBarWindow() {
        if (mCentralSurfacesComponent != null) {
            // Tear down
            for (CentralSurfacesComponent.Startable s : mCentralSurfacesComponent.getStartables()) {
                s.stop();
            }
            Log.e(TAG, "CentralSurfacesComponent being recreated; this is unexpected.");
        }
        mCentralSurfacesComponent = mCentralSurfacesComponentFactory.create();
        mFragmentService.addFragmentInstantiationProvider(
@@ -1682,11 +1679,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
                mCentralSurfacesComponent.getCentralSurfacesCommandQueueCallbacks();
        // Connect in to the status bar manager service
        mCommandQueue.addCallback(mCommandQueueCallbacks);

        // Perform all other initialization for CentralSurfacesScope
        for (CentralSurfacesComponent.Startable s : mCentralSurfacesComponent.getStartables()) {
            s.start();
        }
    }

    protected void startKeyguard() {
+0 −15
Original line number Diff line number Diff line
@@ -45,7 +45,6 @@ import dagger.Subcomponent;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.util.Set;

import javax.inject.Named;
import javax.inject.Scope;
@@ -60,7 +59,6 @@ import javax.inject.Scope;
 * outside the component. Should more items be moved *into* this component to avoid so many getters?
 */
@Subcomponent(modules = {
        CentralSurfacesStartableModule.class,
        NotificationStackScrollLayoutListContainerModule.class,
        StatusBarViewModule.class,
        StatusBarNotificationActivityStarterModule.class,
@@ -84,14 +82,6 @@ public interface CentralSurfacesComponent {
    @Scope
    @interface CentralSurfacesScope {}

    /**
     * Performs initialization logic after {@link CentralSurfacesComponent} has been constructed.
     */
    interface Startable {
        void start();
        void stop();
    }

    /**
     * Creates a {@link NotificationShadeWindowView}.
     */
@@ -148,11 +138,6 @@ public interface CentralSurfacesComponent {
    @Named(STATUS_BAR_FRAGMENT)
    CollapsedStatusBarFragment createCollapsedStatusBarFragment();

    /**
     * Set of startables to be run after a CentralSurfacesComponent has been constructed.
     */
    Set<Startable> getStartables();

    NotificationActivityStarter getNotificationActivityStarter();

    NotificationPresenter getNotificationPresenter();
+0 −28
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 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.statusbar.phone.dagger;

import dagger.Module;
import dagger.multibindings.Multibinds;

import java.util.Set;

@Module
interface CentralSurfacesStartableModule {
    @Multibinds
    Set<CentralSurfacesComponent.Startable> multibindStartables();
}