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

Commit f6586202 authored by Jeff DeCew's avatar Jeff DeCew Committed by Yining Liu
Browse files

Clean up UNCLEARED_TRANSIENT_VIEW_FIX and SWIPE_UNCLEARED_TRANSIENT_VIEW_FIX flags

Change-Id: Ief6aff53f596fd5ba6a635d3b3bc2a9803174946
Fixes: 297792660
Fixes: 298308067
Test: presubmit
Flag: LEGACY UNCLEARED_TRANSIENT_VIEW_FIX ENABLED
Flag: LEGACY SWIPE_UNCLEARED_TRANSIENT_VIEW_FIX ENABLED
parent b2d5ed95
Loading
Loading
Loading
Loading
+5 −11
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import static androidx.dynamicanimation.animation.DynamicAnimation.TRANSLATION_X
import static androidx.dynamicanimation.animation.FloatPropertyCompat.createFloatPropertyCompat;

import static com.android.systemui.classifier.Classifier.NOTIFICATION_DISMISS;
import static com.android.systemui.flags.Flags.SWIPE_UNCLEARED_TRANSIENT_VIEW_FIX;
import static com.android.systemui.statusbar.notification.NotificationUtils.logKey;

import android.animation.Animator;
@@ -481,16 +480,11 @@ public class SwipeHelper implements Gefingerpoken, Dumpable {
                updateSwipeProgressFromOffset(animView, canBeDismissed);
                mDismissPendingMap.remove(animView);
                boolean wasRemoved = false;
                if (animView instanceof ExpandableNotificationRow) {
                    ExpandableNotificationRow row = (ExpandableNotificationRow) animView;
                    if (mFeatureFlags.isEnabled(SWIPE_UNCLEARED_TRANSIENT_VIEW_FIX)) {
                if (animView instanceof ExpandableNotificationRow row) {
                    // If the view is already removed from its parent and added as Transient,
                    // we need to clean the transient view upon animation end
                    wasRemoved = row.getTransientContainer() != null
                        || row.getParent() == null || row.isRemoved();
                    } else {
                        wasRemoved = row.isRemoved();
                    }
                }
                if (!mCancelled || wasRemoved) {
                    mCallback.onChildDismissed(animView);
+0 −8
Original line number Diff line number Diff line
@@ -42,14 +42,6 @@ object Flags {
    @JvmField val NULL_FLAG = unreleasedFlag("null_flag")

    // 100 - notification
    // TODO(b/297792660): Tracking Bug
    @JvmField val UNCLEARED_TRANSIENT_HUN_FIX =
        releasedFlag("uncleared_transient_hun_fix")

    // TODO(b/298308067): Tracking Bug
    @JvmField val SWIPE_UNCLEARED_TRANSIENT_VIEW_FIX =
        releasedFlag("swipe_uncleared_transient_view_fix")

    // TODO(b/254512751): Tracking Bug
    val NOTIFICATION_PIPELINE_DEVELOPER_LOGGING =
        unreleasedFlag("notification_pipeline_developer_logging")
+9 −18
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import static com.android.internal.jank.InteractionJankMonitor.CUJ_NOTIFICATION_
import static com.android.internal.jank.InteractionJankMonitor.CUJ_SHADE_CLEAR_ALL;
import static com.android.systemui.Flags.newAodTransition;
import static com.android.systemui.Flags.notificationOverExpansionClippingFix;
import static com.android.systemui.flags.Flags.UNCLEARED_TRANSIENT_HUN_FIX;
import static com.android.systemui.statusbar.notification.stack.NotificationPriorityBucketKt.BUCKET_SILENT;
import static com.android.systemui.statusbar.notification.stack.StackStateAnimator.ANIMATION_DURATION_SWIPE;
import static com.android.systemui.util.DumpUtilsKt.println;
@@ -2816,7 +2815,6 @@ public class NotificationStackScrollLayout
            mAddedHeadsUpChildren.remove(child);
            return false;
        }
        if (mFeatureFlags.isEnabled(UNCLEARED_TRANSIENT_HUN_FIX)) {
        // Skip adding animation for clicked heads up notifications when the
        // Shade is closed, because the animation event is generated in
        // generateHeadsUpAnimationEvents. Only report that an animation was
@@ -2827,13 +2825,6 @@ public class NotificationStackScrollLayout
            mClearTransientViewsWhenFinished.add(child);
            return child.inRemovalAnimation();
        }
        } else {
            if (isClickedHeadsUp(child)) {
                // An animation is already running, add it transiently
                mClearTransientViewsWhenFinished.add(child);
                return true;
            }
        }
        if (mDebugRemoveAnimation) {
            Log.d(TAG, "generateRemove " + key
                    + "\nmIsExpanded " + mIsExpanded
+0 −1
Original line number Diff line number Diff line
@@ -171,7 +171,6 @@ public class NotificationStackScrollLayoutTest extends SysuiTestCase {
        //  and then we would test both configurations, but currently they are all read
        //  in the constructor.
        mSetFlagsRule.enableFlags(FLAG_NEW_AOD_TRANSITION);
        mFeatureFlags.setDefault(Flags.UNCLEARED_TRANSIENT_HUN_FIX);

        // Inject dependencies before initializing the layout
        mDependency.injectTestDependency(FeatureFlags.class, mFeatureFlags);