Merge "Remove NotifEntryManager" into tm-qpr-dev

This commit is contained in:
TreeHugger Robot
2022-09-03 07:49:28 +00:00
committed by Android (Google) Code Review
36 changed files with 28 additions and 671 deletions

View File

@@ -85,8 +85,6 @@ import com.android.systemui.statusbar.SmartReplyController;
import com.android.systemui.statusbar.VibratorHelper; import com.android.systemui.statusbar.VibratorHelper;
import com.android.systemui.statusbar.events.PrivacyDotViewController; import com.android.systemui.statusbar.events.PrivacyDotViewController;
import com.android.systemui.statusbar.events.SystemStatusAnimationScheduler; import com.android.systemui.statusbar.events.SystemStatusAnimationScheduler;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.NotificationEntryManager.KeyguardEnvironment;
import com.android.systemui.statusbar.notification.collection.render.GroupExpansionManager; import com.android.systemui.statusbar.notification.collection.render.GroupExpansionManager;
import com.android.systemui.statusbar.notification.collection.render.GroupMembershipManager; import com.android.systemui.statusbar.notification.collection.render.GroupMembershipManager;
import com.android.systemui.statusbar.notification.logging.NotificationLogger; import com.android.systemui.statusbar.notification.logging.NotificationLogger;
@@ -301,7 +299,6 @@ public class Dependency {
@Inject Lazy<IStatusBarService> mIStatusBarService; @Inject Lazy<IStatusBarService> mIStatusBarService;
@Inject Lazy<DisplayMetrics> mDisplayMetrics; @Inject Lazy<DisplayMetrics> mDisplayMetrics;
@Inject Lazy<LockscreenGestureLogger> mLockscreenGestureLogger; @Inject Lazy<LockscreenGestureLogger> mLockscreenGestureLogger;
@Inject Lazy<KeyguardEnvironment> mKeyguardEnvironment;
@Inject Lazy<ShadeController> mShadeController; @Inject Lazy<ShadeController> mShadeController;
@Inject Lazy<NotificationRemoteInputManager.Callback> mNotificationRemoteInputManagerCallback; @Inject Lazy<NotificationRemoteInputManager.Callback> mNotificationRemoteInputManagerCallback;
@Inject Lazy<AppOpsController> mAppOpsController; @Inject Lazy<AppOpsController> mAppOpsController;
@@ -318,10 +315,8 @@ public class Dependency {
@Inject Lazy<KeyguardDismissUtil> mKeyguardDismissUtil; @Inject Lazy<KeyguardDismissUtil> mKeyguardDismissUtil;
@Inject Lazy<SmartReplyController> mSmartReplyController; @Inject Lazy<SmartReplyController> mSmartReplyController;
@Inject Lazy<RemoteInputQuickSettingsDisabler> mRemoteInputQuickSettingsDisabler; @Inject Lazy<RemoteInputQuickSettingsDisabler> mRemoteInputQuickSettingsDisabler;
@Inject Lazy<NotificationEntryManager> mNotificationEntryManager;
@Inject Lazy<SensorPrivacyManager> mSensorPrivacyManager; @Inject Lazy<SensorPrivacyManager> mSensorPrivacyManager;
@Inject Lazy<AutoHideController> mAutoHideController; @Inject Lazy<AutoHideController> mAutoHideController;
@Inject Lazy<ForegroundServiceNotificationListener> mForegroundServiceNotificationListener;
@Inject Lazy<PrivacyItemController> mPrivacyItemController; @Inject Lazy<PrivacyItemController> mPrivacyItemController;
@Inject @Background Lazy<Looper> mBgLooper; @Inject @Background Lazy<Looper> mBgLooper;
@Inject @Background Lazy<Handler> mBgHandler; @Inject @Background Lazy<Handler> mBgHandler;
@@ -503,7 +498,6 @@ public class Dependency {
mProviders.put(LockscreenGestureLogger.class, mLockscreenGestureLogger::get); mProviders.put(LockscreenGestureLogger.class, mLockscreenGestureLogger::get);
mProviders.put(KeyguardEnvironment.class, mKeyguardEnvironment::get);
mProviders.put(ShadeController.class, mShadeController::get); mProviders.put(ShadeController.class, mShadeController::get);
mProviders.put(NotificationRemoteInputManager.Callback.class, mProviders.put(NotificationRemoteInputManager.Callback.class,
@@ -530,9 +524,6 @@ public class Dependency {
mProviders.put(SmartReplyController.class, mSmartReplyController::get); mProviders.put(SmartReplyController.class, mSmartReplyController::get);
mProviders.put(RemoteInputQuickSettingsDisabler.class, mProviders.put(RemoteInputQuickSettingsDisabler.class,
mRemoteInputQuickSettingsDisabler::get); mRemoteInputQuickSettingsDisabler::get);
mProviders.put(NotificationEntryManager.class, mNotificationEntryManager::get);
mProviders.put(ForegroundServiceNotificationListener.class,
mForegroundServiceNotificationListener::get);
mProviders.put(ClockManager.class, mClockManager::get); mProviders.put(ClockManager.class, mClockManager::get);
mProviders.put(PrivacyItemController.class, mPrivacyItemController::get); mProviders.put(PrivacyItemController.class, mPrivacyItemController::get);
mProviders.put(ActivityManagerWrapper.class, mActivityManagerWrapper::get); mProviders.put(ActivityManagerWrapper.class, mActivityManagerWrapper::get);

View File

@@ -23,14 +23,10 @@ import android.os.Bundle;
import android.service.notification.StatusBarNotification; import android.service.notification.StatusBarNotification;
import android.util.Log; import android.util.Log;
import com.android.internal.statusbar.NotificationVisibility;
import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.statusbar.notification.NotificationEntryListener;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotifPipeline; import com.android.systemui.statusbar.notification.collection.NotifPipeline;
import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener; import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener;
import com.android.systemui.util.time.SystemClock;
import javax.inject.Inject; import javax.inject.Inject;
@@ -43,42 +39,20 @@ public class ForegroundServiceNotificationListener {
private final Context mContext; private final Context mContext;
private final ForegroundServiceController mForegroundServiceController; private final ForegroundServiceController mForegroundServiceController;
private final NotificationEntryManager mEntryManager; private final NotifPipeline mNotifPipeline;
@Inject @Inject
public ForegroundServiceNotificationListener(Context context, public ForegroundServiceNotificationListener(Context context,
ForegroundServiceController foregroundServiceController, ForegroundServiceController foregroundServiceController,
NotificationEntryManager notificationEntryManager, NotifPipeline notifPipeline) {
NotifPipeline notifPipeline,
SystemClock systemClock) {
mContext = context; mContext = context;
mForegroundServiceController = foregroundServiceController; mForegroundServiceController = foregroundServiceController;
mNotifPipeline = notifPipeline;
}
// TODO: (b/145659174) remove mEntryManager when moving to NewNotifPipeline. Replaced by /** Initializes this listener by connecting it to the notification pipeline. */
// ForegroundCoordinator public void init() {
mEntryManager = notificationEntryManager; mNotifPipeline.addCollectionListener(new NotifCollectionListener() {
mEntryManager.addNotificationEntryListener(new NotificationEntryListener() {
@Override
public void onPendingEntryAdded(NotificationEntry entry) {
addNotification(entry, entry.getImportance());
}
@Override
public void onPreEntryUpdated(NotificationEntry entry) {
updateNotification(entry, entry.getImportance());
}
@Override
public void onEntryRemoved(
NotificationEntry entry,
NotificationVisibility visibility,
boolean removedByUser,
int reason) {
removeNotification(entry.getSbn());
}
});
notifPipeline.addCollectionListener(new NotifCollectionListener() {
@Override @Override
public void onEntryAdded(NotificationEntry entry) { public void onEntryAdded(NotificationEntry entry) {
addNotification(entry, entry.getImportance()); addNotification(entry, entry.getImportance());

View File

@@ -54,13 +54,11 @@ import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationLockscreenUserManagerImpl; import com.android.systemui.statusbar.NotificationLockscreenUserManagerImpl;
import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.dagger.StartCentralSurfacesModule; import com.android.systemui.statusbar.dagger.StartCentralSurfacesModule;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.provider.VisualStabilityProvider; import com.android.systemui.statusbar.notification.collection.provider.VisualStabilityProvider;
import com.android.systemui.statusbar.notification.collection.render.GroupMembershipManager; import com.android.systemui.statusbar.notification.collection.render.GroupMembershipManager;
import com.android.systemui.statusbar.phone.DozeServiceHost; import com.android.systemui.statusbar.phone.DozeServiceHost;
import com.android.systemui.statusbar.phone.HeadsUpManagerPhone; import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.KeyguardBypassController;
import com.android.systemui.statusbar.phone.KeyguardEnvironmentImpl;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper; import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper;
import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.statusbar.policy.BatteryController;
@@ -169,10 +167,6 @@ public abstract class ReferenceSystemUIModule {
@Binds @Binds
abstract DockManager bindDockManager(DockManagerImpl dockManager); abstract DockManager bindDockManager(DockManagerImpl dockManager);
@Binds
abstract NotificationEntryManager.KeyguardEnvironment bindKeyguardEnvironment(
KeyguardEnvironmentImpl keyguardEnvironment);
@Binds @Binds
abstract ShadeController provideShadeController(ShadeControllerImpl shadeController); abstract ShadeController provideShadeController(ShadeControllerImpl shadeController);

View File

@@ -161,7 +161,6 @@ import com.android.systemui.statusbar.events.PrivacyDotViewController;
import com.android.systemui.statusbar.notification.AnimatableProperty; import com.android.systemui.statusbar.notification.AnimatableProperty;
import com.android.systemui.statusbar.notification.ConversationNotificationManager; import com.android.systemui.statusbar.notification.ConversationNotificationManager;
import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.DynamicPrivacyController;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator; import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
import com.android.systemui.statusbar.notification.PropertyAnimator; import com.android.systemui.statusbar.notification.PropertyAnimator;
import com.android.systemui.statusbar.notification.ViewGroupFadeHelper; import com.android.systemui.statusbar.notification.ViewGroupFadeHelper;
@@ -518,7 +517,6 @@ public final class NotificationPanelViewController extends PanelViewController {
} }
}).setCustomInterpolator( }).setCustomInterpolator(
mPanelAlphaAnimator.getProperty(), Interpolators.ALPHA_IN); mPanelAlphaAnimator.getProperty(), Interpolators.ALPHA_IN);
private final NotificationEntryManager mEntryManager;
private final CommandQueue mCommandQueue; private final CommandQueue mCommandQueue;
private final UserManager mUserManager; private final UserManager mUserManager;
@@ -709,7 +707,6 @@ public final class NotificationPanelViewController extends PanelViewController {
DynamicPrivacyController dynamicPrivacyController, DynamicPrivacyController dynamicPrivacyController,
KeyguardBypassController bypassController, FalsingManager falsingManager, KeyguardBypassController bypassController, FalsingManager falsingManager,
FalsingCollector falsingCollector, FalsingCollector falsingCollector,
NotificationEntryManager notificationEntryManager,
KeyguardStateController keyguardStateController, KeyguardStateController keyguardStateController,
StatusBarStateController statusBarStateController, StatusBarStateController statusBarStateController,
StatusBarWindowStateController statusBarWindowStateController, StatusBarWindowStateController statusBarWindowStateController,
@@ -867,7 +864,6 @@ public final class NotificationPanelViewController extends PanelViewController {
}); });
mBottomAreaShadeAlphaAnimator.setDuration(160); mBottomAreaShadeAlphaAnimator.setDuration(160);
mBottomAreaShadeAlphaAnimator.setInterpolator(Interpolators.ALPHA_OUT); mBottomAreaShadeAlphaAnimator.setInterpolator(Interpolators.ALPHA_OUT);
mEntryManager = notificationEntryManager;
mConversationNotificationManager = conversationNotificationManager; mConversationNotificationManager = conversationNotificationManager;
mAuthController = authController; mAuthController = authController;
mLockIconViewController = lockIconViewController; mLockIconViewController = lockIconViewController;
@@ -4729,7 +4725,6 @@ public final class NotificationPanelViewController extends PanelViewController {
public void showAodUi() { public void showAodUi() {
setDozing(true /* dozing */, false /* animate */); setDozing(true /* dozing */, false /* animate */);
mStatusBarStateController.setUpcomingState(KEYGUARD); mStatusBarStateController.setUpcomingState(KEYGUARD);
mEntryManager.updateNotifications("showAodUi");
mStatusBarStateListener.onStateChanged(KEYGUARD); mStatusBarStateListener.onStateChanged(KEYGUARD);
mStatusBarStateListener.onDozeAmountChanged(1f, 1f); mStatusBarStateListener.onDozeAmountChanged(1f, 1f);
setExpandedFraction(1f); setExpandedFraction(1f);

View File

@@ -51,7 +51,6 @@ import com.android.systemui.dump.DumpManager;
import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener; import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener;
import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.recents.OverviewProxyService;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection; import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection;
import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider;
@@ -85,9 +84,6 @@ public class NotificationLockscreenUserManagerImpl implements
private final SecureSettings mSecureSettings; private final SecureSettings mSecureSettings;
private final Object mLock = new Object(); private final Object mLock = new Object();
// Lazy
private NotificationEntryManager mEntryManager;
private final Lazy<NotificationVisibilityProvider> mVisibilityProviderLazy; private final Lazy<NotificationVisibilityProvider> mVisibilityProviderLazy;
private final Lazy<CommonNotifCollection> mCommonNotifCollectionLazy; private final Lazy<CommonNotifCollection> mCommonNotifCollectionLazy;
private final DevicePolicyManager mDevicePolicyManager; private final DevicePolicyManager mDevicePolicyManager;
@@ -119,7 +115,6 @@ public class NotificationLockscreenUserManagerImpl implements
isCurrentProfile(getSendingUserId())) { isCurrentProfile(getSendingUserId())) {
mUsersAllowingPrivateNotifications.clear(); mUsersAllowingPrivateNotifications.clear();
updateLockscreenNotificationSetting(); updateLockscreenNotificationSetting();
getEntryManager().updateNotifications("ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED");
// TODO(b/231976036): Consolidate pipeline invalidations related to this event // TODO(b/231976036): Consolidate pipeline invalidations related to this event
// notifyNotificationStateChanged(); // notifyNotificationStateChanged();
} }
@@ -140,10 +135,6 @@ public class NotificationLockscreenUserManagerImpl implements
updateLockscreenNotificationSetting(); updateLockscreenNotificationSetting();
updatePublicMode(); updatePublicMode();
// The filtering needs to happen before the update call below in order to
// make sure
// the presenter has the updated notifications from the new user
getEntryManager().reapplyFilterAndSort("user switched");
mPresenter.onUserSwitched(mCurrentUserId); mPresenter.onUserSwitched(mCurrentUserId);
for (UserChangedListener listener : mListeners) { for (UserChangedListener listener : mListeners) {
@@ -200,13 +191,6 @@ public class NotificationLockscreenUserManagerImpl implements
protected ContentObserver mSettingsObserver; protected ContentObserver mSettingsObserver;
private boolean mHideSilentNotificationsOnLockscreen; private boolean mHideSilentNotificationsOnLockscreen;
private NotificationEntryManager getEntryManager() {
if (mEntryManager == null) {
mEntryManager = Dependency.get(NotificationEntryManager.class);
}
return mEntryManager;
}
@Inject @Inject
public NotificationLockscreenUserManagerImpl(Context context, public NotificationLockscreenUserManagerImpl(Context context,
BroadcastDispatcher broadcastDispatcher, BroadcastDispatcher broadcastDispatcher,
@@ -253,8 +237,6 @@ public class NotificationLockscreenUserManagerImpl implements
mUsersAllowingNotifications.clear(); mUsersAllowingNotifications.clear();
// ... and refresh all the notifications // ... and refresh all the notifications
updateLockscreenNotificationSetting(); updateLockscreenNotificationSetting();
getEntryManager().updateNotifications("LOCK_SCREEN_SHOW_NOTIFICATIONS,"
+ " or LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS change");
notifyNotificationStateChanged(); notifyNotificationStateChanged();
} }
}; };
@@ -264,8 +246,6 @@ public class NotificationLockscreenUserManagerImpl implements
public void onChange(boolean selfChange) { public void onChange(boolean selfChange) {
updateLockscreenNotificationSetting(); updateLockscreenNotificationSetting();
if (mDeviceProvisionedController.isDeviceProvisioned()) { if (mDeviceProvisionedController.isDeviceProvisioned()) {
getEntryManager().updateNotifications("LOCK_SCREEN_ALLOW_REMOTE_INPUT"
+ " or ZEN_MODE change");
// TODO(b/231976036): Consolidate pipeline invalidations related to this event // TODO(b/231976036): Consolidate pipeline invalidations related to this event
// notifyNotificationStateChanged(); // notifyNotificationStateChanged();
} }
@@ -596,7 +576,6 @@ public class NotificationLockscreenUserManagerImpl implements
setLockscreenPublicMode(isProfilePublic, userId); setLockscreenPublicMode(isProfilePublic, userId);
mUsersWithSeparateWorkChallenge.put(userId, needsSeparateChallenge); mUsersWithSeparateWorkChallenge.put(userId, needsSeparateChallenge);
} }
getEntryManager().updateNotifications("NotificationLockscreenUserManager.updatePublicMode");
// TODO(b/234738798): Migrate KeyguardNotificationVisibilityProvider to use this listener // TODO(b/234738798): Migrate KeyguardNotificationVisibilityProvider to use this listener
if (!mLockscreenPublicMode.equals(oldPublicModes) if (!mLockscreenPublicMode.equals(oldPublicModes)
|| !mUsersWithSeparateWorkChallenge.equals(oldWorkChallenges)) { || !mUsersWithSeparateWorkChallenge.equals(oldWorkChallenges)) {

View File

@@ -53,8 +53,6 @@ import com.android.systemui.dump.DumpManager;
import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.dagger.CentralSurfacesDependenciesModule; import com.android.systemui.statusbar.dagger.CentralSurfacesDependenciesModule;
import com.android.systemui.statusbar.notification.NotifPipelineFlags; import com.android.systemui.statusbar.notification.NotifPipelineFlags;
import com.android.systemui.statusbar.notification.NotificationEntryListener;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.collection.NotificationEntry.EditedSuggestionInfo; import com.android.systemui.statusbar.notification.collection.NotificationEntry.EditedSuggestionInfo;
import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider;
@@ -256,7 +254,6 @@ public class NotificationRemoteInputManager implements Dumpable {
NotificationLockscreenUserManager lockscreenUserManager, NotificationLockscreenUserManager lockscreenUserManager,
SmartReplyController smartReplyController, SmartReplyController smartReplyController,
NotificationVisibilityProvider visibilityProvider, NotificationVisibilityProvider visibilityProvider,
NotificationEntryManager notificationEntryManager,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy,
StatusBarStateController statusBarStateController, StatusBarStateController statusBarStateController,
RemoteInputUriController remoteInputUriController, RemoteInputUriController remoteInputUriController,
@@ -279,25 +276,6 @@ public class NotificationRemoteInputManager implements Dumpable {
mClickNotifier = clickNotifier; mClickNotifier = clickNotifier;
dumpManager.registerDumpable(this); dumpManager.registerDumpable(this);
notificationEntryManager.addNotificationEntryListener(new NotificationEntryListener() {
@Override
public void onPreEntryUpdated(NotificationEntry entry) {
// Mark smart replies as sent whenever a notification is updated - otherwise the
// smart replies are never marked as sent.
mSmartReplyController.stopSending(entry);
}
@Override
public void onEntryRemoved(
@Nullable NotificationEntry entry,
NotificationVisibility visibility,
boolean removedByUser,
int reason) {
// We're removing the notification, the smart controller can forget about it.
mSmartReplyController.stopSending(entry);
}
});
} }
/** Add a listener for various remote input events. Works with NEW pipeline only. */ /** Add a listener for various remote input events. Works with NEW pipeline only. */

View File

@@ -18,7 +18,6 @@ package com.android.systemui.statusbar.dagger;
import android.app.IActivityManager; import android.app.IActivityManager;
import android.content.Context; import android.content.Context;
import android.os.Handler;
import android.os.RemoteException; import android.os.RemoteException;
import android.service.dreams.IDreamManager; import android.service.dreams.IDreamManager;
import android.util.Log; import android.util.Log;
@@ -42,14 +41,12 @@ import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationMediaManager; import com.android.systemui.statusbar.NotificationMediaManager;
import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.RemoteInputNotificationRebuilder;
import com.android.systemui.statusbar.SmartReplyController; import com.android.systemui.statusbar.SmartReplyController;
import com.android.systemui.statusbar.StatusBarStateControllerImpl; import com.android.systemui.statusbar.StatusBarStateControllerImpl;
import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.commandline.CommandRegistry; import com.android.systemui.statusbar.commandline.CommandRegistry;
import com.android.systemui.statusbar.gesture.SwipeStatusBarAwayGestureHandler; import com.android.systemui.statusbar.gesture.SwipeStatusBarAwayGestureHandler;
import com.android.systemui.statusbar.notification.NotifPipelineFlags; import com.android.systemui.statusbar.notification.NotifPipelineFlags;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotifCollection; import com.android.systemui.statusbar.notification.collection.NotifCollection;
import com.android.systemui.statusbar.notification.collection.NotifPipeline; import com.android.systemui.statusbar.notification.collection.NotifPipeline;
import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection; import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection;
@@ -99,11 +96,8 @@ public interface CentralSurfacesDependenciesModule {
NotificationLockscreenUserManager lockscreenUserManager, NotificationLockscreenUserManager lockscreenUserManager,
SmartReplyController smartReplyController, SmartReplyController smartReplyController,
NotificationVisibilityProvider visibilityProvider, NotificationVisibilityProvider visibilityProvider,
NotificationEntryManager notificationEntryManager,
RemoteInputNotificationRebuilder rebuilder,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy,
StatusBarStateController statusBarStateController, StatusBarStateController statusBarStateController,
Handler mainHandler,
RemoteInputUriController remoteInputUriController, RemoteInputUriController remoteInputUriController,
NotificationClickNotifier clickNotifier, NotificationClickNotifier clickNotifier,
ActionClickLogger actionClickLogger, ActionClickLogger actionClickLogger,
@@ -114,7 +108,6 @@ public interface CentralSurfacesDependenciesModule {
lockscreenUserManager, lockscreenUserManager,
smartReplyController, smartReplyController,
visibilityProvider, visibilityProvider,
notificationEntryManager,
centralSurfacesOptionalLazy, centralSurfacesOptionalLazy,
statusBarStateController, statusBarStateController,
remoteInputUriController, remoteInputUriController,

View File

@@ -1,174 +0,0 @@
/*
* Copyright (C) 2017 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;
import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
import android.util.ArrayMap;
import androidx.annotation.NonNull;
import com.android.internal.annotations.VisibleForTesting;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener;
import com.android.systemui.statusbar.notification.dagger.NotificationsModule;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
/**
* NotificationEntryManager is responsible for the adding, removing, and updating of
* {@link NotificationEntry}s. It also handles tasks such as their inflation and their interaction
* with other Notification.*Manager objects.
*
* We track notification entries through this lifecycle:
* 1. Pending
* 2. Active
* 3. Sorted / filtered (visible)
*
* Every entry spends some amount of time in the pending state, while it is being inflated. Once
* inflated, an entry moves into the active state, where it _could_ potentially be shown to the
* user. After an entry makes its way into the active state, we sort and filter the entire set to
* repopulate the visible set.
*/
public class NotificationEntryManager {
private final NotificationEntryManagerLogger mLogger;
/** Pending notifications are ones awaiting inflation */
@VisibleForTesting
protected final HashMap<String, NotificationEntry> mPendingNotifications = new HashMap<>();
/**
* Active notifications have been inflated / prepared and could become visible, but may get
* filtered out if for instance they are not for the current user
*/
private final ArrayMap<String, NotificationEntry> mActiveNotifications = new ArrayMap<>();
/** This is the list of "active notifications for this user in this context" */
@VisibleForTesting
protected final ArrayList<NotificationEntry> mSortedAndFiltered = new ArrayList<>();
private final List<NotifCollectionListener> mNotifCollectionListeners = new ArrayList<>();
private final List<NotificationEntryListener> mNotificationEntryListeners = new ArrayList<>();
/**
* Injected constructor. See {@link NotificationsModule}.
*/
public NotificationEntryManager(NotificationEntryManagerLogger logger) {
mLogger = logger;
}
/** Adds a {@link NotificationEntryListener}. */
public void addNotificationEntryListener(NotificationEntryListener listener) {
mNotificationEntryListeners.add(listener);
}
/**
* Removes a {@link NotificationEntryListener} previously registered via
* {@link #addNotificationEntryListener(NotificationEntryListener)}.
*/
public void removeNotificationEntryListener(NotificationEntryListener listener) {
mNotificationEntryListeners.remove(listener);
}
/**
* Update the notifications
* @param reason why the notifications are updating
*/
public void updateNotifications(String reason) {
mLogger.logUseWhileNewPipelineActive("updateNotifications", reason);
}
/*
* -----
* Annexed from NotificationData below:
* Some of these methods may be redundant but require some reworking to remove. For now
* we'll try to keep the behavior the same and can simplify these interfaces in another pass
*/
/** Resorts / filters the current notification set with the current RankingMap */
public void reapplyFilterAndSort(String reason) {
mLogger.logUseWhileNewPipelineActive("reapplyFilterAndSort", reason);
}
/** dump the current active notification list. Called from CentralSurfaces */
public void dump(PrintWriter pw, String indent) {
pw.println("NotificationEntryManager (Legacy)");
int filteredLen = mSortedAndFiltered.size();
pw.print(indent);
pw.println("active notifications: " + filteredLen);
int active;
for (active = 0; active < filteredLen; active++) {
NotificationEntry e = mSortedAndFiltered.get(active);
dumpEntry(pw, indent, active, e);
}
synchronized (mActiveNotifications) {
int totalLen = mActiveNotifications.size();
pw.print(indent);
pw.println("inactive notifications: " + (totalLen - active));
int inactiveCount = 0;
for (int i = 0; i < totalLen; i++) {
NotificationEntry entry = mActiveNotifications.valueAt(i);
if (!mSortedAndFiltered.contains(entry)) {
dumpEntry(pw, indent, inactiveCount, entry);
inactiveCount++;
}
}
}
}
private void dumpEntry(PrintWriter pw, String indent, int i, NotificationEntry e) {
pw.print(indent);
pw.println(" [" + i + "] key=" + e.getKey() + " icon=" + e.getIcons().getStatusBarIcon());
StatusBarNotification n = e.getSbn();
pw.print(indent);
pw.println(" pkg=" + n.getPackageName() + " id=" + n.getId() + " importance="
+ e.getRanking().getImportance());
pw.print(indent);
pw.println(" notification=" + n.getNotification());
}
public void addCollectionListener(@NonNull NotifCollectionListener listener) {
mNotifCollectionListeners.add(listener);
}
public void removeCollectionListener(@NonNull NotifCollectionListener listener) {
mNotifCollectionListeners.remove(listener);
}
/*
* End annexation
* -----
*/
/**
* Provides access to keyguard state and user settings dependent data.
*/
public interface KeyguardEnvironment {
/** true if the device is provisioned (should always be true in practice) */
boolean isDeviceProvisioned();
/** true if the notification is for the current profiles */
boolean isNotificationForCurrentProfiles(StatusBarNotification sbn);
}
/**
* Used when a notification is removed and it doesn't have a reason that maps to one of the
* reasons defined in NotificationListenerService
* (e.g. {@link NotificationListenerService#REASON_CANCEL})
*/
public static final int UNDEFINED_DISMISS_REASON = 0;
}

View File

@@ -1,124 +0,0 @@
/*
* Copyright (C) 2020 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
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.LogLevel
import com.android.systemui.log.LogLevel.DEBUG
import com.android.systemui.log.LogLevel.INFO
import com.android.systemui.log.LogLevel.WARNING
import com.android.systemui.log.LogMessage
import com.android.systemui.log.dagger.NotificationLog
import com.android.systemui.util.Compile
import javax.inject.Inject
/** Logger for [NotificationEntryManager]. */
class NotificationEntryManagerLogger @Inject constructor(
notifPipelineFlags: NotifPipelineFlags,
@NotificationLog private val buffer: LogBuffer
) {
private val devLoggingEnabled by lazy { notifPipelineFlags.isDevLoggingEnabled() }
private inline fun devLog(
level: LogLevel,
initializer: LogMessage.() -> Unit,
noinline printer: LogMessage.() -> String
) {
if (Compile.IS_DEBUG && devLoggingEnabled) buffer.log(TAG, level, initializer, printer)
}
fun logNotifAdded(key: String) {
devLog(INFO, {
str1 = key
}, {
"NOTIF ADDED $str1"
})
}
fun logNotifUpdated(key: String) {
devLog(INFO, {
str1 = key
}, {
"NOTIF UPDATED $str1"
})
}
fun logInflationAborted(key: String, status: String, reason: String) {
devLog(DEBUG, {
str1 = key
str2 = status
str3 = reason
}, {
"NOTIF INFLATION ABORTED $str1 notifStatus=$str2 reason=$str3"
})
}
fun logNotifInflated(key: String, isNew: Boolean) {
devLog(DEBUG, {
str1 = key
bool1 = isNew
}, {
"NOTIF INFLATED $str1 isNew=$bool1}"
})
}
fun logRemovalIntercepted(key: String) {
devLog(INFO, {
str1 = key
}, {
"NOTIF REMOVE INTERCEPTED for $str1"
})
}
fun logLifetimeExtended(key: String, extenderName: String, status: String) {
devLog(INFO, {
str1 = key
str2 = extenderName
str3 = status
}, {
"NOTIF LIFETIME EXTENDED $str1 extender=$str2 status=$str3"
})
}
fun logNotifRemoved(key: String, removedByUser: Boolean) {
devLog(INFO, {
str1 = key
bool1 = removedByUser
}, {
"NOTIF REMOVED $str1 removedByUser=$bool1"
})
}
fun logFilterAndSort(reason: String) {
devLog(INFO, {
str1 = reason
}, {
"FILTER AND SORT reason=$str1"
})
}
fun logUseWhileNewPipelineActive(method: String, reason: String) {
buffer.log(TAG, WARNING, {
str1 = method
str2 = reason
}, {
"While running New Pipeline: $str1(reason=$str2)"
})
}
}
private const val TAG = "NotificationEntryMgr"

View File

@@ -20,11 +20,9 @@ import android.app.smartspace.SmartspaceTarget
import android.os.Parcelable import android.os.Parcelable
import com.android.systemui.dagger.qualifiers.Main import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.statusbar.NotificationLockscreenUserManager
import com.android.systemui.statusbar.StatusBarState import com.android.systemui.statusbar.StatusBarState
import com.android.systemui.statusbar.SysuiStatusBarStateController import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.lockscreen.LockscreenSmartspaceController import com.android.systemui.statusbar.lockscreen.LockscreenSmartspaceController
import com.android.systemui.statusbar.notification.NotificationEntryManager
import com.android.systemui.statusbar.notification.collection.NotifPipeline import com.android.systemui.statusbar.notification.collection.NotifPipeline
import com.android.systemui.statusbar.notification.collection.NotificationEntry import com.android.systemui.statusbar.notification.collection.NotificationEntry
import com.android.systemui.statusbar.notification.collection.coordinator.dagger.CoordinatorScope import com.android.systemui.statusbar.notification.collection.coordinator.dagger.CoordinatorScope
@@ -44,14 +42,10 @@ import javax.inject.Inject
* In addition, notifications that have recently alerted aren't filtered. Tracking this in a way * In addition, notifications that have recently alerted aren't filtered. Tracking this in a way
* that involves the fewest pipeline invalidations requires some unfortunately complex logic. * that involves the fewest pipeline invalidations requires some unfortunately complex logic.
*/ */
// This class is a singleton so that the same instance can be accessed by both the old and new
// pipelines
@CoordinatorScope @CoordinatorScope
class SmartspaceDedupingCoordinator @Inject constructor( class SmartspaceDedupingCoordinator @Inject constructor(
private val statusBarStateController: SysuiStatusBarStateController, private val statusBarStateController: SysuiStatusBarStateController,
private val smartspaceController: LockscreenSmartspaceController, private val smartspaceController: LockscreenSmartspaceController,
private val notificationEntryManager: NotificationEntryManager,
private val notificationLockscreenUserManager: NotificationLockscreenUserManager,
private val notifPipeline: NotifPipeline, private val notifPipeline: NotifPipeline,
@Main private val executor: DelayableExecutor, @Main private val executor: DelayableExecutor,
private val clock: SystemClock private val clock: SystemClock
@@ -132,7 +126,6 @@ class SmartspaceDedupingCoordinator @Inject constructor(
if (changed) { if (changed) {
filter.invalidateList("onNewSmartspaceTargets") filter.invalidateList("onNewSmartspaceTargets")
notificationEntryManager.updateNotifications("Smartspace targets changed")
} }
trackedSmartspaceTargets = newMap trackedSmartspaceTargets = newMap
@@ -169,7 +162,6 @@ class SmartspaceDedupingCoordinator @Inject constructor(
target.cancelTimeoutRunnable = null target.cancelTimeoutRunnable = null
target.shouldFilter = true target.shouldFilter = true
filter.invalidateList("updateAlertException: ${entry.logKey}") filter.invalidateList("updateAlertException: ${entry.logKey}")
notificationEntryManager.updateNotifications("deduping timeout expired")
}, alertExceptionExpires - now) }, alertExceptionExpires - now)
} }
} }

View File

@@ -19,12 +19,11 @@ package com.android.systemui.statusbar.notification.collection.inflation;
import android.annotation.NonNull; import android.annotation.NonNull;
import com.android.systemui.statusbar.notification.InflationException; import com.android.systemui.statusbar.notification.InflationException;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder; import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder;
/** /**
* Used by the {@link NotificationEntryManager}. When notifications are added or updated, the binder * Used by the {@link NotifInflater}. When notifications are added or updated, the binder
* is asked to (re)inflate and prepare their views. This inflation must occur off the main thread. * is asked to (re)inflate and prepare their views. This inflation must occur off the main thread.
*/ */
public interface NotificationRowBinder { public interface NotificationRowBinder {

View File

@@ -19,7 +19,6 @@ package com.android.systemui.statusbar.notification.collection.notifcollection;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotifPipeline; import com.android.systemui.statusbar.notification.collection.NotifPipeline;
import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry;
@@ -29,9 +28,8 @@ import java.util.Collection;
* A notification collection that manages the list of {@link NotificationEntry}s that will be * A notification collection that manages the list of {@link NotificationEntry}s that will be
* rendered. * rendered.
* *
* TODO: (b/145659174) Once we fully switch off {@link NotificationEntryManager} to * TODO: (b/145659174) Once we fully migrate to {@link NotifPipeline}, we probably won't need this,
* {@link NotifPipeline}, we probably won't need this, but having it for now makes it easy to * but having it for now makes it easy to switch between the two.
* switch between the two.
*/ */
public interface CommonNotifCollection { public interface CommonNotifCollection {
/** /**

View File

@@ -36,8 +36,6 @@ import com.android.systemui.shade.NotifPanelEventsModule;
import com.android.systemui.shade.ShadeController; import com.android.systemui.shade.ShadeController;
import com.android.systemui.statusbar.NotificationListener; import com.android.systemui.statusbar.NotificationListener;
import com.android.systemui.statusbar.notification.AssistantFeedbackController; import com.android.systemui.statusbar.notification.AssistantFeedbackController;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.NotificationEntryManagerLogger;
import com.android.systemui.statusbar.notification.collection.NotifInflaterImpl; import com.android.systemui.statusbar.notification.collection.NotifInflaterImpl;
import com.android.systemui.statusbar.notification.collection.NotifLiveDataStore; import com.android.systemui.statusbar.notification.collection.NotifLiveDataStore;
import com.android.systemui.statusbar.notification.collection.NotifLiveDataStoreImpl; import com.android.systemui.statusbar.notification.collection.NotifLiveDataStoreImpl;
@@ -106,14 +104,6 @@ public interface NotificationsModule {
@Binds @Binds
StackScrollAlgorithm.BypassController bindBypassController(KeyguardBypassController impl); StackScrollAlgorithm.BypassController bindBypassController(KeyguardBypassController impl);
/** Provides an instance of {@link NotificationEntryManager} */
@SysUISingleton
@Provides
static NotificationEntryManager provideNotificationEntryManager(
NotificationEntryManagerLogger logger) {
return new NotificationEntryManager(logger);
}
/** Provides an instance of {@link NotificationGutsManager} */ /** Provides an instance of {@link NotificationGutsManager} */
@SysUISingleton @SysUISingleton
@Provides @Provides

View File

@@ -23,7 +23,6 @@ import com.android.systemui.statusbar.notification.NotificationActivityStarter
import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl
import com.android.systemui.statusbar.notification.collection.render.NotifStackController import com.android.systemui.statusbar.notification.collection.render.NotifStackController
import com.android.systemui.statusbar.notification.stack.NotificationListContainer import com.android.systemui.statusbar.notification.stack.NotificationListContainer
import java.io.PrintWriter
/** /**
* The master controller for all notifications-related work * The master controller for all notifications-related work
@@ -40,9 +39,7 @@ interface NotificationsController {
bindRowCallback: NotificationRowBinderImpl.BindRowCallback bindRowCallback: NotificationRowBinderImpl.BindRowCallback
) )
fun requestNotificationUpdate(reason: String)
fun resetUserExpandedStates() fun resetUserExpandedStates()
fun setNotificationSnoozed(sbn: StatusBarNotification, snoozeOption: SnoozeOption) fun setNotificationSnoozed(sbn: StatusBarNotification, snoozeOption: SnoozeOption)
fun getActiveNotificationsCount(): Int fun getActiveNotificationsCount(): Int
fun dump(pw: PrintWriter, args: Array<String>, dumpTruck: Boolean)
} }

View File

@@ -17,6 +17,7 @@
package com.android.systemui.statusbar.notification.init package com.android.systemui.statusbar.notification.init
import android.service.notification.StatusBarNotification import android.service.notification.StatusBarNotification
import com.android.systemui.ForegroundServiceNotificationListener
import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.people.widget.PeopleSpaceWidgetManager import com.android.systemui.people.widget.PeopleSpaceWidgetManager
import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.SnoozeOption import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.SnoozeOption
@@ -25,7 +26,6 @@ import com.android.systemui.statusbar.NotificationPresenter
import com.android.systemui.statusbar.notification.AnimatedImageNotificationManager import com.android.systemui.statusbar.notification.AnimatedImageNotificationManager
import com.android.systemui.statusbar.notification.NotificationActivityStarter import com.android.systemui.statusbar.notification.NotificationActivityStarter
import com.android.systemui.statusbar.notification.NotificationClicker import com.android.systemui.statusbar.notification.NotificationClicker
import com.android.systemui.statusbar.notification.NotificationEntryManager
import com.android.systemui.statusbar.notification.collection.NotifLiveDataStore import com.android.systemui.statusbar.notification.collection.NotifLiveDataStore
import com.android.systemui.statusbar.notification.collection.NotifPipeline import com.android.systemui.statusbar.notification.collection.NotifPipeline
import com.android.systemui.statusbar.notification.collection.NotificationEntry import com.android.systemui.statusbar.notification.collection.NotificationEntry
@@ -41,7 +41,6 @@ import com.android.systemui.statusbar.notification.stack.NotificationListContain
import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.systemui.statusbar.phone.CentralSurfaces
import com.android.wm.shell.bubbles.Bubbles import com.android.wm.shell.bubbles.Bubbles
import dagger.Lazy import dagger.Lazy
import java.io.PrintWriter
import java.util.Optional import java.util.Optional
import javax.inject.Inject import javax.inject.Inject
@@ -56,7 +55,6 @@ import javax.inject.Inject
class NotificationsControllerImpl @Inject constructor( class NotificationsControllerImpl @Inject constructor(
private val centralSurfaces: Lazy<CentralSurfaces>, private val centralSurfaces: Lazy<CentralSurfaces>,
private val notificationListener: NotificationListener, private val notificationListener: NotificationListener,
private val entryManager: NotificationEntryManager,
private val commonNotifCollection: Lazy<CommonNotifCollection>, private val commonNotifCollection: Lazy<CommonNotifCollection>,
private val notifPipeline: Lazy<NotifPipeline>, private val notifPipeline: Lazy<NotifPipeline>,
private val notifLiveDataStore: NotifLiveDataStore, private val notifLiveDataStore: NotifLiveDataStore,
@@ -69,6 +67,7 @@ class NotificationsControllerImpl @Inject constructor(
private val animatedImageNotificationManager: AnimatedImageNotificationManager, private val animatedImageNotificationManager: AnimatedImageNotificationManager,
private val peopleSpaceWidgetManager: PeopleSpaceWidgetManager, private val peopleSpaceWidgetManager: PeopleSpaceWidgetManager,
private val bubblesOptional: Optional<Bubbles>, private val bubblesOptional: Optional<Bubbles>,
private val fgsNotifListener: ForegroundServiceNotificationListener,
) : NotificationsController { ) : NotificationsController {
override fun initialize( override fun initialize(
@@ -107,24 +106,11 @@ class NotificationsControllerImpl @Inject constructor(
targetSdkResolver.initialize(notifPipeline.get()) targetSdkResolver.initialize(notifPipeline.get())
peopleSpaceWidgetManager.attach(notificationListener) peopleSpaceWidgetManager.attach(notificationListener)
} fgsNotifListener.init()
override fun dump(
pw: PrintWriter,
args: Array<String>,
dumpTruck: Boolean
) {
if (dumpTruck) {
entryManager.dump(pw, " ")
}
} }
// TODO: Convert all functions below this line into listeners instead of public methods // TODO: Convert all functions below this line into listeners instead of public methods
override fun requestNotificationUpdate(reason: String) {
entryManager.updateNotifications(reason)
}
override fun resetUserExpandedStates() { override fun resetUserExpandedStates() {
// TODO: this is a view thing that should be done through the views, but that means doing it // TODO: this is a view thing that should be done through the views, but that means doing it
// both when this event is fired and any time a row is attached. // both when this event is fired and any time a row is attached.

View File

@@ -24,7 +24,6 @@ import com.android.systemui.statusbar.notification.NotificationActivityStarter
import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl
import com.android.systemui.statusbar.notification.collection.render.NotifStackController import com.android.systemui.statusbar.notification.collection.render.NotifStackController
import com.android.systemui.statusbar.notification.stack.NotificationListContainer import com.android.systemui.statusbar.notification.stack.NotificationListContainer
import java.io.PrintWriter
import javax.inject.Inject import javax.inject.Inject
/** /**
@@ -46,9 +45,6 @@ class NotificationsControllerStub @Inject constructor(
notificationListener.registerAsSystemService() notificationListener.registerAsSystemService()
} }
override fun requestNotificationUpdate(reason: String) {
}
override fun resetUserExpandedStates() { override fun resetUserExpandedStates() {
} }
@@ -58,14 +54,4 @@ class NotificationsControllerStub @Inject constructor(
override fun getActiveNotificationsCount(): Int { override fun getActiveNotificationsCount(): Int {
return 0 return 0
} }
override fun dump(
pw: PrintWriter,
args: Array<String>,
dumpTruck: Boolean
) {
pw.println()
pw.println("Notification handling disabled")
pw.println()
}
} }

View File

@@ -81,7 +81,6 @@ import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.DynamicPrivacyController;
import com.android.systemui.statusbar.notification.LaunchAnimationParameters; import com.android.systemui.statusbar.notification.LaunchAnimationParameters;
import com.android.systemui.statusbar.notification.NotificationActivityStarter; import com.android.systemui.statusbar.notification.NotificationActivityStarter;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotifCollection; import com.android.systemui.statusbar.notification.collection.NotifCollection;
import com.android.systemui.statusbar.notification.collection.NotifPipeline; import com.android.systemui.statusbar.notification.collection.NotifPipeline;
import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry;
@@ -155,7 +154,6 @@ public class NotificationStackScrollLayoutController {
private final ScrimController mScrimController; private final ScrimController mScrimController;
private final NotifPipeline mNotifPipeline; private final NotifPipeline mNotifPipeline;
private final NotifCollection mNotifCollection; private final NotifCollection mNotifCollection;
private final NotificationEntryManager mNotificationEntryManager;
private final UiEventLogger mUiEventLogger; private final UiEventLogger mUiEventLogger;
private final NotificationRemoteInputManager mRemoteInputManager; private final NotificationRemoteInputManager mRemoteInputManager;
private final ShadeController mShadeController; private final ShadeController mShadeController;
@@ -307,7 +305,6 @@ public class NotificationStackScrollLayoutController {
mView.updateSensitiveness(mStatusBarStateController.goingToFullShade(), mView.updateSensitiveness(mStatusBarStateController.goingToFullShade(),
mLockscreenUserManager.isAnyProfilePublicMode()); mLockscreenUserManager.isAnyProfilePublicMode());
mView.onStatePostChange(mStatusBarStateController.fromShadeLocked()); mView.onStatePostChange(mStatusBarStateController.fromShadeLocked());
mNotificationEntryManager.updateNotifications("CentralSurfaces state changed");
} }
}; };
@@ -634,7 +631,6 @@ public class NotificationStackScrollLayoutController {
@SilentHeader SectionHeaderController silentHeaderController, @SilentHeader SectionHeaderController silentHeaderController,
NotifPipeline notifPipeline, NotifPipeline notifPipeline,
NotifCollection notifCollection, NotifCollection notifCollection,
NotificationEntryManager notificationEntryManager,
LockscreenShadeTransitionController lockscreenShadeTransitionController, LockscreenShadeTransitionController lockscreenShadeTransitionController,
ShadeTransitionController shadeTransitionController, ShadeTransitionController shadeTransitionController,
UiEventLogger uiEventLogger, UiEventLogger uiEventLogger,
@@ -676,7 +672,6 @@ public class NotificationStackScrollLayoutController {
mSilentHeaderController = silentHeaderController; mSilentHeaderController = silentHeaderController;
mNotifPipeline = notifPipeline; mNotifPipeline = notifPipeline;
mNotifCollection = notifCollection; mNotifCollection = notifCollection;
mNotificationEntryManager = notificationEntryManager;
mUiEventLogger = uiEventLogger; mUiEventLogger = uiEventLogger;
mRemoteInputManager = remoteInputManager; mRemoteInputManager = remoteInputManager;
mShadeController = shadeController; mShadeController = shadeController;

View File

@@ -225,8 +225,6 @@ public interface CentralSurfaces extends Dumpable, ActivityStarter, LifecycleOwn
boolean isShadeDisabled(); boolean isShadeDisabled();
void requestNotificationUpdate(String reason);
void requestFaceAuth(boolean userInitiatedRequest); void requestFaceAuth(boolean userInitiatedRequest);
@Override @Override

View File

@@ -203,7 +203,6 @@ import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.core.StatusBarInitializer; import com.android.systemui.statusbar.core.StatusBarInitializer;
import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.DynamicPrivacyController;
import com.android.systemui.statusbar.notification.NotificationActivityStarter; import com.android.systemui.statusbar.notification.NotificationActivityStarter;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.NotificationLaunchAnimatorControllerProvider; import com.android.systemui.statusbar.notification.NotificationLaunchAnimatorControllerProvider;
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator; import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
import com.android.systemui.statusbar.notification.init.NotificationsController; import com.android.systemui.statusbar.notification.init.NotificationsController;
@@ -508,7 +507,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
private boolean mExpandedVisible; private boolean mExpandedVisible;
protected final NotificationEntryManager mEntryManager;
private final NotificationGutsManager mGutsManager; private final NotificationGutsManager mGutsManager;
private final NotificationLogger mNotificationLogger; private final NotificationLogger mNotificationLogger;
private final PanelExpansionStateManager mPanelExpansionStateManager; private final PanelExpansionStateManager mPanelExpansionStateManager;
@@ -681,7 +679,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
FalsingManager falsingManager, FalsingManager falsingManager,
FalsingCollector falsingCollector, FalsingCollector falsingCollector,
BroadcastDispatcher broadcastDispatcher, BroadcastDispatcher broadcastDispatcher,
NotificationEntryManager notificationEntryManager,
NotificationGutsManager notificationGutsManager, NotificationGutsManager notificationGutsManager,
NotificationLogger notificationLogger, NotificationLogger notificationLogger,
NotificationInterruptStateProvider notificationInterruptStateProvider, NotificationInterruptStateProvider notificationInterruptStateProvider,
@@ -768,7 +765,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
mFalsingCollector = falsingCollector; mFalsingCollector = falsingCollector;
mFalsingManager = falsingManager; mFalsingManager = falsingManager;
mBroadcastDispatcher = broadcastDispatcher; mBroadcastDispatcher = broadcastDispatcher;
mEntryManager = notificationEntryManager;
mGutsManager = notificationGutsManager; mGutsManager = notificationGutsManager;
mNotificationLogger = notificationLogger; mNotificationLogger = notificationLogger;
mNotificationInterruptStateProvider = notificationInterruptStateProvider; mNotificationInterruptStateProvider = notificationInterruptStateProvider;
@@ -839,11 +835,8 @@ public class CentralSurfacesImpl extends CoreStartable implements
mPanelExpansionStateManager.addExpansionListener(this::onPanelExpansionChanged); mPanelExpansionStateManager.addExpansionListener(this::onPanelExpansionChanged);
mBubbleExpandListener = mBubbleExpandListener = (isExpanding, key) ->
(isExpanding, key) -> mContext.getMainExecutor().execute(() -> { mContext.getMainExecutor().execute(this::updateScrimController);
mNotificationsController.requestNotificationUpdate("onBubbleExpandChanged");
updateScrimController();
});
mActivityIntentHelper = new ActivityIntentHelper(mContext); mActivityIntentHelper = new ActivityIntentHelper(mContext);
mActivityLaunchAnimator = activityLaunchAnimator; mActivityLaunchAnimator = activityLaunchAnimator;
@@ -1615,15 +1608,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
return (mDisabled2 & StatusBarManager.DISABLE2_NOTIFICATION_SHADE) != 0; return (mDisabled2 & StatusBarManager.DISABLE2_NOTIFICATION_SHADE) != 0;
} }
/**
* Request a notification update
* @param reason why we're requesting a notification update
*/
@Override
public void requestNotificationUpdate(String reason) {
mNotificationsController.requestNotificationUpdate(reason);
}
/** /**
* Asks {@link KeyguardUpdateMonitor} to run face auth. * Asks {@link KeyguardUpdateMonitor} to run face auth.
*/ */
@@ -2328,8 +2312,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
mStatusBarKeyguardViewManager.dump(pw); mStatusBarKeyguardViewManager.dump(pw);
} }
mNotificationsController.dump(pw, args, DUMPTRUCK);
if (DEBUG_GESTURES) { if (DEBUG_GESTURES) {
pw.print(" status bar gestures: "); pw.print(" status bar gestures: ");
mGestureRec.dump(pw, args); mGestureRec.dump(pw, args);
@@ -4233,14 +4215,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
maybeEscalateHeadsUp(); maybeEscalateHeadsUp();
} }
} }
// TODO: (b/145659174) remove when moving to NewNotifPipeline. Replaced by
// KeyguardCoordinator
@Override
public void onStrongAuthStateChanged(int userId) {
super.onStrongAuthStateChanged(userId);
mNotificationsController.requestNotificationUpdate("onStrongAuthStateChanged");
}
}; };
@@ -4429,7 +4403,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
updateQsExpansionEnabled(); updateQsExpansionEnabled();
mKeyguardViewMediator.setDozing(mDozing); mKeyguardViewMediator.setDozing(mDozing);
mNotificationsController.requestNotificationUpdate("onDozingChanged");
updateDozingState(); updateDozingState();
mDozeServiceHost.updateDozing(); mDozeServiceHost.updateDozing();
updateScrimController(); updateScrimController();

View File

@@ -1,60 +0,0 @@
/*
* Copyright (C) 2018 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;
import static com.android.systemui.statusbar.phone.CentralSurfaces.DEBUG;
import static com.android.systemui.statusbar.phone.CentralSurfaces.MULTIUSER_DEBUG;
import android.service.notification.StatusBarNotification;
import android.util.Log;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.notification.NotificationEntryManager.KeyguardEnvironment;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import javax.inject.Inject;
@SysUISingleton
public class KeyguardEnvironmentImpl implements KeyguardEnvironment {
private static final String TAG = "KeyguardEnvironmentImpl";
private final NotificationLockscreenUserManager mLockscreenUserManager;
private final DeviceProvisionedController mDeviceProvisionedController;
@Inject
public KeyguardEnvironmentImpl(
NotificationLockscreenUserManager notificationLockscreenUserManager,
DeviceProvisionedController deviceProvisionedController) {
mLockscreenUserManager = notificationLockscreenUserManager;
mDeviceProvisionedController = deviceProvisionedController;
}
@Override // NotificationEntryManager.KeyguardEnvironment
public boolean isDeviceProvisioned() {
return mDeviceProvisionedController.isDeviceProvisioned();
}
@Override // NotificationEntryManager.KeyguardEnvironment
public boolean isNotificationForCurrentProfiles(StatusBarNotification n) {
final int notificationUserId = n.getUserId();
if (DEBUG && MULTIUSER_DEBUG) {
Log.v(TAG, String.format("%s: current userid: %d, notification userid: %d", n,
mLockscreenUserManager.getCurrentUserId(), notificationUserId));
}
return mLockscreenUserManager.isCurrentProfile(notificationUserId);
}
}

View File

@@ -120,7 +120,6 @@ public class StatusBarHeadsUpChangeListener implements OnHeadsUpChangedListener
@Override @Override
public void onHeadsUpStateChanged(NotificationEntry entry, boolean isHeadsUp) { public void onHeadsUpStateChanged(NotificationEntry entry, boolean isHeadsUp) {
mNotificationsController.requestNotificationUpdate("onHeadsUpStateChanged");
if (mStatusBarStateController.isDozing() && isHeadsUp) { if (mStatusBarStateController.isDozing() && isHeadsUp) {
entry.setPulseSuppressed(false); entry.setPulseSuppressed(false);
mDozeServiceHost.fireNotificationPulse(entry); mDozeServiceHost.fireNotificationPulse(entry);

View File

@@ -33,8 +33,6 @@ import android.view.accessibility.AccessibilityManager;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.statusbar.IStatusBarService; import com.android.internal.statusbar.IStatusBarService;
import com.android.systemui.Dependency;
import com.android.systemui.ForegroundServiceNotificationListener;
import com.android.systemui.InitController; import com.android.systemui.InitController;
import com.android.systemui.R; import com.android.systemui.R;
import com.android.systemui.plugins.ActivityStarter; import com.android.systemui.plugins.ActivityStarter;
@@ -184,10 +182,6 @@ class StatusBarNotificationPresenter implements NotificationPresenter,
mMediaManager.setUpWithPresenter(this); mMediaManager.setUpWithPresenter(this);
mGutsManager.setUpWithPresenter( mGutsManager.setUpWithPresenter(
this, mNotifListContainer, mOnSettingsClickListener); this, mNotifListContainer, mOnSettingsClickListener);
// ForegroundServiceNotificationListener adds its listener in its constructor
// but we need to request it here in order for it to be instantiated.
// TODO: figure out how to do this correctly once Dependency.get() is gone.
Dependency.get(ForegroundServiceNotificationListener.class);
onUserSwitched(mLockscreenUserManager.getCurrentUserId()); onUserSwitched(mLockscreenUserManager.getCurrentUserId());
}); });

View File

@@ -56,13 +56,11 @@ import com.android.systemui.statusbar.NotificationListener;
import com.android.systemui.statusbar.NotificationLockscreenUserManager; import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationLockscreenUserManagerImpl; import com.android.systemui.statusbar.NotificationLockscreenUserManagerImpl;
import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.provider.VisualStabilityProvider; import com.android.systemui.statusbar.notification.collection.provider.VisualStabilityProvider;
import com.android.systemui.statusbar.notification.collection.render.GroupMembershipManager; import com.android.systemui.statusbar.notification.collection.render.GroupMembershipManager;
import com.android.systemui.statusbar.phone.DozeServiceHost; import com.android.systemui.statusbar.phone.DozeServiceHost;
import com.android.systemui.statusbar.phone.HeadsUpManagerPhone; import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.KeyguardBypassController;
import com.android.systemui.statusbar.phone.KeyguardEnvironmentImpl;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager; import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper; import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper;
import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.statusbar.policy.BatteryController;
@@ -151,10 +149,6 @@ public abstract class TvSystemUIModule {
@Binds @Binds
abstract DockManager bindDockManager(DockManagerImpl dockManager); abstract DockManager bindDockManager(DockManagerImpl dockManager);
@Binds
abstract NotificationEntryManager.KeyguardEnvironment bindKeyguardEnvironment(
KeyguardEnvironmentImpl keyguardEnvironment);
@Binds @Binds
abstract ShadeController provideShadeController(ShadeControllerImpl shadeController); abstract ShadeController provideShadeController(ShadeControllerImpl shadeController);

View File

@@ -57,11 +57,9 @@ import com.android.systemui.shared.system.QuickStepContract;
import com.android.systemui.statusbar.NotificationLockscreenUserManager; import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationShadeWindowController; import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.notification.NotificationChannelHelper; import com.android.systemui.statusbar.notification.NotificationChannelHelper;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotifCollection; import com.android.systemui.statusbar.notification.collection.NotifCollection;
import com.android.systemui.statusbar.notification.collection.NotifPipeline; import com.android.systemui.statusbar.notification.collection.NotifPipeline;
import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.collection.coordinator.BubbleCoordinator;
import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection; import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection;
import com.android.systemui.statusbar.notification.collection.notifcollection.DismissedByUserStats; import com.android.systemui.statusbar.notification.collection.notifcollection.DismissedByUserStats;
import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener; import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener;
@@ -460,11 +458,6 @@ public class BubblesManager {
mBubbles.onNotificationChannelModified(pkg, user, channel, modificationType); mBubbles.onNotificationChannelModified(pkg, user, channel, modificationType);
} }
/**
* Gets the DismissedByUserStats used by {@link NotificationEntryManager}.
* Will not be necessary when using the new notification pipeline's {@link NotifCollection}.
* Instead, this is taken care of by {@link BubbleCoordinator}.
*/
private DismissedByUserStats getDismissedByUserStats( private DismissedByUserStats getDismissedByUserStats(
NotificationEntry entry, NotificationEntry entry,
boolean isVisible) { boolean isVisible) {

View File

@@ -44,12 +44,10 @@ import androidx.test.filters.SmallTest;
import com.android.internal.messages.nano.SystemMessageProto; import com.android.internal.messages.nano.SystemMessageProto;
import com.android.systemui.appops.AppOpsController; import com.android.systemui.appops.AppOpsController;
import com.android.systemui.statusbar.notification.NotificationEntryListener;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotifPipeline; import com.android.systemui.statusbar.notification.collection.NotifPipeline;
import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder; import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder;
import com.android.systemui.util.time.FakeSystemClock; import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
@@ -64,9 +62,7 @@ import org.mockito.MockitoAnnotations;
public class ForegroundServiceControllerTest extends SysuiTestCase { public class ForegroundServiceControllerTest extends SysuiTestCase {
private ForegroundServiceController mFsc; private ForegroundServiceController mFsc;
private ForegroundServiceNotificationListener mListener; private ForegroundServiceNotificationListener mListener;
private NotificationEntryListener mEntryListener; private NotifCollectionListener mCollectionListener;
private final FakeSystemClock mClock = new FakeSystemClock();
@Mock private NotificationEntryManager mEntryManager;
@Mock private AppOpsController mAppOpsController; @Mock private AppOpsController mAppOpsController;
@Mock private Handler mMainHandler; @Mock private Handler mMainHandler;
@Mock private NotifPipeline mNotifPipeline; @Mock private NotifPipeline mNotifPipeline;
@@ -79,12 +75,13 @@ public class ForegroundServiceControllerTest extends SysuiTestCase {
MockitoAnnotations.initMocks(this); MockitoAnnotations.initMocks(this);
mFsc = new ForegroundServiceController(mAppOpsController, mMainHandler); mFsc = new ForegroundServiceController(mAppOpsController, mMainHandler);
mListener = new ForegroundServiceNotificationListener( mListener = new ForegroundServiceNotificationListener(
mContext, mFsc, mEntryManager, mNotifPipeline, mClock); mContext, mFsc, mNotifPipeline);
ArgumentCaptor<NotificationEntryListener> entryListenerCaptor = mListener.init();
ArgumentCaptor.forClass(NotificationEntryListener.class); ArgumentCaptor<NotifCollectionListener> entryListenerCaptor =
verify(mEntryManager).addNotificationEntryListener( ArgumentCaptor.forClass(NotifCollectionListener.class);
verify(mNotifPipeline).addCollectionListener(
entryListenerCaptor.capture()); entryListenerCaptor.capture());
mEntryListener = entryListenerCaptor.getValue(); mCollectionListener = entryListenerCaptor.getValue();
} }
@Test @Test
@@ -449,7 +446,7 @@ public class ForegroundServiceControllerTest extends SysuiTestCase {
private NotificationEntry addFgEntry() { private NotificationEntry addFgEntry() {
NotificationEntry entry = createFgEntry(); NotificationEntry entry = createFgEntry();
mEntryListener.onPendingEntryAdded(entry); mCollectionListener.onEntryAdded(entry);
return entry; return entry;
} }
@@ -461,12 +458,10 @@ public class ForegroundServiceControllerTest extends SysuiTestCase {
} }
private void entryRemoved(StatusBarNotification notification) { private void entryRemoved(StatusBarNotification notification) {
mEntryListener.onEntryRemoved( mCollectionListener.onEntryRemoved(
new NotificationEntryBuilder() new NotificationEntryBuilder()
.setSbn(notification) .setSbn(notification)
.build(), .build(),
null,
false,
REASON_APP_CANCEL); REASON_APP_CANCEL);
} }
@@ -475,7 +470,7 @@ public class ForegroundServiceControllerTest extends SysuiTestCase {
.setSbn(notification) .setSbn(notification)
.setImportance(importance) .setImportance(importance)
.build(); .build();
mEntryListener.onPendingEntryAdded(entry); mCollectionListener.onEntryAdded(entry);
} }
private void entryUpdated(StatusBarNotification notification, int importance) { private void entryUpdated(StatusBarNotification notification, int importance) {
@@ -483,7 +478,7 @@ public class ForegroundServiceControllerTest extends SysuiTestCase {
.setSbn(notification) .setSbn(notification)
.setImportance(importance) .setImportance(importance)
.build(); .build();
mEntryListener.onPreEntryUpdated(entry); mCollectionListener.onEntryUpdated(entry);
} }
@UserIdInt private static final int USERID_ONE = 10; // UserManagerService.MIN_USER_ID; @UserIdInt private static final int USERID_ONE = 10; // UserManagerService.MIN_USER_ID;

View File

@@ -124,7 +124,6 @@ import com.android.systemui.statusbar.VibratorHelper;
import com.android.systemui.statusbar.events.PrivacyDotViewController; import com.android.systemui.statusbar.events.PrivacyDotViewController;
import com.android.systemui.statusbar.notification.ConversationNotificationManager; import com.android.systemui.statusbar.notification.ConversationNotificationManager;
import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.DynamicPrivacyController;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator; import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
import com.android.systemui.statusbar.notification.row.ExpandableView; import com.android.systemui.statusbar.notification.row.ExpandableView;
import com.android.systemui.statusbar.notification.row.ExpandableView.OnHeightChangedListener; import com.android.systemui.statusbar.notification.row.ExpandableView.OnHeightChangedListener;
@@ -229,8 +228,6 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
@Mock @Mock
private DynamicPrivacyController mDynamicPrivacyController; private DynamicPrivacyController mDynamicPrivacyController;
@Mock @Mock
private NotificationEntryManager mNotificationEntryManager;
@Mock
private StatusBarTouchableRegionManager mStatusBarTouchableRegionManager; private StatusBarTouchableRegionManager mStatusBarTouchableRegionManager;
@Mock @Mock
private KeyguardStateController mKeyguardStateController; private KeyguardStateController mKeyguardStateController;
@@ -517,7 +514,6 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
mFeatureFlags, mFeatureFlags,
coordinator, expansionHandler, mDynamicPrivacyController, mKeyguardBypassController, coordinator, expansionHandler, mDynamicPrivacyController, mKeyguardBypassController,
mFalsingManager, new FalsingCollectorFake(), mFalsingManager, new FalsingCollectorFake(),
mNotificationEntryManager,
mKeyguardStateController, mKeyguardStateController,
mStatusBarStateController, mStatusBarStateController,
mStatusBarWindowStateController, mStatusBarWindowStateController,

View File

@@ -28,12 +28,9 @@ import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.systemui.Dependency; import com.android.systemui.Dependency;
import com.android.systemui.SysuiTestCase; import com.android.systemui.SysuiTestCase;
import com.android.systemui.shade.ShadeController; import com.android.systemui.shade.ShadeController;
import com.android.systemui.statusbar.notification.NotificationEntryListener;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.logging.NotificationLogger; import com.android.systemui.statusbar.notification.logging.NotificationLogger;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager; import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager.OnSettingsClickListener; import com.android.systemui.statusbar.notification.row.NotificationGutsManager.OnSettingsClickListener;
import com.android.systemui.statusbar.notification.row.NotificationInfo.CheckSaveListener;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer; import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
import org.junit.Before; import org.junit.Before;
@@ -54,10 +51,8 @@ import org.mockito.MockitoAnnotations;
public class NonPhoneDependencyTest extends SysuiTestCase { public class NonPhoneDependencyTest extends SysuiTestCase {
@Mock private NotificationPresenter mPresenter; @Mock private NotificationPresenter mPresenter;
@Mock private NotificationListContainer mListContainer; @Mock private NotificationListContainer mListContainer;
@Mock private NotificationEntryListener mEntryListener;
@Mock private RemoteInputController.Delegate mDelegate; @Mock private RemoteInputController.Delegate mDelegate;
@Mock private NotificationRemoteInputManager.Callback mRemoteInputManagerCallback; @Mock private NotificationRemoteInputManager.Callback mRemoteInputManagerCallback;
@Mock private CheckSaveListener mCheckSaveListener;
@Mock private OnSettingsClickListener mOnSettingsClickListener; @Mock private OnSettingsClickListener mOnSettingsClickListener;
@Before @Before
@@ -72,7 +67,6 @@ public class NonPhoneDependencyTest extends SysuiTestCase {
@Test @Test
public void testNotificationManagementCodeHasNoDependencyOnStatusBarWindowManager() { public void testNotificationManagementCodeHasNoDependencyOnStatusBarWindowManager() {
mDependency.injectMockDependency(ShadeController.class); mDependency.injectMockDependency(ShadeController.class);
NotificationEntryManager entryManager = Dependency.get(NotificationEntryManager.class);
NotificationGutsManager gutsManager = Dependency.get(NotificationGutsManager.class); NotificationGutsManager gutsManager = Dependency.get(NotificationGutsManager.class);
NotificationLogger notificationLogger = Dependency.get(NotificationLogger.class); NotificationLogger notificationLogger = Dependency.get(NotificationLogger.class);
NotificationMediaManager mediaManager = Dependency.get(NotificationMediaManager.class); NotificationMediaManager mediaManager = Dependency.get(NotificationMediaManager.class);
@@ -80,7 +74,6 @@ public class NonPhoneDependencyTest extends SysuiTestCase {
Dependency.get(NotificationRemoteInputManager.class); Dependency.get(NotificationRemoteInputManager.class);
NotificationLockscreenUserManager lockscreenUserManager = NotificationLockscreenUserManager lockscreenUserManager =
Dependency.get(NotificationLockscreenUserManager.class); Dependency.get(NotificationLockscreenUserManager.class);
entryManager.addNotificationEntryListener(mEntryListener);
gutsManager.setUpWithPresenter(mPresenter, mListContainer, gutsManager.setUpWithPresenter(mPresenter, mListContainer,
mOnSettingsClickListener); mOnSettingsClickListener);
notificationLogger.setUpWithContainer(mListContainer); notificationLogger.setUpWithContainer(mListContainer);

View File

@@ -21,7 +21,6 @@ import static android.content.Intent.ACTION_USER_SWITCHED;
import static junit.framework.Assert.assertFalse; import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue; import static junit.framework.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.clearInvocations; import static org.mockito.Mockito.clearInvocations;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never; import static org.mockito.Mockito.never;
@@ -54,7 +53,6 @@ import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dump.DumpManager; import com.android.systemui.dump.DumpManager;
import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.NotificationLockscreenUserManager.NotificationStateChangedListener; import com.android.systemui.statusbar.NotificationLockscreenUserManager.NotificationStateChangedListener;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder; import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder;
import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection; import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection;
@@ -84,8 +82,6 @@ public class NotificationLockscreenUserManagerTest extends SysuiTestCase {
@Mock @Mock
private NotificationVisibilityProvider mVisibilityProvider; private NotificationVisibilityProvider mVisibilityProvider;
@Mock @Mock
private NotificationEntryManager mEntryManager;
@Mock
private CommonNotifCollection mNotifCollection; private CommonNotifCollection mNotifCollection;
@Mock @Mock
private DevicePolicyManager mDevicePolicyManager; private DevicePolicyManager mDevicePolicyManager;
@@ -114,7 +110,6 @@ public class NotificationLockscreenUserManagerTest extends SysuiTestCase {
@Before @Before
public void setUp() { public void setUp() {
MockitoAnnotations.initMocks(this); MockitoAnnotations.initMocks(this);
mDependency.injectTestDependency(NotificationEntryManager.class, mEntryManager);
int currentUserId = ActivityManager.getCurrentUser(); int currentUserId = ActivityManager.getCurrentUser();
mSettings = new FakeSettings(); mSettings = new FakeSettings();
@@ -148,12 +143,6 @@ public class NotificationLockscreenUserManagerTest extends SysuiTestCase {
mLockscreenUserManager.setUpWithPresenter(mPresenter); mLockscreenUserManager.setUpWithPresenter(mPresenter);
} }
@Test
public void testLockScreenShowNotificationsChangeUpdatesNotifications() {
mLockscreenUserManager.getLockscreenSettingsObserverForTest().onChange(false);
verify(mEntryManager, times(1)).updateNotifications(anyString());
}
@Test @Test
public void testLockScreenShowNotificationsFalse() { public void testLockScreenShowNotificationsFalse() {
mSettings.putInt(Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, 0); mSettings.putInt(Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, 0);
@@ -296,13 +285,6 @@ public class NotificationLockscreenUserManagerTest extends SysuiTestCase {
assertTrue(mLockscreenUserManager.needsRedaction(mSecondaryUserNotif)); assertTrue(mLockscreenUserManager.needsRedaction(mSecondaryUserNotif));
} }
@Test
public void testSettingsObserverUpdatesNotifications() {
when(mDeviceProvisionedController.isDeviceProvisioned()).thenReturn(true);
mLockscreenUserManager.getSettingsObserverForTest().onChange(false);
verify(mEntryManager, times(1)).updateNotifications(anyString());
}
@Test @Test
public void testActionUserSwitchedCallsOnUserSwitched() { public void testActionUserSwitchedCallsOnUserSwitched() {
Intent intent = new Intent() Intent intent = new Intent()

View File

@@ -23,8 +23,6 @@ import static org.mockito.Mockito.when;
import android.app.Notification; import android.app.Notification;
import android.content.Context; import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock; import android.os.SystemClock;
import android.os.UserHandle; import android.os.UserHandle;
import android.testing.AndroidTestingRunner; import android.testing.AndroidTestingRunner;
@@ -36,7 +34,6 @@ import com.android.systemui.SysuiTestCase;
import com.android.systemui.dump.DumpManager; import com.android.systemui.dump.DumpManager;
import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.notification.NotifPipelineFlags; import com.android.systemui.statusbar.notification.NotifPipelineFlags;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder; import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder;
import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider; import com.android.systemui.statusbar.notification.collection.render.NotificationVisibilityProvider;
@@ -70,7 +67,6 @@ public class NotificationRemoteInputManagerTest extends SysuiTestCase {
@Mock private StatusBarStateController mStateController; @Mock private StatusBarStateController mStateController;
@Mock private RemoteInputUriController mRemoteInputUriController; @Mock private RemoteInputUriController mRemoteInputUriController;
@Mock private NotificationClickNotifier mClickNotifier; @Mock private NotificationClickNotifier mClickNotifier;
@Mock private NotificationEntryManager mEntryManager;
@Mock private NotificationLockscreenUserManager mLockscreenUserManager; @Mock private NotificationLockscreenUserManager mLockscreenUserManager;
private TestableNotificationRemoteInputManager mRemoteInputManager; private TestableNotificationRemoteInputManager mRemoteInputManager;
@@ -85,11 +81,8 @@ public class NotificationRemoteInputManagerTest extends SysuiTestCase {
mLockscreenUserManager, mLockscreenUserManager,
mSmartReplyController, mSmartReplyController,
mVisibilityProvider, mVisibilityProvider,
mEntryManager,
mock(RemoteInputNotificationRebuilder.class),
() -> Optional.of(mock(CentralSurfaces.class)), () -> Optional.of(mock(CentralSurfaces.class)),
mStateController, mStateController,
Handler.createAsync(Looper.myLooper()),
mRemoteInputUriController, mRemoteInputUriController,
mClickNotifier, mClickNotifier,
mock(ActionClickLogger.class), mock(ActionClickLogger.class),
@@ -145,11 +138,8 @@ public class NotificationRemoteInputManagerTest extends SysuiTestCase {
NotificationLockscreenUserManager lockscreenUserManager, NotificationLockscreenUserManager lockscreenUserManager,
SmartReplyController smartReplyController, SmartReplyController smartReplyController,
NotificationVisibilityProvider visibilityProvider, NotificationVisibilityProvider visibilityProvider,
NotificationEntryManager notificationEntryManager,
RemoteInputNotificationRebuilder rebuilder,
Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy, Lazy<Optional<CentralSurfaces>> centralSurfacesOptionalLazy,
StatusBarStateController statusBarStateController, StatusBarStateController statusBarStateController,
Handler mainHandler,
RemoteInputUriController remoteInputUriController, RemoteInputUriController remoteInputUriController,
NotificationClickNotifier clickNotifier, NotificationClickNotifier clickNotifier,
ActionClickLogger actionClickLogger, ActionClickLogger actionClickLogger,
@@ -160,7 +150,6 @@ public class NotificationRemoteInputManagerTest extends SysuiTestCase {
lockscreenUserManager, lockscreenUserManager,
smartReplyController, smartReplyController,
visibilityProvider, visibilityProvider,
notificationEntryManager,
centralSurfacesOptionalLazy, centralSurfacesOptionalLazy,
statusBarStateController, statusBarStateController,
remoteInputUriController, remoteInputUriController,

View File

@@ -23,11 +23,9 @@ import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase import com.android.systemui.SysuiTestCase
import com.android.systemui.plugins.BcSmartspaceDataPlugin.SmartspaceTargetListener import com.android.systemui.plugins.BcSmartspaceDataPlugin.SmartspaceTargetListener
import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.statusbar.NotificationLockscreenUserManager
import com.android.systemui.statusbar.StatusBarState import com.android.systemui.statusbar.StatusBarState
import com.android.systemui.statusbar.SysuiStatusBarStateController import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.lockscreen.LockscreenSmartspaceController import com.android.systemui.statusbar.lockscreen.LockscreenSmartspaceController
import com.android.systemui.statusbar.notification.NotificationEntryManager
import com.android.systemui.statusbar.notification.collection.NotifPipeline import com.android.systemui.statusbar.notification.collection.NotifPipeline
import com.android.systemui.statusbar.notification.collection.NotificationEntry import com.android.systemui.statusbar.notification.collection.NotificationEntry
import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder
@@ -46,7 +44,6 @@ import org.junit.Assert.assertTrue
import org.junit.Before import org.junit.Before
import org.junit.Test import org.junit.Test
import org.mockito.Mock import org.mockito.Mock
import org.mockito.Mockito.anyString
import org.mockito.Mockito.clearInvocations import org.mockito.Mockito.clearInvocations
import org.mockito.Mockito.never import org.mockito.Mockito.never
import org.mockito.Mockito.verify import org.mockito.Mockito.verify
@@ -61,10 +58,6 @@ class SmartspaceDedupingCoordinatorTest : SysuiTestCase() {
@Mock @Mock
private lateinit var smartspaceController: LockscreenSmartspaceController private lateinit var smartspaceController: LockscreenSmartspaceController
@Mock @Mock
private lateinit var notificationEntryManager: NotificationEntryManager
@Mock
private lateinit var notificationLockscreenUserManager: NotificationLockscreenUserManager
@Mock
private lateinit var notifPipeline: NotifPipeline private lateinit var notifPipeline: NotifPipeline
@Mock @Mock
private lateinit var pluggableListener: Pluggable.PluggableListener<NotifFilter> private lateinit var pluggableListener: Pluggable.PluggableListener<NotifFilter>
@@ -99,12 +92,10 @@ class SmartspaceDedupingCoordinatorTest : SysuiTestCase() {
deduper = SmartspaceDedupingCoordinator( deduper = SmartspaceDedupingCoordinator(
statusBarStateController, statusBarStateController,
smartspaceController, smartspaceController,
notificationEntryManager,
notificationLockscreenUserManager,
notifPipeline, notifPipeline,
executor, executor,
clock clock
) )
// Attach the deduper and capture the listeners/filters that it registers // Attach the deduper and capture the listeners/filters that it registers
deduper.attach(notifPipeline) deduper.attach(notifPipeline)
@@ -352,7 +343,6 @@ class SmartspaceDedupingCoordinatorTest : SysuiTestCase() {
// THEN the new pipeline is invalidated (but the old one isn't because it's not // THEN the new pipeline is invalidated (but the old one isn't because it's not
// necessary) because the notif should no longer be filtered out // necessary) because the notif should no longer be filtered out
verify(pluggableListener).onPluggableInvalidated(eq(filter), any()) verify(pluggableListener).onPluggableInvalidated(eq(filter), any())
verify(notificationEntryManager, never()).updateNotifications(anyString())
assertFalse(filter.shouldFilterOut(entry2HasNotRecentlyAlerted, now)) assertFalse(filter.shouldFilterOut(entry2HasNotRecentlyAlerted, now))
} }
@@ -390,7 +380,6 @@ class SmartspaceDedupingCoordinatorTest : SysuiTestCase() {
private fun verifyPipelinesInvalidated() { private fun verifyPipelinesInvalidated() {
verify(pluggableListener).onPluggableInvalidated(eq(filter), any()) verify(pluggableListener).onPluggableInvalidated(eq(filter), any())
verify(notificationEntryManager).updateNotifications(anyString())
} }
private fun assertExecutorIsClear() { private fun assertExecutorIsClear() {
@@ -399,12 +388,10 @@ class SmartspaceDedupingCoordinatorTest : SysuiTestCase() {
private fun verifyPipelinesNotInvalidated() { private fun verifyPipelinesNotInvalidated() {
verify(pluggableListener, never()).onPluggableInvalidated(eq(filter), any()) verify(pluggableListener, never()).onPluggableInvalidated(eq(filter), any())
verify(notificationEntryManager, never()).updateNotifications(anyString())
} }
private fun clearPipelineInvocations() { private fun clearPipelineInvocations() {
clearInvocations(pluggableListener) clearInvocations(pluggableListener)
clearInvocations(notificationEntryManager)
} }
} }

View File

@@ -44,8 +44,6 @@ import com.android.systemui.SysuiTestCase;
import com.android.systemui.statusbar.NotificationListener; import com.android.systemui.statusbar.NotificationListener;
import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.StatusBarStateControllerImpl; import com.android.systemui.statusbar.StatusBarStateControllerImpl;
import com.android.systemui.statusbar.notification.NotifPipelineFlags;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotifLiveData; import com.android.systemui.statusbar.notification.collection.NotifLiveData;
import com.android.systemui.statusbar.notification.collection.NotifLiveDataStore; import com.android.systemui.statusbar.notification.collection.NotifLiveDataStore;
import com.android.systemui.statusbar.notification.collection.NotifPipeline; import com.android.systemui.statusbar.notification.collection.NotifPipeline;
@@ -85,11 +83,9 @@ public class NotificationLoggerTest extends SysuiTestCase {
@Mock private NotificationLogger.ExpansionStateLogger mExpansionStateLogger; @Mock private NotificationLogger.ExpansionStateLogger mExpansionStateLogger;
// Dependency mocks: // Dependency mocks:
@Mock private NotifPipelineFlags mNotifPipelineFlags;
@Mock private NotifLiveDataStore mNotifLiveDataStore; @Mock private NotifLiveDataStore mNotifLiveDataStore;
@Mock private NotifLiveData<List<NotificationEntry>> mActiveNotifEntries; @Mock private NotifLiveData<List<NotificationEntry>> mActiveNotifEntries;
@Mock private NotificationVisibilityProvider mVisibilityProvider; @Mock private NotificationVisibilityProvider mVisibilityProvider;
@Mock private NotificationEntryManager mEntryManager;
@Mock private NotifPipeline mNotifPipeline; @Mock private NotifPipeline mNotifPipeline;
@Mock private NotificationListener mListener; @Mock private NotificationListener mListener;
@@ -118,17 +114,14 @@ public class NotificationLoggerTest extends SysuiTestCase {
mLogger = new TestableNotificationLogger( mLogger = new TestableNotificationLogger(
mListener, mListener,
mUiBgExecutor, mUiBgExecutor,
mNotifPipelineFlags,
mNotifLiveDataStore, mNotifLiveDataStore,
mVisibilityProvider, mVisibilityProvider,
mEntryManager,
mNotifPipeline, mNotifPipeline,
mock(StatusBarStateControllerImpl.class), mock(StatusBarStateControllerImpl.class),
mBarService, mBarService,
mExpansionStateLogger mExpansionStateLogger
); );
mLogger.setUpWithContainer(mListContainer); mLogger.setUpWithContainer(mListContainer);
verify(mEntryManager, never()).addNotificationEntryListener(any());
verify(mNotifPipeline).addCollectionListener(any()); verify(mNotifPipeline).addCollectionListener(any());
} }
@@ -266,10 +259,8 @@ public class NotificationLoggerTest extends SysuiTestCase {
TestableNotificationLogger(NotificationListener notificationListener, TestableNotificationLogger(NotificationListener notificationListener,
Executor uiBgExecutor, Executor uiBgExecutor,
NotifPipelineFlags notifPipelineFlags,
NotifLiveDataStore notifLiveDataStore, NotifLiveDataStore notifLiveDataStore,
NotificationVisibilityProvider visibilityProvider, NotificationVisibilityProvider visibilityProvider,
NotificationEntryManager entryManager,
NotifPipeline notifPipeline, NotifPipeline notifPipeline,
StatusBarStateControllerImpl statusBarStateController, StatusBarStateControllerImpl statusBarStateController,
IStatusBarService barService, IStatusBarService barService,

View File

@@ -57,7 +57,6 @@ import com.android.systemui.R;
import com.android.systemui.SysuiTestCase; import com.android.systemui.SysuiTestCase;
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin; import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin;
import com.android.systemui.statusbar.notification.AssistantFeedbackController; import com.android.systemui.statusbar.notification.AssistantFeedbackController;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder; import com.android.systemui.statusbar.notification.collection.NotificationEntryBuilder;
@@ -83,8 +82,6 @@ public class FeedbackInfoTest extends SysuiTestCase {
mock(AssistantFeedbackController.class); mock(AssistantFeedbackController.class);
private StatusBarNotification mSbn; private StatusBarNotification mSbn;
@Mock
private NotificationEntryManager mNotificationEntryManager;
@Mock @Mock
private IStatusBarService mStatusBarService; private IStatusBarService mStatusBarService;
@Mock @Mock
@@ -94,7 +91,6 @@ public class FeedbackInfoTest extends SysuiTestCase {
public void setUp() throws Exception { public void setUp() throws Exception {
MockitoAnnotations.initMocks(this); MockitoAnnotations.initMocks(this);
mDependency.injectTestDependency(NotificationEntryManager.class, mNotificationEntryManager);
mDependency.injectTestDependency(IStatusBarService.class, mStatusBarService); mDependency.injectTestDependency(IStatusBarService.class, mStatusBarService);
mDependency.injectTestDependency(NotificationGutsManager.class, mNotificationGutsManager); mDependency.injectTestDependency(NotificationGutsManager.class, mNotificationGutsManager);

View File

@@ -58,7 +58,6 @@ import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.RemoteInputController; import com.android.systemui.statusbar.RemoteInputController;
import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.DynamicPrivacyController;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotifCollection; import com.android.systemui.statusbar.notification.collection.NotifCollection;
import com.android.systemui.statusbar.notification.collection.NotifPipeline; import com.android.systemui.statusbar.notification.collection.NotifPipeline;
import com.android.systemui.statusbar.notification.collection.render.GroupExpansionManager; import com.android.systemui.statusbar.notification.collection.render.GroupExpansionManager;
@@ -119,7 +118,6 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase {
@Mock private SectionHeaderController mSilentHeaderController; @Mock private SectionHeaderController mSilentHeaderController;
@Mock private NotifPipeline mNotifPipeline; @Mock private NotifPipeline mNotifPipeline;
@Mock private NotifCollection mNotifCollection; @Mock private NotifCollection mNotifCollection;
@Mock private NotificationEntryManager mEntryManager;
@Mock private UiEventLogger mUiEventLogger; @Mock private UiEventLogger mUiEventLogger;
@Mock private LockscreenShadeTransitionController mLockscreenShadeTransitionController; @Mock private LockscreenShadeTransitionController mLockscreenShadeTransitionController;
@Mock private NotificationRemoteInputManager mRemoteInputManager; @Mock private NotificationRemoteInputManager mRemoteInputManager;
@@ -168,7 +166,6 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase {
mSilentHeaderController, mSilentHeaderController,
mNotifPipeline, mNotifPipeline,
mNotifCollection, mNotifCollection,
mEntryManager,
mLockscreenShadeTransitionController, mLockscreenShadeTransitionController,
mShadeTransitionController, mShadeTransitionController,
mUiEventLogger, mUiEventLogger,

View File

@@ -127,7 +127,6 @@ import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.StatusBarStateControllerImpl; import com.android.systemui.statusbar.StatusBarStateControllerImpl;
import com.android.systemui.statusbar.notification.DynamicPrivacyController; import com.android.systemui.statusbar.notification.DynamicPrivacyController;
import com.android.systemui.statusbar.notification.NotifPipelineFlags; import com.android.systemui.statusbar.notification.NotifPipelineFlags;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator; import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
import com.android.systemui.statusbar.notification.collection.NotifLiveDataStore; import com.android.systemui.statusbar.notification.collection.NotifLiveDataStore;
import com.android.systemui.statusbar.notification.collection.NotifPipeline; import com.android.systemui.statusbar.notification.collection.NotifPipeline;
@@ -223,7 +222,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
@Mock private NotificationShadeWindowView mNotificationShadeWindowView; @Mock private NotificationShadeWindowView mNotificationShadeWindowView;
@Mock private BroadcastDispatcher mBroadcastDispatcher; @Mock private BroadcastDispatcher mBroadcastDispatcher;
@Mock private AssistManager mAssistManager; @Mock private AssistManager mAssistManager;
@Mock private NotificationEntryManager mNotificationEntryManager;
@Mock private NotificationGutsManager mNotificationGutsManager; @Mock private NotificationGutsManager mNotificationGutsManager;
@Mock private NotificationMediaManager mNotificationMediaManager; @Mock private NotificationMediaManager mNotificationMediaManager;
@Mock private NavigationBarController mNavigationBarController; @Mock private NavigationBarController mNavigationBarController;
@@ -397,7 +395,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
new FalsingManagerFake(), new FalsingManagerFake(),
new FalsingCollectorFake(), new FalsingCollectorFake(),
mBroadcastDispatcher, mBroadcastDispatcher,
mNotificationEntryManager,
mNotificationGutsManager, mNotificationGutsManager,
notificationLogger, notificationLogger,
mNotificationInterruptStateProvider, mNotificationInterruptStateProvider,

View File

@@ -66,7 +66,6 @@ import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationPresenter; import com.android.systemui.statusbar.NotificationPresenter;
import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.NotificationLaunchAnimatorControllerProvider; import com.android.systemui.statusbar.notification.NotificationLaunchAnimatorControllerProvider;
import com.android.systemui.statusbar.notification.collection.NotifPipeline; import com.android.systemui.statusbar.notification.collection.NotifPipeline;
import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry;
@@ -102,8 +101,6 @@ public class StatusBarNotificationActivityStarterTest extends SysuiTestCase {
@Mock @Mock
private AssistManager mAssistManager; private AssistManager mAssistManager;
@Mock @Mock
private NotificationEntryManager mEntryManager;
@Mock
private ActivityStarter mActivityStarter; private ActivityStarter mActivityStarter;
@Mock @Mock
private NotificationClickNotifier mClickNotifier; private NotificationClickNotifier mClickNotifier;

View File

@@ -37,7 +37,6 @@ import com.android.systemui.statusbar.ActionClickLogger;
import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationLockscreenUserManager; import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.render.GroupExpansionManager; import com.android.systemui.statusbar.notification.collection.render.GroupExpansionManager;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.DeviceProvisionedController;
@@ -55,7 +54,6 @@ import org.mockito.MockitoAnnotations;
@RunWith(AndroidTestingRunner.class) @RunWith(AndroidTestingRunner.class)
@TestableLooper.RunWithLooper @TestableLooper.RunWithLooper
public class StatusBarRemoteInputCallbackTest extends SysuiTestCase { public class StatusBarRemoteInputCallbackTest extends SysuiTestCase {
@Mock private NotificationEntryManager mEntryManager;
@Mock private DeviceProvisionedController mDeviceProvisionedController; @Mock private DeviceProvisionedController mDeviceProvisionedController;
@Mock private com.android.systemui.shade.ShadeController mShadeController; @Mock private com.android.systemui.shade.ShadeController mShadeController;
@Mock private NotificationLockscreenUserManager mNotificationLockscreenUserManager; @Mock private NotificationLockscreenUserManager mNotificationLockscreenUserManager;
@@ -71,7 +69,6 @@ public class StatusBarRemoteInputCallbackTest extends SysuiTestCase {
@Before @Before
public void setUp() { public void setUp() {
MockitoAnnotations.initMocks(this); MockitoAnnotations.initMocks(this);
mDependency.injectTestDependency(NotificationEntryManager.class, mEntryManager);
mDependency.injectTestDependency(DeviceProvisionedController.class, mDependency.injectTestDependency(DeviceProvisionedController.class,
mDeviceProvisionedController); mDeviceProvisionedController);
mDependency.injectTestDependency(ShadeController.class, mShadeController); mDependency.injectTestDependency(ShadeController.class, mShadeController);