[Central Surfaces] NSSLC snoozes with NotificationsController directly.

Removes a CentralSurfaces reference by having NSSLC talk directly to
NotificationsController.

Bug: 277764509
Bug: 277762009
Test: manual: verified NotificationsController still notified when
notification is snoozed
Test: atest NotificationStackScrollLayoutControllerTest
CentralSurfacesImplTest

Change-Id: I2e9948e2c0d0f6677c34b2f3dc758334fbe6289a
This commit is contained in:
Caitlin Shkuratov
2023-05-26 16:10:40 +00:00
parent 8120ae65bc
commit 36ed357ccd
3 changed files with 1 additions and 13 deletions

View File

@@ -433,7 +433,7 @@ public class NotificationStackScrollLayoutController {
@Override
public void onSnooze(StatusBarNotification sbn,
NotificationSwipeActionHelper.SnoozeOption snoozeOption) {
mCentralSurfaces.setNotificationSnoozed(sbn, snoozeOption);
mNotificationsController.setNotificationSnoozed(sbn, snoozeOption);
}
@Override

View File

@@ -26,7 +26,6 @@ import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.PowerManager;
import android.os.UserHandle;
import android.service.notification.StatusBarNotification;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.RemoteAnimationAdapter;
@@ -44,7 +43,6 @@ import com.android.systemui.Dumpable;
import com.android.systemui.animation.ActivityLaunchAnimator;
import com.android.systemui.navigationbar.NavigationBarView;
import com.android.systemui.plugins.ActivityStarter.OnDismissAction;
import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper;
import com.android.systemui.qs.QSPanelController;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.shared.system.RemoteAnimationRunnerCompat;
@@ -381,9 +379,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {
boolean isDeviceInteractive();
void setNotificationSnoozed(StatusBarNotification sbn,
NotificationSwipeActionHelper.SnoozeOption snoozeOption);
void awakenDreams();
void clearNotificationEffects();

View File

@@ -173,7 +173,6 @@ import com.android.systemui.plugins.PluginDependencyProvider;
import com.android.systemui.plugins.PluginListener;
import com.android.systemui.plugins.PluginManager;
import com.android.systemui.plugins.qs.QS;
import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.SnoozeOption;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.qs.QSFragment;
import com.android.systemui.qs.QSPanelController;
@@ -3571,12 +3570,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
}
};
@Override
public void setNotificationSnoozed(StatusBarNotification sbn, SnoozeOption snoozeOption) {
mNotificationsController.setNotificationSnoozed(sbn, snoozeOption);
}
@Override
public void awakenDreams() {
mUiBgExecutor.execute(() -> {