summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/flags/Flags.kt24
-rw-r--r--packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/NotifPipelineFlags.kt14
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinator.kt5
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinator.kt4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotificationRowBinderImpl.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProvider.java4
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImpl.java39
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java7
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java12
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java20
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java62
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputViewController.kt9
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinatorTest.kt51
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinatorTest.kt37
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java85
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowControllerTest.kt6
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java1
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java28
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java41
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputViewTest.java8
25 files changed, 52 insertions, 439 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
index 251d4baf3b68..8783ec328b40 100644
--- a/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
+++ b/packages/SystemUI/src/com/android/systemui/flags/Flags.kt
@@ -58,12 +58,6 @@ object Flags {
"notification_drag_to_contents"
)
- // TODO(b/254512517): Tracking Bug
- val FSI_REQUIRES_KEYGUARD = releasedFlag(110, "fsi_requires_keyguard")
-
- // TODO(b/259130119): Tracking Bug
- val FSI_ON_DND_UPDATE = releasedFlag(259130119, "fsi_on_dnd_update")
-
// TODO(b/254512538): Tracking Bug
val INSTANT_VOICE_REPLY = unreleasedFlag(111, "instant_voice_reply")
@@ -74,16 +68,8 @@ object Flags {
val NOTIFICATION_MEMORY_LOGGING_ENABLED =
unreleasedFlag(119, "notification_memory_logging_enabled")
- // TODO(b/254512731): Tracking Bug
- @JvmField val NOTIFICATION_DISMISSAL_FADE = releasedFlag(113, "notification_dismissal_fade")
-
@JvmField val USE_ROUNDNESS_SOURCETYPES = releasedFlag(116, "use_roundness_sourcetype")
- // TODO(b/259217907)
- @JvmField
- val NOTIFICATION_GROUP_DISMISSAL_ANIMATION =
- releasedFlag(259217907, "notification_group_dismissal_animation")
-
@JvmField
val SIMPLIFIED_APPEAR_FRACTION =
unreleasedFlag(259395680, "simplified_appear_fraction", teamfood = true)
@@ -91,14 +77,6 @@ object Flags {
// TODO(b/257315550): Tracking Bug
val NO_HUN_FOR_OLD_WHEN = releasedFlag(118, "no_hun_for_old_when")
- // TODO(b/260335638): Tracking Bug
- @JvmField
- val NOTIFICATION_INLINE_REPLY_ANIMATION =
- releasedFlag(174148361, "notification_inline_reply_animation")
-
- val FILTER_UNSEEN_NOTIFS_ON_KEYGUARD =
- releasedFlag(254647461, "filter_unseen_notifs_on_keyguard")
-
// TODO(b/277338665): Tracking Bug
@JvmField
val NOTIFICATION_SHELF_REFACTOR =
@@ -613,8 +591,6 @@ object Flags {
@JvmField val CLIPBOARD_REMOTE_BEHAVIOR = releasedFlag(1701, "clipboard_remote_behavior")
// 1800 - shade container
- @JvmField
- val LEAVE_SHADE_OPEN_FOR_BUGREPORT = releasedFlag(1800, "leave_shade_open_for_bugreport")
// TODO(b/265944639): Tracking Bug
@JvmField val DUAL_SHADE = unreleasedFlag(1801, "dual_shade")
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
index 4be47ecb42d9..d3b6fc237084 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialogLite.java
@@ -1043,9 +1043,6 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
Log.w(TAG, "Bugreport handler could not be launched");
mIActivityManager.requestInteractiveBugReport();
}
- // Maybe close shade (depends on a flag) so user sees the activity
- mCentralSurfacesOptional.ifPresent(
- CentralSurfaces::collapseShadeForBugreport);
} catch (RemoteException e) {
}
}
@@ -1064,8 +1061,6 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
mMetricsLogger.action(MetricsEvent.ACTION_BUGREPORT_FROM_POWER_MENU_FULL);
mUiEventLogger.log(GlobalActionsEvent.GA_BUGREPORT_LONG_PRESS);
mIActivityManager.requestFullBugReport();
- // Maybe close shade (depends on a flag) so user sees the activity
- mCentralSurfacesOptional.ifPresent(CentralSurfaces::collapseShadeForBugreport);
} catch (RemoteException e) {
}
return false;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotifPipelineFlags.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotifPipelineFlags.kt
index 00d8c421c721..5f28ecb56b8c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotifPipelineFlags.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotifPipelineFlags.kt
@@ -31,26 +31,12 @@ class NotifPipelineFlags @Inject constructor(
fun isDevLoggingEnabled(): Boolean =
featureFlags.isEnabled(Flags.NOTIFICATION_PIPELINE_DEVELOPER_LOGGING)
- fun fullScreenIntentRequiresKeyguard(): Boolean =
- featureFlags.isEnabled(Flags.FSI_REQUIRES_KEYGUARD)
-
- fun fsiOnDNDUpdate(): Boolean = featureFlags.isEnabled(Flags.FSI_ON_DND_UPDATE)
-
- fun forceDemoteFsi(): Boolean =
- sysPropFlags.isEnabled(NotificationFlags.FSI_FORCE_DEMOTE)
-
- fun showStickyHunForDeniedFsi(): Boolean =
- sysPropFlags.isEnabled(NotificationFlags.SHOW_STICKY_HUN_FOR_DENIED_FSI)
-
fun allowDismissOngoing(): Boolean =
sysPropFlags.isEnabled(NotificationFlags.ALLOW_DISMISS_ONGOING)
fun isOtpRedactionEnabled(): Boolean =
sysPropFlags.isEnabled(NotificationFlags.OTP_REDACTION)
- val shouldFilterUnseenNotifsOnKeyguard: Boolean
- get() = featureFlags.isEnabled(Flags.FILTER_UNSEEN_NOTIFS_ON_KEYGUARD)
-
val isNoHunForOldWhenEnabled: Boolean
get() = featureFlags.isEnabled(Flags.NO_HUN_FOR_OLD_WHEN)
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinator.kt
index 4d0e746735aa..0529c94ed59a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinator.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinator.kt
@@ -392,8 +392,7 @@ class HeadsUpCoordinator @Inject constructor(
mNotificationInterruptStateProvider.logFullScreenIntentDecision(entry, fsiDecision)
if (fsiDecision.shouldLaunch) {
mLaunchFullScreenIntentProvider.launchFullScreenIntent(entry)
- } else if (mFlags.fsiOnDNDUpdate() &&
- fsiDecision == FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND) {
+ } else if (fsiDecision == FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND) {
// If DND was the only reason this entry was suppressed, note it for potential
// reconsideration on later ranking updates.
addForFSIReconsideration(entry, mSystemClock.currentTimeMillis())
@@ -509,7 +508,7 @@ class HeadsUpCoordinator @Inject constructor(
// - was suppressed from FSI launch only by a DND suppression
// - is within the recency window for reconsideration
// If any of these entries are no longer suppressed, launch the FSI now.
- if (mFlags.fsiOnDNDUpdate() && isCandidateForFSIReconsideration(entry)) {
+ if (isCandidateForFSIReconsideration(entry)) {
val decision =
mNotificationInterruptStateProvider.getFullScreenIntentDecision(entry)
if (decision.shouldLaunch) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinator.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinator.kt
index 6322edf5a1b4..4cbbefe1cd73 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinator.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinator.kt
@@ -95,9 +95,7 @@ constructor(
pipeline.addFinalizeFilter(notifFilter)
keyguardNotificationVisibilityProvider.addOnStateChangedListener(::invalidateListFromFilter)
updateSectionHeadersVisibility()
- if (notifPipelineFlags.shouldFilterUnseenNotifsOnKeyguard) {
- attachUnseenFilter(pipeline)
- }
+ attachUnseenFilter(pipeline)
}
private fun attachUnseenFilter(pipeline: NotifPipeline) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotificationRowBinderImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotificationRowBinderImpl.java
index bdb206beb123..38bbb351a131 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotificationRowBinderImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/inflation/NotificationRowBinderImpl.java
@@ -16,7 +16,6 @@
package com.android.systemui.statusbar.notification.collection.inflation;
-import static com.android.systemui.flags.Flags.NOTIFICATION_INLINE_REPLY_ANIMATION;
import static com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_CONTRACTED;
import static com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_EXPANDED;
import static com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.FLAG_CONTENT_VIEW_PUBLIC;
@@ -31,7 +30,6 @@ import android.view.ViewGroup;
import com.android.internal.util.NotificationMessagingUtil;
import com.android.systemui.dagger.SysUISingleton;
-import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.statusbar.NotificationLockscreenUserManager;
import com.android.systemui.statusbar.NotificationPresenter;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
@@ -73,7 +71,6 @@ public class NotificationRowBinderImpl implements NotificationRowBinder {
private NotificationListContainer mListContainer;
private BindRowCallback mBindRowCallback;
private NotificationClicker mNotificationClicker;
- private FeatureFlags mFeatureFlags;
@Inject
public NotificationRowBinderImpl(
@@ -85,8 +82,7 @@ public class NotificationRowBinderImpl implements NotificationRowBinder {
RowContentBindStage rowContentBindStage,
Provider<RowInflaterTask> rowInflaterTaskProvider,
ExpandableNotificationRowComponent.Builder expandableNotificationRowComponentBuilder,
- IconManager iconManager,
- FeatureFlags featureFlags) {
+ IconManager iconManager) {
mContext = context;
mNotifBindPipeline = notifBindPipeline;
mRowContentBindStage = rowContentBindStage;
@@ -96,7 +92,6 @@ public class NotificationRowBinderImpl implements NotificationRowBinder {
mRowInflaterTaskProvider = rowInflaterTaskProvider;
mExpandableNotificationRowComponentBuilder = expandableNotificationRowComponentBuilder;
mIconManager = iconManager;
- mFeatureFlags = featureFlags;
}
/**
@@ -180,8 +175,6 @@ public class NotificationRowBinderImpl implements NotificationRowBinder {
entry.setRow(row);
mNotifBindPipeline.manageRow(entry, row);
mBindRowCallback.onBindRow(row);
- row.setInlineReplyAnimationFlagEnabled(
- mFeatureFlags.isEnabled(NOTIFICATION_INLINE_REPLY_ANIMATION));
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProvider.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProvider.java
index 9a1747a9c931..88994b9eec04 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProvider.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProvider.java
@@ -98,10 +98,6 @@ public interface NotificationInterruptStateProvider {
*/
NO_FSI_NO_HUN_OR_KEYGUARD(false),
/**
- * No conditions blocking FSI launch.
- */
- FSI_EXPECTED_NOT_TO_HUN(true),
- /**
* The notification is coming from a suspended packages, so FSI is suppressed.
*/
NO_FSI_SUSPENDED(false);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImpl.java
index a48870ba9f45..609f9d47a983 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImpl.java
@@ -321,30 +321,22 @@ public class NotificationInterruptStateProviderImpl implements NotificationInter
suppressedByDND);
}
- // Check whether FSI requires the keyguard to be showing.
- if (mFlags.fullScreenIntentRequiresKeyguard()) {
-
- // If notification won't HUN and keyguard is showing, launch the FSI.
- if (mKeyguardStateController.isShowing()) {
- if (mKeyguardStateController.isOccluded()) {
- return getDecisionGivenSuppression(
- FullScreenIntentDecision.FSI_KEYGUARD_OCCLUDED,
- suppressedByDND);
- } else {
- // Likely LOCKED_SHADE, but launch FSI anyway
- return getDecisionGivenSuppression(FullScreenIntentDecision.FSI_LOCKED_SHADE,
- suppressedByDND);
- }
+ // If notification won't HUN and keyguard is showing, launch the FSI.
+ if (mKeyguardStateController.isShowing()) {
+ if (mKeyguardStateController.isOccluded()) {
+ return getDecisionGivenSuppression(
+ FullScreenIntentDecision.FSI_KEYGUARD_OCCLUDED,
+ suppressedByDND);
+ } else {
+ // Likely LOCKED_SHADE, but launch FSI anyway
+ return getDecisionGivenSuppression(FullScreenIntentDecision.FSI_LOCKED_SHADE,
+ suppressedByDND);
}
-
- // Detect the case determined by b/231322873 to launch FSI while device is in use,
- // as blocked by the correct implementation, and report the event.
- return getDecisionGivenSuppression(FullScreenIntentDecision.NO_FSI_NO_HUN_OR_KEYGUARD,
- suppressedByDND);
}
- // If the notification won't HUN for some other reason (DND/snooze/etc), launch FSI.
- return getDecisionGivenSuppression(FullScreenIntentDecision.FSI_EXPECTED_NOT_TO_HUN,
+ // Detect the case determined by b/231322873 to launch FSI while device is in use,
+ // as blocked by the correct implementation, and report the event.
+ return getDecisionGivenSuppression(FullScreenIntentDecision.NO_FSI_NO_HUN_OR_KEYGUARD,
suppressedByDND);
}
@@ -409,14 +401,11 @@ public class NotificationInterruptStateProviderImpl implements NotificationInter
}
final boolean isSnoozedPackage = isSnoozedPackage(sbn);
- final boolean fsiRequiresKeyguard = mFlags.fullScreenIntentRequiresKeyguard();
final boolean hasFsi = sbn.getNotification().fullScreenIntent != null;
// Assume any notification with an FSI is time-sensitive (like an alarm or incoming call)
// and ignore whether HUNs have been snoozed for the package.
- final boolean shouldBypassSnooze = fsiRequiresKeyguard && hasFsi;
-
- if (isSnoozedPackage && !shouldBypassSnooze) {
+ if (isSnoozedPackage && !hasFsi) {
if (log) mLogger.logNoHeadsUpPackageSnoozed(entry);
return false;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
index 97dcbb54e44f..10cdae3b967c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
@@ -272,7 +272,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
private OnExpandClickListener mOnExpandClickListener;
private View.OnClickListener mOnFeedbackClickListener;
private Path mExpandingClipPath;
- private boolean mIsInlineReplyAnimationFlagEnabled = false;
// Listener will be called when receiving a long click event.
// Use #setLongPressPosition to optionally assign positional data with the long press.
@@ -3086,10 +3085,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
return showingLayout != null && showingLayout.requireRowToHaveOverlappingRendering();
}
- public void setInlineReplyAnimationFlagEnabled(boolean isEnabled) {
- mIsInlineReplyAnimationFlagEnabled = isEnabled;
- }
-
@Override
public void setActualHeight(int height, boolean notifyListeners) {
boolean changed = height != getActualHeight();
@@ -3109,11 +3104,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
}
int contentHeight = Math.max(getMinHeight(), height);
for (NotificationContentView l : mLayouts) {
- if (mIsInlineReplyAnimationFlagEnabled) {
- l.setContentHeight(height);
- } else {
- l.setContentHeight(contentHeight);
- }
+ l.setContentHeight(height);
}
if (mIsSummaryWithChildren) {
mChildrenContainer.setActualHeight(height);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java
index 5ca0866209a5..9bf05cb47f04 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java
@@ -376,8 +376,7 @@ public class ExpandableNotificationRowController implements NotifViewController
public boolean offerToKeepInParentForAnimation() {
//If the User dismissed the notification's parent, we want to keep it attached until the
//dismiss animation is ongoing. Therefore we don't want to remove it in the ShadeViewDiffer.
- if (mFeatureFlags.isEnabled(Flags.NOTIFICATION_GROUP_DISMISSAL_ANIMATION)
- && mView.isParentDismissed()) {
+ if (mView.isParentDismissed()) {
mView.setKeepInParentForDismissAnimation(true);
return true;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java
index 451d837b63a0..f432af2232a9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentView.java
@@ -635,8 +635,7 @@ public class NotificationContentView extends FrameLayout implements Notification
int hint;
if (mHeadsUpChild != null && isVisibleOrTransitioning(VISIBLE_TYPE_HEADSUP)) {
hint = getViewHeight(VISIBLE_TYPE_HEADSUP);
- if (mHeadsUpRemoteInput != null && mHeadsUpRemoteInput.isAnimatingAppearance()
- && mHeadsUpRemoteInputController.isFocusAnimationFlagActive()) {
+ if (mHeadsUpRemoteInput != null && mHeadsUpRemoteInput.isAnimatingAppearance()) {
// While the RemoteInputView is animating its appearance, it should be allowed
// to overlap the hint, therefore no space is reserved for the hint during the
// appearance animation of the RemoteInputView
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
index b81fb7f022b4..e2f93ce62e46 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java
@@ -180,7 +180,6 @@ public class NotificationStackScrollLayoutController {
private final SeenNotificationsProvider mSeenNotificationsProvider;
private NotificationStackScrollLayout mView;
- private boolean mFadeNotificationsOnDismiss;
private NotificationSwipeHelper mSwipeHelper;
@Nullable
private Boolean mHistoryEnabled;
@@ -548,7 +547,7 @@ public class NotificationStackScrollLayoutController {
public boolean updateSwipeProgress(View animView, boolean dismissable,
float swipeProgress) {
// Returning true prevents alpha fading.
- return !mFadeNotificationsOnDismiss;
+ return false;
}
@Override
@@ -773,7 +772,6 @@ public class NotificationStackScrollLayoutController {
mLockscreenUserManager.addUserChangedListener(mLockscreenUserChangeListener);
- mFadeNotificationsOnDismiss = mFeatureFlags.isEnabled(Flags.NOTIFICATION_DISMISSAL_FADE);
if (!mUseRoundnessSourceTypes) {
mNotificationRoundnessManager.setOnRoundingChangedCallback(mView::invalidate);
mView.addOnExpandedHeightChangedListener(mNotificationRoundnessManager::setExpanded);
@@ -1942,8 +1940,7 @@ public class NotificationStackScrollLayoutController {
public void setNotifStats(@NonNull NotifStats notifStats) {
mNotifStats = notifStats;
mView.setHasFilteredOutSeenNotifications(
- mNotifPipelineFlags.getShouldFilterUnseenNotifsOnKeyguard()
- && mSeenNotificationsProvider.getHasFilteredOutSeenNotifications());
+ mSeenNotificationsProvider.getHasFilteredOutSeenNotifications());
updateFooter();
updateShowEmptyShadeView();
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java
index a6c0435921d1..00928b206916 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfaces.java
@@ -430,9 +430,6 @@ public interface CentralSurfaces extends Dumpable, ActivityStarter, LifecycleOwn
void collapseShade();
- /** Collapse the shade, but conditional on a flag specific to the trigger of a bugreport. */
- void collapseShadeForBugreport();
-
int getWakefulnessState();
boolean isScreenFullyOff();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
index 6cb9582c344e..cf2c9dedb67e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java
@@ -951,11 +951,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
mUiModeManager = mContext.getSystemService(UiModeManager.class);
mBubblesOptional.ifPresent(this::initBubbles);
- // Do not restart System UI when the bugreport flag changes.
- mFeatureFlags.addListener(Flags.LEAVE_SHADE_OPEN_FOR_BUGREPORT, event -> {
- event.requestNoRestart();
- });
-
mStatusBarSignalPolicy.init();
mKeyguardIndicationController.init();
@@ -3530,13 +3525,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
}
}
- @Override
- public void collapseShadeForBugreport() {
- if (!mFeatureFlags.isEnabled(Flags.LEAVE_SHADE_OPEN_FOR_BUGREPORT)) {
- collapseShade();
- }
- }
-
@VisibleForTesting
final WakefulnessLifecycle.Observer mWakefulnessObserver = new WakefulnessLifecycle.Observer() {
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java
index 0398a0957501..7fc09961c6c6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenter.java
@@ -331,26 +331,6 @@ class StatusBarNotificationPresenter implements NotificationPresenter,
return true;
}
- if (sbn.getNotification().fullScreenIntent != null
- && !mNotifPipelineFlags.fullScreenIntentRequiresKeyguard()) {
- // we don't allow head-up on the lockscreen (unless there's a
- // "showWhenLocked" activity currently showing) if
- // the potential HUN has a fullscreen intent
- if (mKeyguardStateController.isShowing() && !mCentralSurfaces.isOccluded()) {
- if (DEBUG) {
- Log.d(TAG, "No heads up: entry has fullscreen intent on lockscreen "
- + sbn.getKey());
- }
- return true;
- }
-
- if (mAccessibilityManager.isTouchExplorationEnabled()) {
- if (DEBUG) {
- Log.d(TAG, "No heads up: accessible fullscreen: " + sbn.getKey());
- }
- return true;
- }
- }
return false;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
index a08aa88e0c5a..403a7e8116c8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
@@ -21,7 +21,6 @@ import static android.view.WindowInsetsAnimation.Callback.DISPATCH_MODE_STOP;
import static com.android.systemui.statusbar.notification.stack.StackStateAnimator.ANIMATION_DURATION_STANDARD;
import android.app.ActivityManager;
-import android.app.Notification;
import android.content.Context;
import android.content.pm.PackageManager;
import android.content.res.ColorStateList;
@@ -135,7 +134,6 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
@Nullable
private RevealParams mRevealParams;
private Rect mContentBackgroundBounds;
- private boolean mIsFocusAnimationFlagActive;
private boolean mIsAnimatingAppearance = false;
// TODO(b/193539698): move these to a Controller
@@ -433,7 +431,7 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
// case to prevent flicker.
if (!mRemoved) {
ViewGroup parent = (ViewGroup) getParent();
- if (animate && parent != null && mIsFocusAnimationFlagActive) {
+ if (animate && parent != null) {
ViewGroup grandParent = (ViewGroup) parent.getParent();
ViewGroupOverlay overlay = parent.getOverlay();
@@ -598,24 +596,10 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
}
/**
- * Sets whether the feature flag for the revised inline reply animation is active or not.
- * @param active
- */
- public void setIsFocusAnimationFlagActive(boolean active) {
- mIsFocusAnimationFlagActive = active;
- }
-
- /**
* Focuses the RemoteInputView and animates its appearance
*/
public void focusAnimated() {
- if (!mIsFocusAnimationFlagActive && getVisibility() != VISIBLE
- && mRevealParams != null) {
- android.animation.Animator animator = mRevealParams.createCircularRevealAnimator(this);
- animator.setDuration(StackStateAnimator.ANIMATION_DURATION_STANDARD);
- animator.setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN);
- animator.start();
- } else if (mIsFocusAnimationFlagActive && getVisibility() != VISIBLE) {
+ if (getVisibility() != VISIBLE) {
mIsAnimatingAppearance = true;
setAlpha(0f);
Animator focusAnimator = getFocusAnimator(getActionsContainerLayout());
@@ -670,37 +654,19 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
}
private void reset() {
- if (mIsFocusAnimationFlagActive) {
- mProgressBar.setVisibility(INVISIBLE);
- mResetting = true;
- mSending = false;
- onDefocus(true /* animate */, false /* logClose */, () -> {
- mEntry.remoteInputTextWhenReset = SpannedString.valueOf(mEditText.getText());
- mEditText.getText().clear();
- mEditText.setEnabled(isAggregatedVisible());
- mSendButton.setVisibility(VISIBLE);
- mController.removeSpinning(mEntry.getKey(), mToken);
- updateSendButton();
- setAttachment(null);
- mResetting = false;
- });
- return;
- }
-
+ mProgressBar.setVisibility(INVISIBLE);
mResetting = true;
mSending = false;
- mEntry.remoteInputTextWhenReset = SpannedString.valueOf(mEditText.getText());
-
- mEditText.getText().clear();
- mEditText.setEnabled(isAggregatedVisible());
- mSendButton.setVisibility(VISIBLE);
- mProgressBar.setVisibility(INVISIBLE);
- mController.removeSpinning(mEntry.getKey(), mToken);
- updateSendButton();
- onDefocus(false /* animate */, false /* logClose */, null /* doAfterDefocus */);
- setAttachment(null);
-
- mResetting = false;
+ onDefocus(true /* animate */, false /* logClose */, () -> {
+ mEntry.remoteInputTextWhenReset = SpannedString.valueOf(mEditText.getText());
+ mEditText.getText().clear();
+ mEditText.setEnabled(isAggregatedVisible());
+ mSendButton.setVisibility(VISIBLE);
+ mController.removeSpinning(mEntry.getKey(), mToken);
+ updateSendButton();
+ setAttachment(null);
+ mResetting = false;
+ });
}
@Override
@@ -844,7 +810,7 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
super.onLayout(changed, l, t, r, b);
- if (mIsFocusAnimationFlagActive) setPivotY(getMeasuredHeight());
+ setPivotY(getMeasuredHeight());
if (mContentBackgroundBounds != null) {
mContentBackground.setBounds(mContentBackgroundBounds);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputViewController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputViewController.kt
index 22b4c9d81d25..e9b1d543be26 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputViewController.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputViewController.kt
@@ -30,8 +30,6 @@ import android.util.Log
import android.view.View
import com.android.internal.logging.UiEventLogger
import com.android.systemui.R
-import com.android.systemui.flags.FeatureFlags
-import com.android.systemui.flags.Flags.NOTIFICATION_INLINE_REPLY_ANIMATION
import com.android.systemui.statusbar.NotificationRemoteInputManager
import com.android.systemui.statusbar.RemoteInputController
import com.android.systemui.statusbar.notification.collection.NotificationEntry
@@ -63,8 +61,6 @@ interface RemoteInputViewController {
var revealParams: RevealParams?
- val isFocusAnimationFlagActive: Boolean
-
/**
* Sets the smart reply that should be inserted in the remote input, or `null` if the user is
* not editing a smart reply.
@@ -122,7 +118,6 @@ class RemoteInputViewControllerImpl @Inject constructor(
private val remoteInputController: RemoteInputController,
private val shortcutManager: ShortcutManager,
private val uiEventLogger: UiEventLogger,
- private val mFlags: FeatureFlags
) : RemoteInputViewController {
private val onSendListeners = ArraySet<OnSendRemoteInputListener>()
@@ -154,9 +149,6 @@ class RemoteInputViewControllerImpl @Inject constructor(
override val isActive: Boolean get() = view.isActive
- override val isFocusAnimationFlagActive: Boolean
- get() = mFlags.isEnabled(NOTIFICATION_INLINE_REPLY_ANIMATION)
-
override fun bind() {
if (isBound) return
isBound = true
@@ -167,7 +159,6 @@ class RemoteInputViewControllerImpl @Inject constructor(
view.setSupportedMimeTypes(it.allowedDataTypes)
}
view.setRevealParameters(revealParams)
- view.setIsFocusAnimationFlagActive(isFocusAnimationFlagActive)
view.addOnEditTextFocusChangedListener(onFocusChangeListener)
view.addOnSendRemoteInputListener(onSendRemoteInputListener)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinatorTest.kt
index ba91d87c659a..67128ff5624a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinatorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/HeadsUpCoordinatorTest.kt
@@ -22,7 +22,6 @@ import android.testing.TestableLooper.RunWithLooper
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.dump.logcatLogBuffer
-import com.android.systemui.flags.Flags
import com.android.systemui.statusbar.NotificationRemoteInputManager
import com.android.systemui.statusbar.notification.NotifPipelineFlags
import com.android.systemui.statusbar.notification.collection.GroupEntryBuilder
@@ -171,9 +170,6 @@ class HeadsUpCoordinatorTest : SysuiTestCase() {
// Set the default FSI decision
setShouldFullScreen(any(), FullScreenIntentDecision.NO_FULL_SCREEN_INTENT)
-
- // Run tests with default feature flag state
- whenever(flags.fsiOnDNDUpdate()).thenReturn(Flags.FSI_ON_DND_UPDATE.default)
}
@Test
@@ -258,7 +254,7 @@ class HeadsUpCoordinatorTest : SysuiTestCase() {
@Test
fun testOnEntryAdded_shouldFullScreen() {
- setShouldFullScreen(entry, FullScreenIntentDecision.FSI_EXPECTED_NOT_TO_HUN)
+ setShouldFullScreen(entry, FullScreenIntentDecision.FSI_KEYGUARD_SHOWING)
collectionListener.onEntryAdded(entry)
verify(launchFullScreenIntentProvider).launchFullScreenIntent(entry)
}
@@ -854,38 +850,7 @@ class HeadsUpCoordinatorTest : SysuiTestCase() {
}
@Test
- fun testOnRankingApplied_noFSIOnUpdateWhenFlagOff() {
- // Ensure the feature flag is off
- whenever(flags.fsiOnDNDUpdate()).thenReturn(false)
-
- // GIVEN that mEntry was previously suppressed from full-screen only by DND
- setShouldFullScreen(entry, FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND)
- collectionListener.onEntryAdded(entry)
-
- // Verify that this causes a log
- verifyLoggedFullScreenIntentDecision(
- entry,
- FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND
- )
- clearInterruptionProviderInvocations()
-
- // and it is then updated to allow full screen
- setShouldFullScreen(entry, FullScreenIntentDecision.FSI_DEVICE_NOT_INTERACTIVE)
- whenever(notifPipeline.allNotifs).thenReturn(listOf(entry))
- collectionListener.onRankingApplied()
-
- // THEN it should not full screen because the feature is off
- verify(launchFullScreenIntentProvider, never()).launchFullScreenIntent(any())
-
- // VERIFY that no additional logging happens either
- verifyNoFullScreenIntentDecisionLogged()
- }
-
- @Test
fun testOnRankingApplied_updateToFullScreen() {
- // Turn on the feature
- whenever(flags.fsiOnDNDUpdate()).thenReturn(true)
-
// GIVEN that mEntry was previously suppressed from full-screen only by DND
setShouldFullScreen(entry, FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND)
collectionListener.onEntryAdded(entry)
@@ -929,9 +894,6 @@ class HeadsUpCoordinatorTest : SysuiTestCase() {
@Test
fun testOnRankingApplied_withOnlyDndSuppressionAllowsFsiLater() {
- // Turn on the feature
- whenever(flags.fsiOnDNDUpdate()).thenReturn(true)
-
// GIVEN that mEntry was previously suppressed from full-screen only by DND
setShouldFullScreen(entry, FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND)
collectionListener.onEntryAdded(entry)
@@ -980,9 +942,6 @@ class HeadsUpCoordinatorTest : SysuiTestCase() {
@Test
fun testOnRankingApplied_newNonFullScreenAnswerInvalidatesCandidate() {
- // Turn on the feature
- whenever(flags.fsiOnDNDUpdate()).thenReturn(true)
-
// GIVEN that mEntry was previously suppressed from full-screen only by DND
whenever(notifPipeline.allNotifs).thenReturn(listOf(entry))
setShouldFullScreen(entry, FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND)
@@ -1018,9 +977,6 @@ class HeadsUpCoordinatorTest : SysuiTestCase() {
@Test
fun testOnRankingApplied_noFSIWhenAlsoSuppressedForOtherReasons() {
- // Feature on
- whenever(flags.fsiOnDNDUpdate()).thenReturn(true)
-
// GIVEN that mEntry is suppressed by DND (functionally), but not *only* DND
setShouldFullScreen(entry, FullScreenIntentDecision.NO_FSI_SUPPRESSED_BY_DND)
collectionListener.onEntryAdded(entry)
@@ -1035,9 +991,6 @@ class HeadsUpCoordinatorTest : SysuiTestCase() {
@Test
fun testOnRankingApplied_noFSIWhenTooOld() {
- // Feature on
- whenever(flags.fsiOnDNDUpdate()).thenReturn(true)
-
// GIVEN that mEntry is suppressed only by DND
setShouldFullScreen(entry, FullScreenIntentDecision.NO_FSI_SUPPRESSED_ONLY_BY_DND)
collectionListener.onEntryAdded(entry)
@@ -1046,7 +999,7 @@ class HeadsUpCoordinatorTest : SysuiTestCase() {
coordinator.addForFSIReconsideration(entry, systemClock.currentTimeMillis() - 10000)
// and it is updated to full screen later
- setShouldFullScreen(entry, FullScreenIntentDecision.FSI_EXPECTED_NOT_TO_HUN)
+ setShouldFullScreen(entry, FullScreenIntentDecision.FSI_KEYGUARD_SHOWING)
collectionListener.onRankingApplied()
// THEN it should still not full screen because it's too old
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinatorTest.kt
index c2a2a40b7e5d..8f07f8d1a099 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinatorTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/coordinator/KeyguardCoordinatorTest.kt
@@ -97,8 +97,6 @@ class KeyguardCoordinatorTest : SysuiTestCase() {
@Test
fun unseenFilterSuppressesSeenNotifWhileKeyguardShowing() {
- whenever(notifPipelineFlags.shouldFilterUnseenNotifsOnKeyguard).thenReturn(true)
-
// GIVEN: Keyguard is not showing, shade is expanded, and a notification is present
keyguardRepository.setKeyguardShowing(false)
whenever(statusBarStateController.isExpanded).thenReturn(true)
@@ -124,8 +122,6 @@ class KeyguardCoordinatorTest : SysuiTestCase() {
@Test
fun unseenFilterStopsMarkingSeenNotifWhenTransitionToAod() {
- whenever(notifPipelineFlags.shouldFilterUnseenNotifsOnKeyguard).thenReturn(true)
-
// GIVEN: Keyguard is not showing, shade is not expanded, and a notification is present
keyguardRepository.setKeyguardShowing(false)
whenever(statusBarStateController.isExpanded).thenReturn(false)
@@ -151,8 +147,6 @@ class KeyguardCoordinatorTest : SysuiTestCase() {
@Test
fun unseenFilter_headsUpMarkedAsSeen() {
- whenever(notifPipelineFlags.shouldFilterUnseenNotifsOnKeyguard).thenReturn(true)
-
// GIVEN: Keyguard is not showing, shade is not expanded
keyguardRepository.setKeyguardShowing(false)
whenever(statusBarStateController.isExpanded).thenReturn(false)
@@ -183,14 +177,12 @@ class KeyguardCoordinatorTest : SysuiTestCase() {
@Test
fun unseenFilterDoesNotSuppressSeenOngoingNotifWhileKeyguardShowing() {
- whenever(notifPipelineFlags.shouldFilterUnseenNotifsOnKeyguard).thenReturn(true)
-
// GIVEN: Keyguard is not showing, shade is expanded, and an ongoing notification is present
keyguardRepository.setKeyguardShowing(false)
whenever(statusBarStateController.isExpanded).thenReturn(true)
runKeyguardCoordinatorTest {
val fakeEntry = NotificationEntryBuilder()
- .setNotification(Notification.Builder(mContext).setOngoing(true).build())
+ .setNotification(Notification.Builder(mContext, "id").setOngoing(true).build())
.build()
collectionListener.onEntryAdded(fakeEntry)
@@ -205,8 +197,6 @@ class KeyguardCoordinatorTest : SysuiTestCase() {
@Test
fun unseenFilterDoesNotSuppressSeenMediaNotifWhileKeyguardShowing() {
- whenever(notifPipelineFlags.shouldFilterUnseenNotifsOnKeyguard).thenReturn(true)
-
// GIVEN: Keyguard is not showing, shade is expanded, and a media notification is present
keyguardRepository.setKeyguardShowing(false)
whenever(statusBarStateController.isExpanded).thenReturn(true)
@@ -229,8 +219,6 @@ class KeyguardCoordinatorTest : SysuiTestCase() {
@Test
fun unseenFilterUpdatesSeenProviderWhenSuppressing() {
- whenever(notifPipelineFlags.shouldFilterUnseenNotifsOnKeyguard).thenReturn(true)
-
// GIVEN: Keyguard is not showing, shade is expanded, and a notification is present
keyguardRepository.setKeyguardShowing(false)
whenever(statusBarStateController.isExpanded).thenReturn(true)
@@ -255,8 +243,6 @@ class KeyguardCoordinatorTest : SysuiTestCase() {
@Test
fun unseenFilterInvalidatesWhenSettingChanges() {
- whenever(notifPipelineFlags.shouldFilterUnseenNotifsOnKeyguard).thenReturn(true)
-
// GIVEN: Keyguard is not showing, and shade is expanded
keyguardRepository.setKeyguardShowing(false)
whenever(statusBarStateController.isExpanded).thenReturn(true)
@@ -292,8 +278,6 @@ class KeyguardCoordinatorTest : SysuiTestCase() {
@Test
fun unseenFilterAllowsNewNotif() {
- whenever(notifPipelineFlags.shouldFilterUnseenNotifsOnKeyguard).thenReturn(true)
-
// GIVEN: Keyguard is showing, no notifications present
keyguardRepository.setKeyguardShowing(true)
runKeyguardCoordinatorTest {
@@ -308,8 +292,6 @@ class KeyguardCoordinatorTest : SysuiTestCase() {
@Test
fun unseenFilterSeenGroupSummaryWithUnseenChild() {
- whenever(notifPipelineFlags.shouldFilterUnseenNotifsOnKeyguard).thenReturn(true)
-
// GIVEN: Keyguard is not showing, shade is expanded, and a notification is present
keyguardRepository.setKeyguardShowing(false)
whenever(statusBarStateController.isExpanded).thenReturn(true)
@@ -342,8 +324,6 @@ class KeyguardCoordinatorTest : SysuiTestCase() {
@Test
fun unseenNotificationIsMarkedAsSeenWhenKeyguardGoesAway() {
- whenever(notifPipelineFlags.shouldFilterUnseenNotifsOnKeyguard).thenReturn(true)
-
// GIVEN: Keyguard is showing, not dozing, unseen notification is present
keyguardRepository.setKeyguardShowing(true)
keyguardRepository.setDozing(false)
@@ -370,8 +350,6 @@ class KeyguardCoordinatorTest : SysuiTestCase() {
@Test
fun unseenNotificationIsNotMarkedAsSeenIfShadeNotExpanded() {
- whenever(notifPipelineFlags.shouldFilterUnseenNotifsOnKeyguard).thenReturn(true)
-
// GIVEN: Keyguard is showing, unseen notification is present
keyguardRepository.setKeyguardShowing(true)
runKeyguardCoordinatorTest {
@@ -441,20 +419,15 @@ class KeyguardCoordinatorTest : SysuiTestCase() {
val unseenFilter: NotifFilter
get() = keyguardCoordinator.unseenNotifFilter
- // TODO(254647461): Remove lazy from these properties once
- // Flags.FILTER_UNSEEN_NOTIFS_ON_KEYGUARD is enabled and removed
-
- val collectionListener: NotifCollectionListener by lazy {
- withArgCaptor { verify(notifPipeline).addCollectionListener(capture()) }
+ val collectionListener: NotifCollectionListener = withArgCaptor {
+ verify(notifPipeline).addCollectionListener(capture())
}
- val onHeadsUpChangedListener: OnHeadsUpChangedListener by lazy {
+ val onHeadsUpChangedListener: OnHeadsUpChangedListener get() =
withArgCaptor { verify(headsUpManager).addListener(capture()) }
- }
- val statusBarStateListener: StatusBarStateController.StateListener by lazy {
+ val statusBarStateListener: StatusBarStateController.StateListener get() =
withArgCaptor { verify(statusBarStateController).addCallback(capture()) }
- }
var showOnlyUnseenNotifsOnKeyguardSetting: Boolean
get() =
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java
index ae6ced410638..d3e5816cd1d4 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/interruption/NotificationInterruptStateProviderImplTest.java
@@ -123,7 +123,6 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
- when(mFlags.fullScreenIntentRequiresKeyguard()).thenReturn(false);
when(mUserTracker.getUserId()).thenReturn(ActivityManager.getCurrentUser());
mUiEventLoggerFake = new UiEventLoggerFake();
@@ -544,12 +543,6 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {
}
@Test
- public void testShouldNotFullScreen_notPendingIntent_withStrictFlag() throws Exception {
- when(mFlags.fullScreenIntentRequiresKeyguard()).thenReturn(true);
- testShouldNotFullScreen_notPendingIntent();
- }
-
- @Test
public void testShouldNotFullScreen_notPendingIntent() throws RemoteException {
NotificationEntry entry = createNotification(IMPORTANCE_HIGH);
when(mPowerManager.isInteractive()).thenReturn(true);
@@ -604,12 +597,6 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {
}
@Test
- public void testShouldNotFullScreen_notHighImportance_withStrictFlag() throws Exception {
- when(mFlags.fullScreenIntentRequiresKeyguard()).thenReturn(true);
- testShouldNotFullScreen_notHighImportance();
- }
-
- @Test
public void testShouldNotFullScreen_notHighImportance() throws RemoteException {
NotificationEntry entry = createFsiNotification(IMPORTANCE_DEFAULT, /* silenced */ false);
when(mPowerManager.isInteractive()).thenReturn(true);
@@ -626,12 +613,6 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {
}
@Test
- public void testShouldNotFullScreen_isGroupAlertSilenced_withStrictFlag() throws Exception {
- when(mFlags.fullScreenIntentRequiresKeyguard()).thenReturn(true);
- testShouldNotFullScreen_isGroupAlertSilenced();
- }
-
- @Test
public void testShouldNotFullScreen_isGroupAlertSilenced() throws RemoteException {
NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ true);
when(mPowerManager.isInteractive()).thenReturn(false);
@@ -656,12 +637,6 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {
}
@Test
- public void testShouldNotFullScreen_isSuppressedByBubbleMetadata_withStrictFlag() {
- when(mFlags.fullScreenIntentRequiresKeyguard()).thenReturn(true);
- testShouldNotFullScreen_isSuppressedByBubbleMetadata();
- }
-
- @Test
public void testShouldNotFullScreen_isSuppressedByBubbleMetadata() {
NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false);
Notification.BubbleMetadata bubbleMetadata = new Notification.BubbleMetadata.Builder("foo")
@@ -689,12 +664,6 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {
}
@Test
- public void testShouldFullScreen_notInteractive_withStrictFlag() throws Exception {
- when(mFlags.fullScreenIntentRequiresKeyguard()).thenReturn(true);
- testShouldFullScreen_notInteractive();
- }
-
- @Test
public void testShouldFullScreen_notInteractive() throws RemoteException {
NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false);
Notification.BubbleMetadata bubbleMetadata = new Notification.BubbleMetadata.Builder("foo")
@@ -714,12 +683,6 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {
}
@Test
- public void testShouldFullScreen_isDreaming_withStrictFlag() throws Exception {
- when(mFlags.fullScreenIntentRequiresKeyguard()).thenReturn(true);
- testShouldFullScreen_isDreaming();
- }
-
- @Test
public void testShouldFullScreen_isDreaming() throws RemoteException {
NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false);
when(mPowerManager.isInteractive()).thenReturn(true);
@@ -736,12 +699,6 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {
}
@Test
- public void testShouldFullScreen_onKeyguard_withStrictFlag() throws Exception {
- when(mFlags.fullScreenIntentRequiresKeyguard()).thenReturn(true);
- testShouldFullScreen_onKeyguard();
- }
-
- @Test
public void testShouldFullScreen_onKeyguard() throws RemoteException {
NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false);
when(mPowerManager.isInteractive()).thenReturn(true);
@@ -758,12 +715,6 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {
}
@Test
- public void testShouldNotFullScreen_willHun_withStrictFlag() throws Exception {
- when(mFlags.fullScreenIntentRequiresKeyguard()).thenReturn(true);
- testShouldNotFullScreen_willHun();
- }
-
- @Test
public void testShouldNotFullScreen_willHun() throws RemoteException {
NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false);
when(mPowerManager.isInteractive()).thenReturn(true);
@@ -781,26 +732,7 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {
}
@Test
- public void testShouldFullScreen_packageSnoozed() throws RemoteException {
- NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false);
- when(mPowerManager.isInteractive()).thenReturn(true);
- when(mPowerManager.isScreenOn()).thenReturn(true);
- when(mStatusBarStateController.isDreaming()).thenReturn(false);
- when(mStatusBarStateController.getState()).thenReturn(SHADE);
- when(mHeadsUpManager.isSnoozed("a")).thenReturn(true);
-
- assertThat(mNotifInterruptionStateProvider.getFullScreenIntentDecision(entry))
- .isEqualTo(FullScreenIntentDecision.FSI_EXPECTED_NOT_TO_HUN);
- assertThat(mNotifInterruptionStateProvider.shouldLaunchFullScreenIntentWhenAdded(entry))
- .isTrue();
- verify(mLogger, never()).logNoFullscreen(any(), any());
- verify(mLogger, never()).logNoFullscreenWarning(any(), any());
- verify(mLogger).logFullscreen(entry, "FSI_EXPECTED_NOT_TO_HUN");
- }
-
- @Test
- public void testShouldNotFullScreen_snoozed_occluding_withStrictRules() throws Exception {
- when(mFlags.fullScreenIntentRequiresKeyguard()).thenReturn(true);
+ public void testShouldNotFullScreen_snoozed_occluding() throws Exception {
NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false);
when(mPowerManager.isInteractive()).thenReturn(true);
when(mPowerManager.isScreenOn()).thenReturn(true);
@@ -820,8 +752,7 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {
}
@Test
- public void testShouldHeadsUp_snoozed_occluding_withStrictRules() throws Exception {
- when(mFlags.fullScreenIntentRequiresKeyguard()).thenReturn(true);
+ public void testShouldHeadsUp_snoozed_occluding() throws Exception {
NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false);
when(mPowerManager.isInteractive()).thenReturn(true);
when(mPowerManager.isScreenOn()).thenReturn(true);
@@ -845,8 +776,7 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {
}
@Test
- public void testShouldNotFullScreen_snoozed_lockedShade_withStrictRules() throws Exception {
- when(mFlags.fullScreenIntentRequiresKeyguard()).thenReturn(true);
+ public void testShouldNotFullScreen_snoozed_lockedShade() throws Exception {
NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false);
when(mPowerManager.isInteractive()).thenReturn(true);
when(mPowerManager.isScreenOn()).thenReturn(true);
@@ -866,8 +796,7 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {
}
@Test
- public void testShouldHeadsUp_snoozed_lockedShade_withStrictRules() throws Exception {
- when(mFlags.fullScreenIntentRequiresKeyguard()).thenReturn(true);
+ public void testShouldHeadsUp_snoozed_lockedShade() throws Exception {
NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false);
when(mPowerManager.isInteractive()).thenReturn(true);
when(mPowerManager.isScreenOn()).thenReturn(true);
@@ -891,8 +820,7 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {
}
@Test
- public void testShouldNotFullScreen_snoozed_unlocked_withStrictRules() throws Exception {
- when(mFlags.fullScreenIntentRequiresKeyguard()).thenReturn(true);
+ public void testShouldNotFullScreen_snoozed_unlocked() throws Exception {
NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false);
when(mPowerManager.isInteractive()).thenReturn(true);
when(mPowerManager.isScreenOn()).thenReturn(true);
@@ -955,8 +883,7 @@ public class NotificationInterruptStateProviderImplTest extends SysuiTestCase {
}
@Test
- public void testShouldHeadsUp_snoozed_unlocked_withStrictRules() throws Exception {
- when(mFlags.fullScreenIntentRequiresKeyguard()).thenReturn(true);
+ public void testShouldHeadsUp_snoozed_unlocked() throws Exception {
NotificationEntry entry = createFsiNotification(IMPORTANCE_HIGH, /* silenced */ false);
when(mPowerManager.isInteractive()).thenReturn(true);
when(mPowerManager.isScreenOn()).thenReturn(true);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowControllerTest.kt
index 60bc3a45c0dd..c2f1f61e8a5f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowControllerTest.kt
@@ -25,7 +25,6 @@ import com.android.internal.statusbar.IStatusBarService
import com.android.systemui.SysuiTestCase
import com.android.systemui.classifier.FalsingCollector
import com.android.systemui.flags.FeatureFlags
-import com.android.systemui.flags.Flags
import com.android.systemui.plugins.FalsingManager
import com.android.systemui.plugins.PluginManager
import com.android.systemui.plugins.statusbar.StatusBarStateController
@@ -145,8 +144,6 @@ class ExpandableNotificationRowControllerTest : SysuiTestCase() {
@Test
fun offerKeepInParent_parentDismissed() {
- whenever(featureFlags.isEnabled(Flags.NOTIFICATION_GROUP_DISMISSAL_ANIMATION))
- .thenReturn(true)
whenever(view.isParentDismissed).thenReturn(true)
Assert.assertTrue(controller.offerToKeepInParentForAnimation())
@@ -155,9 +152,6 @@ class ExpandableNotificationRowControllerTest : SysuiTestCase() {
@Test
fun offerKeepInParent_parentNotDismissed() {
- whenever(featureFlags.isEnabled(Flags.NOTIFICATION_GROUP_DISMISSAL_ANIMATION))
- .thenReturn(true)
-
Assert.assertFalse(controller.offerToKeepInParentForAnimation())
Mockito.verify(view, never()).setKeepInParentForDismissAnimation(anyBoolean())
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java
index 485f2be99642..45b1f4d898a6 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java
@@ -403,7 +403,6 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase {
@Test
public void testSetNotifStats_updatesHasFilteredOutSeenNotifications() {
- when(mNotifPipelineFlags.getShouldFilterUnseenNotifsOnKeyguard()).thenReturn(true);
mSeenNotificationsProvider.setHasFilteredOutSeenNotifications(true);
mController.attach(mNotificationStackScrollLayout);
mController.getNotifStackController().setNotifStats(NotifStats.getEmpty());
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
index fdd6140267cd..589c8bc93f3b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java
@@ -1205,34 +1205,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
}
@Test
- public void collapseShadeForBugReport_callsanimateCollapseShade_whenFlagDisabled() {
- // GIVEN the shade is expanded & flag enabled
- mCentralSurfaces.onShadeExpansionFullyChanged(true);
- mCentralSurfaces.setBarStateForTest(SHADE);
- mFeatureFlags.set(Flags.LEAVE_SHADE_OPEN_FOR_BUGREPORT, false);
-
- // WHEN collapseShadeForBugreport is called
- mCentralSurfaces.collapseShadeForBugreport();
-
- // VERIFY that animateCollapseShade is called
- verify(mShadeController).animateCollapseShade();
- }
-
- @Test
- public void collapseShadeForBugReport_doesNotCallanimateCollapseShade_whenFlagEnabled() {
- // GIVEN the shade is expanded & flag enabled
- mCentralSurfaces.onShadeExpansionFullyChanged(true);
- mCentralSurfaces.setBarStateForTest(SHADE);
- mFeatureFlags.set(Flags.LEAVE_SHADE_OPEN_FOR_BUGREPORT, true);
-
- // WHEN collapseShadeForBugreport is called
- mCentralSurfaces.collapseShadeForBugreport();
-
- // VERIFY that animateCollapseShade is called
- verify(mShadeController, never()).animateCollapseShade();
- }
-
- @Test
public void deviceStateChange_unfolded_shadeOpen_setsLeaveOpenOnKeyguardHide() {
setFoldedStates(FOLD_STATE_FOLDED);
setGoToSleepStates(FOLD_STATE_FOLDED);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java
index fea5363c0592..c16d14088bbe 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarNotificationPresenterTest.java
@@ -194,46 +194,7 @@ public class StatusBarNotificationPresenterTest extends SysuiTestCase {
}
@Test
- public void testNoSuppressHeadsUp_FSI_occludedKeygaurd() {
- when(mNotifPipelineFlags.fullScreenIntentRequiresKeyguard()).thenReturn(false);
- Notification n = new Notification.Builder(getContext(), "a")
- .setFullScreenIntent(mock(PendingIntent.class), true)
- .build();
- NotificationEntry entry = new NotificationEntryBuilder()
- .setPkg("a")
- .setOpPkg("a")
- .setTag("a")
- .setNotification(n)
- .build();
-
- when(mKeyguardStateController.isShowing()).thenReturn(true);
- when(mKeyguardStateController.isOccluded()).thenReturn(true);
- when(mCentralSurfaces.isOccluded()).thenReturn(true);
- assertFalse(mInterruptSuppressor.suppressAwakeHeadsUp(entry));
- }
-
- @Test
- public void testSuppressHeadsUp_FSI_nonOccludedKeygaurd() {
- when(mNotifPipelineFlags.fullScreenIntentRequiresKeyguard()).thenReturn(false);
- Notification n = new Notification.Builder(getContext(), "a")
- .setFullScreenIntent(mock(PendingIntent.class), true)
- .build();
- NotificationEntry entry = new NotificationEntryBuilder()
- .setPkg("a")
- .setOpPkg("a")
- .setTag("a")
- .setNotification(n)
- .build();
-
- when(mKeyguardStateController.isShowing()).thenReturn(true);
- when(mKeyguardStateController.isOccluded()).thenReturn(false);
- when(mCentralSurfaces.isOccluded()).thenReturn(false);
- assertTrue(mInterruptSuppressor.suppressAwakeHeadsUp(entry));
- }
-
- @Test
- public void testNoSuppressHeadsUp_FSI_nonOccludedKeygaurd_withNewFlag() {
- when(mNotifPipelineFlags.fullScreenIntentRequiresKeyguard()).thenReturn(true);
+ public void testNoSuppressHeadsUp_FSI_nonOccludedKeyguard() {
Notification n = new Notification.Builder(getContext(), "a")
.setFullScreenIntent(mock(PendingIntent.class), true)
.build();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputViewTest.java
index 391c8ca4d286..50bb0584aa4c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputViewTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/RemoteInputViewTest.java
@@ -70,8 +70,6 @@ import com.android.internal.logging.testing.UiEventLoggerFake;
import com.android.systemui.Dependency;
import com.android.systemui.R;
import com.android.systemui.SysuiTestCase;
-import com.android.systemui.flags.FakeFeatureFlags;
-import com.android.systemui.flags.Flags;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.RemoteInputController;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
@@ -453,17 +451,13 @@ public class RemoteInputViewTest extends SysuiTestCase {
private RemoteInputViewController bindController(
RemoteInputView view,
NotificationEntry entry) {
- FakeFeatureFlags fakeFeatureFlags = new FakeFeatureFlags();
- fakeFeatureFlags.set(Flags.NOTIFICATION_INLINE_REPLY_ANIMATION, true);
RemoteInputViewControllerImpl viewController = new RemoteInputViewControllerImpl(
view,
entry,
mRemoteInputQuickSettingsDisabler,
mController,
mShortcutManager,
- mUiEventLoggerFake,
- fakeFeatureFlags
- );
+ mUiEventLoggerFake);
viewController.bind();
return viewController;
}