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

Commit 4c45b0e0 authored by Brad Hinegardner's avatar Brad Hinegardner Committed by Automerger Merge Worker
Browse files

Merge "Now Playing is too low on the lock screen" into tm-qpr-dev am: 82d4e1f9

parents 0b5fe143 82d4e1f9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -762,7 +762,7 @@
    <dimen name="keyguard_lock_padding">20dp</dimen>
    <dimen name="keyguard_lock_padding">20dp</dimen>


    <dimen name="keyguard_indication_margin_bottom">32dp</dimen>
    <dimen name="keyguard_indication_margin_bottom">32dp</dimen>
    <dimen name="lock_icon_margin_bottom">110dp</dimen>
    <dimen name="lock_icon_margin_bottom">74dp</dimen>
    <dimen name="ambient_indication_margin_bottom">71dp</dimen>
    <dimen name="ambient_indication_margin_bottom">71dp</dimen>




+4 −0
Original line number Original line Diff line number Diff line
@@ -158,6 +158,10 @@ public class LockIconView extends FrameLayout implements Dumpable {
        return mLockIconCenter.y - mRadius;
        return mLockIconCenter.y - mRadius;
    }
    }


    float getLocationBottom() {
        return mLockIconCenter.y + mRadius;
    }

    /**
    /**
     * Updates the icon its default state where no visual is shown.
     * Updates the icon its default state where no visual is shown.
     */
     */
+4 −0
Original line number Original line Diff line number Diff line
@@ -280,6 +280,10 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
        return mView.getLocationTop();
        return mView.getLocationTop();
    }
    }


    public float getBottom() {
        return mView.getLocationBottom();
    }

    private void updateVisibility() {
    private void updateVisibility() {
        if (mCancelDelayedUpdateVisibilityRunnable != null) {
        if (mCancelDelayedUpdateVisibilityRunnable != null) {
            mCancelDelayedUpdateVisibilityRunnable.run();
            mCancelDelayedUpdateVisibilityRunnable.run();
+14 −5
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@


package com.android.systemui.keyguard.data.repository
package com.android.systemui.keyguard.data.repository


import com.android.keyguard.KeyguardUpdateMonitor
import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
import com.android.systemui.common.coroutine.ChannelExt.trySendWithFailureLogging
import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
import com.android.systemui.common.coroutine.ConflatedCallbackFlow.conflatedCallbackFlow
import com.android.systemui.common.shared.model.Position
import com.android.systemui.common.shared.model.Position
@@ -123,6 +124,11 @@ interface KeyguardRepository {
     * Sets the relative offset of the lock-screen clock from its natural position on the screen.
     * Sets the relative offset of the lock-screen clock from its natural position on the screen.
     */
     */
    fun setClockPosition(x: Int, y: Int)
    fun setClockPosition(x: Int, y: Int)

    /**
     * Returns whether the keyguard bottom area should be constrained to the top of the lock icon
     */
    fun isUdfpsSupported(): Boolean
}
}


/** Encapsulates application state for the keyguard. */
/** Encapsulates application state for the keyguard. */
@@ -131,10 +137,11 @@ class KeyguardRepositoryImpl
@Inject
@Inject
constructor(
constructor(
        statusBarStateController: StatusBarStateController,
        statusBarStateController: StatusBarStateController,
    private val keyguardStateController: KeyguardStateController,
        dozeHost: DozeHost,
        dozeHost: DozeHost,
        wakefulnessLifecycle: WakefulnessLifecycle,
        wakefulnessLifecycle: WakefulnessLifecycle,
        biometricUnlockController: BiometricUnlockController,
        biometricUnlockController: BiometricUnlockController,
        private val keyguardStateController: KeyguardStateController,
        private val keyguardUpdateMonitor: KeyguardUpdateMonitor,
) : KeyguardRepository {
) : KeyguardRepository {
    private val _animateBottomAreaDozingTransitions = MutableStateFlow(false)
    private val _animateBottomAreaDozingTransitions = MutableStateFlow(false)
    override val animateBottomAreaDozingTransitions =
    override val animateBottomAreaDozingTransitions =
@@ -311,6 +318,8 @@ constructor(
        _clockPosition.value = Position(x, y)
        _clockPosition.value = Position(x, y)
    }
    }


    override fun isUdfpsSupported(): Boolean = keyguardUpdateMonitor.isUdfpsSupported

    private fun statusBarStateIntToObject(value: Int): StatusBarState {
    private fun statusBarStateIntToObject(value: Int): StatusBarState {
        return when (value) {
        return when (value) {
            0 -> StatusBarState.SHADE
            0 -> StatusBarState.SHADE
+5 −0
Original line number Original line Diff line number Diff line
@@ -48,4 +48,9 @@ constructor(
    fun setAnimateDozingTransitions(animate: Boolean) {
    fun setAnimateDozingTransitions(animate: Boolean) {
        repository.setAnimateDozingTransitions(animate)
        repository.setAnimateDozingTransitions(animate)
    }
    }

    /**
     * Returns whether the keyguard bottom area should be constrained to the top of the lock icon
     */
    fun shouldConstrainToTopOfLockIcon(): Boolean = repository.isUdfpsSupported()
}
}
Loading