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

Commit aa92ffb1 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Dan Sandler
Browse files

Don't use layers when fading between public/private layout

Saves us some memory and more importantly, prevents layer trashing
and some skipped frames when building the layers.

Bug: 17287256
Bug: 16513124
Change-Id: Ief7c9a892da57bc77264de016f5118277e648f45
parent 5cbfe547
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -386,7 +386,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
        target.animate().cancel();
        source.animate()
                .alpha(0f)
                .withLayer()
                .setStartDelay(delay)
                .setDuration(duration)
                .withEndAction(new Runnable() {
@@ -397,7 +396,6 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
                });
        target.animate()
                .alpha(1f)
                .withLayer()
                .setStartDelay(delay)
                .setDuration(duration);
    }
+8 −0
Original line number Diff line number Diff line
@@ -243,6 +243,14 @@ public class NotificationContentView extends FrameLayout {
        }
    }

    @Override
    public boolean hasOverlappingRendering() {

        // This is not really true, but good enough when fading from the contracted to the expanded
        // layout, and saves us some layers.
        return false;
    }

    private static Paint createInvertPaint() {
        final Paint p = new Paint();
        final float[] invert = {