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

Commit bcc91cb6 authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz
Browse files

ENR: do not skip resetting content alpha when alpha is 0

setHideSensitive alpha optimization logic skips resetting alpha when
showingPublic is not changed. However, showingLayout's content alpha is 0 in some edge
cases and it is reset correctly. This causes an experience which
Notification content looks completely blank.

This CL checks the showing layout content alpha and if it is 0, reset
content alphas in order to make sure content is shown correctly.

Bug: 441279545
Test: Presubmit
Test: manual (unlock the device with face and see hide sensitive flow
works as is)
Flag: EXEMPT trivial change. It's a check on top of alpha optimization
to make sure the view has correct alpha.

Change-Id: I9f0413e39c6bf1c9a834fa4d857f15a231963455
parent 940d70b4
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -3648,8 +3648,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        final boolean shouldSkipHideSensitiveAnimation =
            mShowingPublic && isShowingLayoutNotChanged;
        if (!animated || shouldSkipHideSensitiveAnimation) {
            // In some edge cases, the showing layout's alpha might be 0. In these cases,
            // we need to reset content alpha!
            final NotificationContentView showingLayout = getShowingLayout();
            final boolean showingLayoutNeedsAlphaReset = showingLayout.getAlpha() == 0;
            if (!NotificationContentAlphaOptimization.isEnabled()
                    || mShowingPublic != oldShowingPublic) {
                    || mShowingPublic != oldShowingPublic || showingLayoutNeedsAlphaReset) {
                // Don't reset the alpha or cancel the animation if the showing layout doesn't
                // change
                mPublicLayout.animate().cancel();