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

Commit 68bd94ee authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[CS] Create ReferenceNotificationsModule.

Almost all SysUI variants include both NotificationsModule and
NotificationRowModule. This CL combines them into a module called
ReferenceNotificationsModule and uses that module everywhere. It also
removes the notifications module from CentralSurfacesModule, and instead
just puts them at the top-level SysUI modules (since notif classes are
used by much more than just CentralSurfaces.java).

This will help the promoted notifications work, because that work will
add additional notification modules that should also be included wherever
the current modules are included.

Bug: 277764509
Test: SysUI compiles
Flag: EXEMPT refactor
Change-Id: I19390e8211ab8410eb40824752faf5dd55c08282
parent dc280f16
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -72,6 +72,7 @@ import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.dagger.CentralSurfacesModule;
import com.android.systemui.statusbar.dagger.StartCentralSurfacesModule;
import com.android.systemui.statusbar.notification.dagger.ReferenceNotificationsModule;
import com.android.systemui.statusbar.phone.CentralSurfaces;
import com.android.systemui.statusbar.phone.DozeServiceHost;
import com.android.systemui.statusbar.phone.HeadsUpModule;
@@ -145,6 +146,7 @@ import javax.inject.Named;
        QSModule.class,
        RearDisplayModule.class,
        RecentsModule.class,
        ReferenceNotificationsModule.class,
        ReferenceScreenshotModule.class,
        RotationLockModule.class,
        RotationLockNewModule.class,
+1 −4
Original line number Diff line number Diff line
@@ -17,8 +17,6 @@
package com.android.systemui.statusbar.dagger;

import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.statusbar.notification.dagger.NotificationsModule;
import com.android.systemui.statusbar.notification.row.NotificationRowModule;
import com.android.systemui.statusbar.phone.CentralSurfaces;
import com.android.systemui.statusbar.phone.CentralSurfacesImpl;
import com.android.systemui.statusbar.phone.StatusBarNotificationPresenterModule;
@@ -30,8 +28,7 @@ import dagger.Module;
 * Dagger Module providing {@link CentralSurfacesImpl}.
 */
@Module(includes = {CentralSurfacesDependenciesModule.class,
        StatusBarNotificationPresenterModule.class,
        NotificationsModule.class, NotificationRowModule.class})
        StatusBarNotificationPresenterModule.class})
public interface CentralSurfacesModule {
    /**
     * Provides our instance of CentralSurfaces which is considered optional.
+27 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 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.notification.dagger

import com.android.systemui.statusbar.notification.row.NotificationRowModule
import dagger.Module

/**
 * A module that includes the standard notifications classes that most SysUI variants need. Variants
 * are free to not include this module and instead write a custom notifications module.
 */
@Module(includes = [NotificationsModule::class, NotificationRowModule::class])
object ReferenceNotificationsModule