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

Commit 3b56d1fc authored by Justin McClain's avatar Justin McClain Committed by Android (Google) Code Review
Browse files

Merge "Remote authenticator settings layout." into main

parents bab62119 a6325eac
Loading
Loading
Loading
Loading
+25 −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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="960"
        android:viewportHeight="960"
        android:tint="?attr/colorControlNormal">
    <path
        android:fillColor="@android:color/white"
        android:pathData="m360,880 l-54,-182q-48,-38 -77,-95t-29,-123q0,-66 29,-123t77,-95l54,-182h240l54,182q48,38 77,95t29,123q0,66 -29,123t-77,95L600,880L360,880ZM480,680q83,0 141.5,-58.5T680,480q0,-83 -58.5,-141.5T480,280q-83,0 -141.5,58.5T280,480q0,83 58.5,141.5T480,680Z"/>
</vector>
+95 −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:layout_width="match_parent"
    android:layout_height="match_parent"
    app:sucUsePartnerResource="false"
    app:sucHeaderText="@string/security_settings_remoteauth_settings_title"
    app:sudDescriptionText="@string/security_settings_remoteauth_settings_description" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:gravity="start"
        android:paddingHorizontal="@dimen/remoteauth_padding_horizontal">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/registered_authenticator_list"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/remoteauth_settings_top_margin"/>

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/add_authenticator_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginVertical="@dimen/remoteauth_device_vertical_margin"
            android:minHeight="@dimen/remoteauth_touchable_area_minimum_span"
            android:clickable="true">

            <ImageView
                android:id="@+id/add_icon"
                android:layout_width="@dimen/remoteauth_icon_small_size"
                android:layout_height="@dimen/remoteauth_icon_small_size"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                android:background="@drawable/ic_add_24dp"
                android:clickable="false" />
            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="@dimen/remoteauth_settings_device_horizontal_margin"
                android:textColor="?android:attr/textColorPrimary"
                android:textSize="@dimen/remoteauth_device_name_text_size"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toEndOf="@id/add_icon"
                app:layout_constraintTop_toTopOf="parent"
                android:text="@string/security_settings_remoteauth_settings_register_new_authenticator"
                android:clickable="false" />
        </androidx.constraintlayout.widget.ConstraintLayout>

        <ImageView
            android:layout_marginTop="@dimen/remoteauth_settings_top_margin"
            android:layout_width="@dimen/remoteauth_icon_small_size"
            android:layout_height="@dimen/remoteauth_icon_small_size"
            android:background="@drawable/ic_info_outline_24dp"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/remoteauth_settings_top_margin"
            android:textSize="@dimen/remoteauth_fragment_subtitle_text_size"
            android:text="@string/security_settings_remoteauth_settings_info_footer"
            android:textColor="?android:attr/textColorPrimary" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/remoteauth_settings_top_margin"
            android:textSize="@dimen/remoteauth_fragment_subtitle_text_size"
            android:text="@string/security_settings_remoteauth_settings_learn_more"
            android:textColor="?android:attr/textColorPrimary" />

    </LinearLayout>

</com.google.android.setupdesign.GlifLayout>
 No newline at end of file
+68 −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_device_vertical_margin"
    android:minHeight="@dimen/remoteauth_touchable_area_minimum_span">

    <ImageView
        android:id="@+id/device_icon"
        android:layout_width="@dimen/remoteauth_icon_small_size"
        android:layout_height="@dimen/remoteauth_icon_small_size"
        android:background="@drawable/ic_watch_24dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>

    <TextView
        android:id="@+id/authenticator_name_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginHorizontal="@dimen/remoteauth_settings_device_horizontal_margin"
        android:ellipsize="end"
        android:maxLines="1"
        app:layout_constrainedWidth="true"
        app:layout_constraintHorizontal_bias="0"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/barrier"
        app:layout_constraintStart_toEndOf="@id/device_icon"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageView
        android:id="@+id/remove_icon"
        android:layout_width="@dimen/remoteauth_icon_small_size"
        android:layout_height="@dimen/remoteauth_icon_small_size"
        android:tint="?android:attr/colorPrimary"
        android:background="@drawable/ic_delete"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:contentDescription="@string/security_settings_remoteauth_settings_remove_device" />

    <androidx.constraintlayout.widget.Barrier
        android:id="@+id/barrier"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:barrierDirection="start"
        app:constraint_referenced_ids="remove_icon" />

</androidx.constraintlayout.widget.ConstraintLayout>
 No newline at end of file
+7 −0
Original line number Diff line number Diff line
@@ -171,14 +171,21 @@

    <!-- RemoteAuth-->
    <dimen name="remoteauth_fragment_padding_horizontal">40dp</dimen>
    <dimen name="remoteauth_fragment_subtitle_text_size">14sp</dimen>
    <dimen name="remoteauth_icon_small_size">24dp</dimen>
    <dimen name="remoteauth_touchable_area_minimum_span">48dp</dimen>
    <dimen name="remoteauth_padding_horizontal">24dp</dimen>
    <dimen name="remoteauth_device_name_text_size">20sp</dimen>
    <dimen name="remoteauth_device_vertical_margin">12dp</dimen>
    <dimen name="remoteauth_introduction_fragment_padding_horizontal">30dp</dimen>
    <dimen name="remoteauth_introduction_description_start_margin">8dp</dimen>
    <dimen name="remoteauth_introduction_subheading_text_size">18sp</dimen>
    <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_settings_top_margin">22dp</dimen>

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


    <!-- Lock pattern view size, align sysui biometric_auth_pattern_view_size -->
+13 −0
Original line number Diff line number Diff line
@@ -917,6 +917,19 @@
    <string name="security_settings_remoteauth_enroll_finish_description">You can now use your watch to unlock this phone when you swipe up on the lock screen or tap a notification</string>
    <!-- Button text to finish enrollment [CHAR LIMIT=30] -->
    <string name="security_settings_remoteauth_enroll_finish_btn_next">Done</string>
    <!-- Strings for RemoteAuth settings page-->
    <!-- Title for remote authenticator settings page [CHAR_LIMIT=NONE]-->
    <string name="security_settings_remoteauth_settings_title">Watch Unlock</string>
    <!-- Explains when a watch can be used to unlock the phone [CHAR_LIMIT=NONE] -->
    <string name="security_settings_remoteauth_settings_description">You can use your watch to unlock this phone when you swipe up on the lock screen or tap a notification</string>
    <!-- Explains how to enable the Watch Unlock feature on a watch [CHAR_LIMIT=NONE] -->
    <string name="security_settings_remoteauth_settings_info_footer">To use Watch Unlock, your watch must be unlocked, on your wrist, within reach, and connected to this phone. If the connection is interrupted, you\u2019ll need to unlock the phone before you can use Watch Unlock.\n\nKeep in mind:\nYou can only have one watch set up at a time. To add another watch, first remove the current one.</string>
    <!-- Links to the Watch Unlock help center article [CHAR_LIMIT=NONE] -->
    <string name="security_settings_remoteauth_settings_learn_more">Learn more about Watch Unlock</string>
    <!-- Button text to add new watch [CHAR_LIMIT=NONE] -->
    <string name="security_settings_remoteauth_settings_register_new_authenticator">Add watch</string>
    <!-- Accessibility label of a button that lets users remove enrolled watches from Watch Unlock settings [CHAR_LIMIT=NONE] -->
    <string name="security_settings_remoteauth_settings_remove_device">Remove watch</string>
    <!-- Biometric settings --><skip />
    <!-- Title shown for menu item that launches biometric settings. [CHAR LIMIT=66] -->
Loading