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

Commit 4370dcfd authored by Beverly Tai's avatar Beverly Tai Committed by Android (Google) Code Review
Browse files

Merge "[1/N] Make alternateBouncer its own view" into main

parents e33c26e4 389556b9
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (C) 2023 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~
  -->

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:sysui="http://schemas.android.com/apk/res-auto"
    android:id="@+id/alternate_bouncer"
    android:focusable="true"
    android:clickable="true"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.android.systemui.scrim.ScrimView
        android:id="@+id/alternate_bouncer_scrim"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:importantForAccessibility="no"
        sysui:ignoreRightInset="true"
    />
</FrameLayout>
+5 −0
Original line number Diff line number Diff line
@@ -130,6 +130,11 @@
        android:inflatedId="@+id/multi_shade"
        android:layout="@layout/multi_shade" />

    <include layout="@layout/alternate_bouncer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="invisible" />

    <com.android.systemui.biometrics.AuthRippleView
        android:id="@+id/auth_ripple"
        android:layout_width="match_parent"
+6 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ import com.android.systemui.keyboard.PhysicalKeyboardCoreStartable
import com.android.systemui.keyguard.KeyguardViewConfigurator
import com.android.systemui.keyguard.KeyguardViewMediator
import com.android.systemui.keyguard.data.quickaffordance.MuteQuickAffordanceCoreStartable
import com.android.systemui.keyguard.ui.binder.AlternateBouncerBinder
import com.android.systemui.keyguard.ui.binder.KeyguardDismissActionBinder
import com.android.systemui.keyguard.ui.binder.KeyguardDismissBinder
import com.android.systemui.log.SessionTracker
@@ -92,6 +93,11 @@ abstract class SystemUICoreStartableModule {
    @ClassKey(AuthController::class)
    abstract fun bindAuthController(service: AuthController): CoreStartable

    @Binds
    @IntoMap
    @ClassKey(AlternateBouncerBinder::class)
    abstract fun bindAlternateBouncerBinder(impl: AlternateBouncerBinder): CoreStartable

    /** Inject into BiometricNotificationService */
    @Binds
    @IntoMap
+1 −1
Original line number Diff line number Diff line
@@ -326,7 +326,7 @@ object Flags {
    /** Flag to use a separate view for the alternate bouncer. */
    // TODO(b/300440924): Tracking bug
    @JvmField
    val ALTERNATE_BOUNCER_REFACTOR: UnreleasedFlag = unreleasedFlag("alternate_bouncer_view")
    val ALTERNATE_BOUNCER_VIEW: UnreleasedFlag = unreleasedFlag("alternate_bouncer_view")

    // 300 - power menu
    // TODO(b/254512600): Tracking Bug
+3 −2
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import javax.inject.Inject
import kotlin.time.Duration.Companion.milliseconds

@SysUISingleton
class FromAlternateBouncerTransitionInteractor
@@ -129,11 +130,11 @@ constructor(
    override fun getDefaultAnimatorForTransitionsToState(toState: KeyguardState): ValueAnimator {
        return ValueAnimator().apply {
            interpolator = Interpolators.LINEAR
            duration = TRANSITION_DURATION_MS
            duration = TRANSITION_DURATION_MS.inWholeMilliseconds
        }
    }

    companion object {
        private const val TRANSITION_DURATION_MS = 300L
        val TRANSITION_DURATION_MS = 300.milliseconds
    }
}
Loading