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

Commit 5c739de5 authored by Justin McClain's avatar Justin McClain
Browse files

Remote authenticator enrollment enrolling layout.

This flow will be included in Device Unlock settings with the
Fingerprint and Face Unlock.

Bug: b/293908453
Test: atest RemoteAuthEnrollEnrollingTest
Change-Id: I56c7fb2481ace359813c27e7538bec0baceffced
parent 3b56d1fc
Loading
Loading
Loading
Loading
+64 −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.
-->

<com.google.android.setupdesign.GlifLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/setup_wizard_layout"
    android:icon="@drawable/ic_lock"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:sucHeaderText="@string/security_settings_remoteauth_enroll_enrolling_title" >

    <LinearLayout
        style="@style/SudContentFrame"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:clipToPadding="false"
        android:clipChildren="false">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="@style/BiometricEnrollIntroTitle"
            android:text="@string/security_settings_remoteauth_enroll_enrolling_list_heading" />

        <ProgressBar
            android:id="@+id/enrolling_list_progress_bar"
            android:layout_width="@dimen/remoteauth_enrolling_progress_bar_size"
            android:layout_height="@dimen/remoteauth_enrolling_progress_bar_size"
            android:visibility="invisible"/>

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/discovered_authenticator_list"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <TextView
            style="@style/TextAppearance.ErrorText"
            android:id="@+id/error_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal|bottom"
            android:accessibilityLiveRegion="polite"
            android:gravity="center"
            android:visibility="invisible"/>

    </LinearLayout>

</com.google.android.setupdesign.GlifLayout>
 No newline at end of file
+52 −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.
-->

<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/authenticator_item_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginVertical="@dimen/remoteauth_enrolling_authenticator_vertical_margin"
    android:minHeight="@dimen/remoteauth_touchable_area_minimum_span">

    <TextView
        android:id="@+id/discovered_authenticator_name"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="@dimen/remoteauth_enrolling_authenticator_horizontal_margin"
        android:ellipsize="end"
        android:maxLines="1"
        app:layout_constrainedWidth="true"
        app:layout_constraintHorizontal_bias="0"
        app:layout_constraintHorizontal_chainStyle="spread_inside"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/authenticator_radio_button"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageView
        android:id="@+id/authenticator_radio_button"
        android:layout_width="@dimen/remoteauth_icon_small_size"
        android:layout_height="@dimen/remoteauth_icon_small_size"
        android:background="@drawable/ic_radio_button_unchecked_black_24dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toEndOf="@id/discovered_authenticator_name"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
 No newline at end of file
+3 −1
Original line number Diff line number Diff line
@@ -183,8 +183,10 @@
    <dimen name="remoteauth_carousel_progress_margin">28dp</dimen>
    <dimen name="remoteauth_carousel_progress_circle_diameter">8dp</dimen>
    <dimen name="remoteauth_carousel_progress_circle_margin">4dp</dimen>
    <dimen name="remoteauth_enrolling_authenticator_vertical_margin">12dp</dimen>
    <dimen name="remoteauth_enrolling_authenticator_horizontal_margin">16dp</dimen>
    <dimen name="remoteauth_enrolling_progress_bar_size">16dp</dimen>
    <dimen name="remoteauth_settings_top_margin">22dp</dimen>

    <dimen name="remoteauth_settings_device_horizontal_margin">16dp</dimen>


+9 −0
Original line number Diff line number Diff line
@@ -910,6 +910,15 @@
    <string name="security_settings_remoteauth_enroll_introduction_animation_tap_notification">Tap a notification</string>
    <!-- Subtitle for animation that explains users can unlock by swiping up on the lock screen [CHAR_LIMIT=NONE] -->
    <string name="security_settings_remoteauth_enroll_introduction_animation_swipe_up">Swipe up on the lock screen</string>
    <!-- Strings for RemoteAuth enroll enrolling page -->
    <!-- Title of the screen that allows users to choose from a list of available watches to enable the Watch Unlock feature [CHAR_LIMIT=45] -->
    <string name="security_settings_remoteauth_enroll_enrolling_title">Choose your watch</string>
    <!-- Heading text for the list of watches available for the Watch Unlock feature [CHAR_LIMIT=40] -->
    <string name="security_settings_remoteauth_enroll_enrolling_list_heading">Available watches</string>
    <!-- Button text to cancel enrollment [CHAR LIMIT=30] -->
    <string name="security_settings_remoteauth_enroll_enrolling_disagree">Cancel</string>
    <!-- Button text to start enrollment [CHAR LIMIT=30] -->
    <string name="security_settings_remoteauth_enroll_enrolling_agree">Confirm</string>
    <!-- Strings for RemoteAuth enroll finish page -->
    <!-- Title of the dialog that shows when a paired watch has been set up successfully and can be used to unlock the phone [CHAR_LIMIT=45] -->
    <string name="security_settings_remoteauth_enroll_finish_title">You\u2019re all set!</string>
+24 −0
Original line number Diff line number Diff line
/*
 * 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.
 */

package com.android.settings.remoteauth.enrolling

/** UI state of a single discovered authenticator. */
data class DiscoveredAuthenticatorUiState(
    val name: String,
    val isSelected: Boolean,
    val onSelect: () -> Unit,
)
 No newline at end of file
Loading