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

Commit aca32441 authored by Selim Cinek's avatar Selim Cinek
Browse files

Fading out keyguard only content instead of occluding them with the scrim

The scrim is also used on the lock screen and should therefore be
behind the keyguard elements. Instead, we now fade out the views
on top of the scrim to achieve the same visual effect.

This also fixed an issue where the inset on the scrim was wrong in landscape

Fixes: 188660106
Test: drag down on lockscreen, observe content fading out
Change-Id: I72e6b964dde5ad3c579a0db71d7914f3e47eab6c
parent ee4d86d0
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -64,18 +64,6 @@
        android:clipToPadding="false"
        android:clipChildren="false">

        <com.android.systemui.scrim.ScrimView
            android:id="@+id/scrim_notifications"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:importantForAccessibility="no"
            systemui:ignoreRightInset="true"
            systemui:layout_constraintStart_toStartOf="parent"
            systemui:layout_constraintEnd_toEndOf="parent"
            systemui:layout_constraintTop_toTopOf="parent"
            systemui:layout_constraintBottom_toBottomOf="parent"
        />

        <include
            layout="@layout/keyguard_status_view"
            android:visibility="gone"/>
+8 −0
Original line number Diff line number Diff line
@@ -51,6 +51,14 @@
        sysui:ignoreRightInset="true"
        />

    <com.android.systemui.scrim.ScrimView
        android:id="@+id/scrim_notifications"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:importantForAccessibility="no"
        sysui:ignoreRightInset="true"
        />

    <com.android.systemui.statusbar.LightRevealScrim
            android:id="@+id/light_reveal_scrim"
            android:layout_width="match_parent"
+5 −0
Original line number Diff line number Diff line
@@ -87,6 +87,11 @@ public class LockIconView extends ImageView {
        updateSensorRect(h, w);
    }

    @Override
    public boolean hasOverlappingRendering() {
        return false;
    }

    float getLocationTop() {
        return mLockIconCenter.y - mRadius;
    }
+7 −0
Original line number Diff line number Diff line
@@ -451,4 +451,11 @@ public class LockIconViewController extends ViewController<LockIconView> impleme

    private final AccessibilityManager.TouchExplorationStateChangeListener
            mTouchExplorationStateChangeListener = enabled -> updateClickListener();

    /**
     * Set the alpha of this view.
     */
    public void setAlpha(float alpha) {
        mView.setAlpha(alpha);
    }
}
+2 −0
Original line number Diff line number Diff line
@@ -287,6 +287,8 @@ class LockscreenShadeTransitionController @Inject constructor(
                    // TODO: appear media also in split shade
                    val mediaAmount = if (useSplitShade) 0f else field
                    mediaHierarchyManager.setTransitionToFullShadeAmount(mediaAmount)
                    // Fade out all content only visible on the lockscreen
                    notificationPanelController.setKeyguardOnlyContentAlpha(1.0f - scrimProgress)
                }
            }
        }
Loading