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

Commit 12c81191 authored by Austin Delgado's avatar Austin Delgado
Browse files

Credential view fallback options

Adds a fallback button to the credential screens in biometric prompt

Test: atest SystemUITests:com.android.systemui.biometrics
Bug: 391410353
Flag: android.hardware.biometrics.bp_fallback_options

Change-Id: Icb38aeef8a0d23f3e2f2daf23009606261c532be
parent 5891a5d4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ import com.android.systemui.biometrics.data.repository.FakePromptRepository
import com.android.systemui.biometrics.domain.interactor.CredentialStatus
import com.android.systemui.biometrics.domain.interactor.FakeCredentialInteractor
import com.android.systemui.biometrics.domain.interactor.PromptCredentialInteractor
import com.android.systemui.biometrics.domain.interactor.promptSelectorInteractor
import com.android.systemui.biometrics.promptInfo
import com.android.systemui.biometrics.shared.model.PromptKind
import com.android.systemui.shade.domain.interactor.shadeInteractor
@@ -45,6 +46,7 @@ class CredentialViewModelTest : SysuiTestCase() {
                mContext,
                PromptCredentialInteractor(dispatcher, promptRepository, credentialInteractor),
                kosmos.shadeInteractor,
                kosmos.promptSelectorInteractor,
            )
    }

+23 −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.
  -->
<inset xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
    <shape android:shape="rectangle">
        <corners android:radius="25dp"/>
        <solid android:color="@androidprv:color/materialColorSecondaryContainer" />
    </shape>
</inset>
+7 −0
Original line number Diff line number Diff line
@@ -62,6 +62,13 @@
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <Button
        android:id="@+id/fallback_button"
        style="@style/AuthNonBioCredentialFallbackButtonStyle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/description"
        android:visibility="gone" />
  </RelativeLayout>

  <FrameLayout
+8 −0
Original line number Diff line number Diff line
@@ -69,6 +69,14 @@
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <Button
            android:id="@+id/fallback_button"
            style="@style/AuthNonBioCredentialFallbackButtonStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/description"
            android:visibility="gone" />

        <TextView
            android:id="@+id/error"
            style="?errorTextAppearanceLand"
+8 −0
Original line number Diff line number Diff line
@@ -62,6 +62,14 @@
          android:layout_below="@id/subtitle"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" />

      <Button
          android:id="@+id/fallback_button"
          style="@style/AuthNonBioCredentialFallbackButtonStyle"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@id/description"
          android:visibility="gone" />
    </RelativeLayout>

  </ScrollView>
Loading