Loading packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/StatusBarStateController.java +2 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,8 @@ public interface StatusBarStateController { int getState(); /** * Is device dozing * Is device dozing. Dozing is when the screen is in AOD or asleep given that * {@link com.android.systemui.doze.DozeService} is configured. */ boolean isDozing(); Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java +3 −11 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.LockscreenWallpaper; import com.android.systemui.statusbar.phone.ScrimController; import com.android.systemui.statusbar.phone.ScrimState; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.StatusBarWindowController; import com.android.systemui.statusbar.policy.KeyguardStateController; Loading Loading @@ -105,9 +104,6 @@ public class NotificationMediaManager implements Dumpable { private final NotificationEntryManager mEntryManager; // Late binding, also @Nullable due to being in com.android.systemui.statusbar.phone package @Nullable private Lazy<ShadeController> mShadeController; @Nullable private Lazy<StatusBarWindowController> mStatusBarWindowController; Loading Loading @@ -183,7 +179,6 @@ public class NotificationMediaManager implements Dumpable { @Inject public NotificationMediaManager( Context context, Lazy<ShadeController> shadeController, Lazy<StatusBar> statusBarLazy, Lazy<StatusBarWindowController> statusBarWindowController, NotificationEntryManager notificationEntryManager, Loading @@ -193,11 +188,10 @@ public class NotificationMediaManager implements Dumpable { mMediaArtworkProcessor = mediaArtworkProcessor; mKeyguardBypassController = keyguardBypassController; mMediaListeners = new ArrayList<>(); mMediaSessionManager = (MediaSessionManager) mContext.getSystemService(Context.MEDIA_SESSION_SERVICE); // TODO: use MediaSessionManager.SessionListener to hook us up to future updates // in session state mShadeController = shadeController; mMediaSessionManager = (MediaSessionManager) mContext.getSystemService( Context.MEDIA_SESSION_SERVICE); // TODO: use KeyguardStateController#isOccluded to remove this dependency mStatusBarLazy = statusBarLazy; mStatusBarWindowController = statusBarWindowController; Loading Loading @@ -603,9 +597,7 @@ public class NotificationMediaManager implements Dumpable { if (DEBUG_MEDIA) { Log.v(TAG, "DEBUG_MEDIA: Fading out album artwork"); } ShadeController shadeController = mShadeController.get(); boolean cannotAnimateDoze = shadeController != null && shadeController.isDozing() boolean cannotAnimateDoze = mStatusBarStateController.isDozing() && !ScrimState.AOD.getAnimateChange(); boolean needsBypassFading = mKeyguardStateController.isBypassFadingAnimation(); if (((mBiometricUnlockController != null && mBiometricUnlockController.getMode() Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java +5 −5 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry.EditedSuggestionInfo; import com.android.systemui.statusbar.notification.logging.NotificationLogger; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.policy.RemoteInputUriController; import com.android.systemui.statusbar.policy.RemoteInputView; Loading Loading @@ -116,7 +116,7 @@ public class NotificationRemoteInputManager implements Dumpable { private final NotificationEntryManager mEntryManager; private final Handler mMainHandler; private final Lazy<ShadeController> mShadeController; private final Lazy<StatusBar> mStatusBarLazy; protected final Context mContext; private final UserManager mUserManager; Loading @@ -136,7 +136,7 @@ public class NotificationRemoteInputManager implements Dumpable { @Override public boolean onClickHandler( View view, PendingIntent pendingIntent, RemoteViews.RemoteResponse response) { mShadeController.get().wakeUpIfDozing(SystemClock.uptimeMillis(), view, mStatusBarLazy.get().wakeUpIfDozing(SystemClock.uptimeMillis(), view, "NOTIFICATION_CLICK"); if (handleRemoteInput(view, pendingIntent)) { Loading Loading @@ -261,7 +261,7 @@ public class NotificationRemoteInputManager implements Dumpable { NotificationLockscreenUserManager lockscreenUserManager, SmartReplyController smartReplyController, NotificationEntryManager notificationEntryManager, Lazy<ShadeController> shadeController, Lazy<StatusBar> statusBarLazy, StatusBarStateController statusBarStateController, @MainHandler Handler mainHandler, RemoteInputUriController remoteInputUriController) { Loading @@ -269,7 +269,7 @@ public class NotificationRemoteInputManager implements Dumpable { mLockscreenUserManager = lockscreenUserManager; mSmartReplyController = smartReplyController; mEntryManager = notificationEntryManager; mShadeController = shadeController; mStatusBarLazy = statusBarLazy; mMainHandler = mainHandler; mBarService = IStatusBarService.Stub.asInterface( ServiceManager.getService(Context.STATUS_BAR_SERVICE)); Loading packages/SystemUI/src/com/android/systemui/statusbar/PulseExpansionHandler.kt +1 −1 Original line number Diff line number Diff line Loading @@ -211,7 +211,7 @@ constructor( setUserLocked(mStartingChild!!, false) mStartingChild = null } if (shadeController.isDozing) { if (statusBarStateController.isDozing) { isWakingToShadeLocked = true wakeUpCoordinator.willWakeUp = true mPowerManager!!.wakeUp(SystemClock.uptimeMillis(), WAKE_REASON_GESTURE, Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationAlertingManager.java +5 −7 Original line number Diff line number Diff line Loading @@ -24,18 +24,16 @@ import android.service.notification.StatusBarNotification; import android.util.Log; import com.android.internal.statusbar.NotificationVisibility; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.NotificationListener; import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.NotificationContentInflater.InflationFlag; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.policy.HeadsUpManager; import javax.inject.Inject; import javax.inject.Singleton; import dagger.Lazy; /** Handles heads-up and pulsing behavior driven by notification changes. */ @Singleton public class NotificationAlertingManager { Loading @@ -44,7 +42,7 @@ public class NotificationAlertingManager { private final NotificationRemoteInputManager mRemoteInputManager; private final VisualStabilityManager mVisualStabilityManager; private final Lazy<ShadeController> mShadeController; private final StatusBarStateController mStatusBarStateController; private final NotificationInterruptionStateProvider mNotificationInterruptionStateProvider; private final NotificationListener mNotificationListener; Loading @@ -55,12 +53,12 @@ public class NotificationAlertingManager { NotificationEntryManager notificationEntryManager, NotificationRemoteInputManager remoteInputManager, VisualStabilityManager visualStabilityManager, Lazy<ShadeController> shadeController, StatusBarStateController statusBarStateController, NotificationInterruptionStateProvider notificationInterruptionStateProvider, NotificationListener notificationListener) { mRemoteInputManager = remoteInputManager; mVisualStabilityManager = visualStabilityManager; mShadeController = shadeController; mStatusBarStateController = statusBarStateController; mNotificationInterruptionStateProvider = notificationInterruptionStateProvider; mNotificationListener = notificationListener; Loading Loading @@ -102,7 +100,7 @@ public class NotificationAlertingManager { // If it does and we no longer need to heads up, we should free the view. if (mNotificationInterruptionStateProvider.shouldHeadsUp(entry)) { mHeadsUpManager.showNotification(entry); if (!mShadeController.get().isDozing()) { if (!mStatusBarStateController.isDozing()) { // Mark as seen immediately setNotificationShown(entry.getSbn()); } Loading Loading
packages/SystemUI/plugin/src/com/android/systemui/plugins/statusbar/StatusBarStateController.java +2 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,8 @@ public interface StatusBarStateController { int getState(); /** * Is device dozing * Is device dozing. Dozing is when the screen is in AOD or asleep given that * {@link com.android.systemui.doze.DozeService} is configured. */ boolean isDozing(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java +3 −11 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ import com.android.systemui.statusbar.phone.KeyguardBypassController; import com.android.systemui.statusbar.phone.LockscreenWallpaper; import com.android.systemui.statusbar.phone.ScrimController; import com.android.systemui.statusbar.phone.ScrimState; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.phone.StatusBarWindowController; import com.android.systemui.statusbar.policy.KeyguardStateController; Loading Loading @@ -105,9 +104,6 @@ public class NotificationMediaManager implements Dumpable { private final NotificationEntryManager mEntryManager; // Late binding, also @Nullable due to being in com.android.systemui.statusbar.phone package @Nullable private Lazy<ShadeController> mShadeController; @Nullable private Lazy<StatusBarWindowController> mStatusBarWindowController; Loading Loading @@ -183,7 +179,6 @@ public class NotificationMediaManager implements Dumpable { @Inject public NotificationMediaManager( Context context, Lazy<ShadeController> shadeController, Lazy<StatusBar> statusBarLazy, Lazy<StatusBarWindowController> statusBarWindowController, NotificationEntryManager notificationEntryManager, Loading @@ -193,11 +188,10 @@ public class NotificationMediaManager implements Dumpable { mMediaArtworkProcessor = mediaArtworkProcessor; mKeyguardBypassController = keyguardBypassController; mMediaListeners = new ArrayList<>(); mMediaSessionManager = (MediaSessionManager) mContext.getSystemService(Context.MEDIA_SESSION_SERVICE); // TODO: use MediaSessionManager.SessionListener to hook us up to future updates // in session state mShadeController = shadeController; mMediaSessionManager = (MediaSessionManager) mContext.getSystemService( Context.MEDIA_SESSION_SERVICE); // TODO: use KeyguardStateController#isOccluded to remove this dependency mStatusBarLazy = statusBarLazy; mStatusBarWindowController = statusBarWindowController; Loading Loading @@ -603,9 +597,7 @@ public class NotificationMediaManager implements Dumpable { if (DEBUG_MEDIA) { Log.v(TAG, "DEBUG_MEDIA: Fading out album artwork"); } ShadeController shadeController = mShadeController.get(); boolean cannotAnimateDoze = shadeController != null && shadeController.isDozing() boolean cannotAnimateDoze = mStatusBarStateController.isDozing() && !ScrimState.AOD.getAnimateChange(); boolean needsBypassFading = mKeyguardStateController.isBypassFadingAnimation(); if (((mBiometricUnlockController != null && mBiometricUnlockController.getMode() Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java +5 −5 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.collection.NotificationEntry.EditedSuggestionInfo; import com.android.systemui.statusbar.notification.logging.NotificationLogger; import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.phone.StatusBar; import com.android.systemui.statusbar.policy.RemoteInputUriController; import com.android.systemui.statusbar.policy.RemoteInputView; Loading Loading @@ -116,7 +116,7 @@ public class NotificationRemoteInputManager implements Dumpable { private final NotificationEntryManager mEntryManager; private final Handler mMainHandler; private final Lazy<ShadeController> mShadeController; private final Lazy<StatusBar> mStatusBarLazy; protected final Context mContext; private final UserManager mUserManager; Loading @@ -136,7 +136,7 @@ public class NotificationRemoteInputManager implements Dumpable { @Override public boolean onClickHandler( View view, PendingIntent pendingIntent, RemoteViews.RemoteResponse response) { mShadeController.get().wakeUpIfDozing(SystemClock.uptimeMillis(), view, mStatusBarLazy.get().wakeUpIfDozing(SystemClock.uptimeMillis(), view, "NOTIFICATION_CLICK"); if (handleRemoteInput(view, pendingIntent)) { Loading Loading @@ -261,7 +261,7 @@ public class NotificationRemoteInputManager implements Dumpable { NotificationLockscreenUserManager lockscreenUserManager, SmartReplyController smartReplyController, NotificationEntryManager notificationEntryManager, Lazy<ShadeController> shadeController, Lazy<StatusBar> statusBarLazy, StatusBarStateController statusBarStateController, @MainHandler Handler mainHandler, RemoteInputUriController remoteInputUriController) { Loading @@ -269,7 +269,7 @@ public class NotificationRemoteInputManager implements Dumpable { mLockscreenUserManager = lockscreenUserManager; mSmartReplyController = smartReplyController; mEntryManager = notificationEntryManager; mShadeController = shadeController; mStatusBarLazy = statusBarLazy; mMainHandler = mainHandler; mBarService = IStatusBarService.Stub.asInterface( ServiceManager.getService(Context.STATUS_BAR_SERVICE)); Loading
packages/SystemUI/src/com/android/systemui/statusbar/PulseExpansionHandler.kt +1 −1 Original line number Diff line number Diff line Loading @@ -211,7 +211,7 @@ constructor( setUserLocked(mStartingChild!!, false) mStartingChild = null } if (shadeController.isDozing) { if (statusBarStateController.isDozing) { isWakingToShadeLocked = true wakeUpCoordinator.willWakeUp = true mPowerManager!!.wakeUp(SystemClock.uptimeMillis(), WAKE_REASON_GESTURE, Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationAlertingManager.java +5 −7 Original line number Diff line number Diff line Loading @@ -24,18 +24,16 @@ import android.service.notification.StatusBarNotification; import android.util.Log; import com.android.internal.statusbar.NotificationVisibility; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.statusbar.NotificationListener; import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.notification.collection.NotificationEntry; import com.android.systemui.statusbar.notification.row.NotificationContentInflater.InflationFlag; import com.android.systemui.statusbar.phone.ShadeController; import com.android.systemui.statusbar.policy.HeadsUpManager; import javax.inject.Inject; import javax.inject.Singleton; import dagger.Lazy; /** Handles heads-up and pulsing behavior driven by notification changes. */ @Singleton public class NotificationAlertingManager { Loading @@ -44,7 +42,7 @@ public class NotificationAlertingManager { private final NotificationRemoteInputManager mRemoteInputManager; private final VisualStabilityManager mVisualStabilityManager; private final Lazy<ShadeController> mShadeController; private final StatusBarStateController mStatusBarStateController; private final NotificationInterruptionStateProvider mNotificationInterruptionStateProvider; private final NotificationListener mNotificationListener; Loading @@ -55,12 +53,12 @@ public class NotificationAlertingManager { NotificationEntryManager notificationEntryManager, NotificationRemoteInputManager remoteInputManager, VisualStabilityManager visualStabilityManager, Lazy<ShadeController> shadeController, StatusBarStateController statusBarStateController, NotificationInterruptionStateProvider notificationInterruptionStateProvider, NotificationListener notificationListener) { mRemoteInputManager = remoteInputManager; mVisualStabilityManager = visualStabilityManager; mShadeController = shadeController; mStatusBarStateController = statusBarStateController; mNotificationInterruptionStateProvider = notificationInterruptionStateProvider; mNotificationListener = notificationListener; Loading Loading @@ -102,7 +100,7 @@ public class NotificationAlertingManager { // If it does and we no longer need to heads up, we should free the view. if (mNotificationInterruptionStateProvider.shouldHeadsUp(entry)) { mHeadsUpManager.showNotification(entry); if (!mShadeController.get().isDozing()) { if (!mStatusBarStateController.isDozing()) { // Mark as seen immediately setNotificationShown(entry.getSbn()); } Loading