Merge "[Central Surfaces] Remove CentralSurfacesComponent.Startable." into udc-dev

This commit is contained in:
Treehugger Robot
2023-04-21 16:34:33 +00:00
committed by Android (Google) Code Review
3 changed files with 1 additions and 52 deletions

View File

@@ -1637,10 +1637,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() {

View File

@@ -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}.
*/
@@ -143,11 +133,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();

View File

@@ -1,28 +0,0 @@
/*
* 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();
}