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

Commit d5688567 authored by Brad Hinegardner's avatar Brad Hinegardner Committed by Android (Google) Code Review
Browse files

Merge "Set shortcuts back to original position after shaking" into main

parents 721668de 151d4823
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -846,7 +846,7 @@
    <!-- Amount the button should shake when it's not long-pressed for long enough. -->
    <dimen name="keyguard_affordance_shake_amplitude">8dp</dimen>

    <dimen name="keyguard_affordance_horizontal_offset">32dp</dimen>
    <dimen name="keyguard_affordance_horizontal_offset">16dp</dimen>
    <dimen name="keyguard_affordance_vertical_offset">32dp</dimen>
    <!-- Value should be at least sum of 'keyguard_affordance_width' +
         'keyguard_affordance_horizontal_offset' -->
+4 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ import com.android.systemui.lifecycle.repeatWhenAttached
import com.android.systemui.plugins.ActivityStarter
import com.android.systemui.plugins.FalsingManager
import com.android.systemui.statusbar.VibratorHelper
import com.android.systemui.util.doOnEnd
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
@@ -402,6 +403,9 @@ object KeyguardBottomAreaViewBinder {
                        KeyguardBottomAreaVibrations.ShakeAnimationDuration.inWholeMilliseconds
                    shakeAnimator.interpolator =
                        CycleInterpolator(KeyguardBottomAreaVibrations.ShakeAnimationCycles)
                    shakeAnimator.doOnEnd {
                        view.translationX = 0f
                    }
                    shakeAnimator.start()

                    vibratorHelper?.vibrate(KeyguardBottomAreaVibrations.Shake)
+4 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ import com.android.systemui.keyguard.ui.viewmodel.KeyguardQuickAffordanceViewMod
import com.android.systemui.lifecycle.repeatWhenAttached
import com.android.systemui.plugins.FalsingManager
import com.android.systemui.statusbar.VibratorHelper
import com.android.systemui.util.doOnEnd
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.combine
@@ -240,6 +241,9 @@ object KeyguardQuickAffordanceViewBinder {
                        KeyguardBottomAreaVibrations.ShakeAnimationDuration.inWholeMilliseconds
                    shakeAnimator.interpolator =
                        CycleInterpolator(KeyguardBottomAreaVibrations.ShakeAnimationCycles)
                    shakeAnimator.doOnEnd {
                        view.translationX = 0f
                    }
                    shakeAnimator.start()

                    vibratorHelper?.vibrate(KeyguardBottomAreaVibrations.Shake)