diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java index e66a8b16173fc..b547b4c73a916 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -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() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/CentralSurfacesComponent.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/CentralSurfacesComponent.java index d80e1d3c9f11d..e908a4b475c93 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/CentralSurfacesComponent.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/CentralSurfacesComponent.java @@ -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 getStartables(); - NotificationActivityStarter getNotificationActivityStarter(); NotificationPresenter getNotificationPresenter(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/CentralSurfacesStartableModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/CentralSurfacesStartableModule.java deleted file mode 100644 index 7ded90f7cf254..0000000000000 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/CentralSurfacesStartableModule.java +++ /dev/null @@ -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 multibindStartables(); -}