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

Commit 8a8d6c51 authored by Rubin Xu's avatar Rubin Xu
Browse files

Update work challenge to align with material next

Re-land I6cca39d447e37310c287d1a0eb0468565e9fcd37 after it was reverted
due to CTS failure. The original commit made changes to existing styles
where are shared by other layouts hence causing issues. Fix by creating
new styles instead. Also explicitly set the orientation in the password
view's RelativeLayout, which isn't needed according to documentation but
helps fixing the UI layout issue for some reason.

Update the briefcase icon to be solid fill.

Bug: 191948779
Test: android.server.biometrics.BiometricActivityTests
Change-Id: I185ac28aff4478a4d251c2e5145e5f360131d274
parent 418ab688
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,6 +20,6 @@
        android:viewportWidth="24.0"
        android:viewportHeight="24.0">
    <path
        android:pathData="M20,6h-4L16,4c0,-1.11 -0.89,-2 -2,-2h-4c-1.11,0 -2,0.89 -2,2v2L4,6c-1.11,0 -1.99,0.89 -1.99,2L2,19c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,8c0,-1.11 -0.89,-2 -2,-2zM12,15c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM14,6h-4L10,4h4v2z"
        android:pathData="@*android:string/config_work_badge_path_24"
        android:fillColor="?android:attr/colorAccent"/>
</vector>
 No newline at end of file
+58 −50
Original line number Diff line number Diff line
@@ -18,64 +18,72 @@
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:gravity="center_horizontal"
    android:elevation="@dimen/biometric_dialog_elevation">
    android:elevation="@dimen/biometric_dialog_elevation"
    android:orientation="vertical">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

    <Space
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_weight="1"/>
        <LinearLayout
            android:id="@+id/auth_credential_header"
            style="@style/AuthCredentialHeaderStyle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true">

            <ImageView
                android:id="@+id/icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:contentDescription="@null" />

            <TextView
                android:id="@+id/title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        style="@style/TextAppearance.AuthCredential.Title"/>
                style="@style/TextAppearance.AuthNonBioCredential.Title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

            <TextView
                android:id="@+id/subtitle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        style="@style/TextAppearance.AuthCredential.Subtitle"/>
                style="@style/TextAppearance.AuthNonBioCredential.Subtitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

            <TextView
                android:id="@+id/description"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        style="@style/TextAppearance.AuthCredential.Description"/>
                style="@style/TextAppearance.AuthNonBioCredential.Description"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

    <Space
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_weight="1"/>
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:gravity="center"
            android:orientation="vertical"
            android:layout_alignParentBottom="true">

            <ImeAwareEditText
                android:id="@+id/lockPassword"
                style="@style/TextAppearance.AuthCredential.PasswordEntry"
                android:layout_width="208dp"
                android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:minHeight="48dp"
        android:gravity="center"
        android:inputType="textPassword"
        android:maxLength="500"
                android:layout_gravity="center"
                android:imeOptions="actionNext|flagNoFullscreen|flagForceAscii"
        style="@style/TextAppearance.AuthCredential.PasswordEntry"/>
                android:inputType="textPassword"
                android:minHeight="48dp" />

            <TextView
                android:id="@+id/error"
                style="@style/TextAppearance.AuthNonBioCredential.Error"
                android:layout_width="match_parent"
        android:layout_height="wrap_content"
        style="@style/TextAppearance.AuthCredential.Error"/>
                android:layout_height="wrap_content" />

        </LinearLayout>

    <Space
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_weight="5"/>
    </RelativeLayout>

</com.android.systemui.biometrics.AuthCredentialPasswordView>
 No newline at end of file
+65 −60
Original line number Diff line number Diff line
@@ -22,76 +22,81 @@
    android:gravity="center_horizontal"
    android:elevation="@dimen/biometric_dialog_elevation">

    <Space
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_weight="1"/>
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/auth_credential_header"
            style="@style/AuthCredentialHeaderStyle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <ImageView
                android:id="@+id/icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:contentDescription="@null" />

            <TextView
                android:id="@+id/title"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        style="@style/TextAppearance.AuthCredential.Title"/>
                style="@style/TextAppearance.AuthNonBioCredential.Title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

            <TextView
                android:id="@+id/subtitle"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        style="@style/TextAppearance.AuthCredential.Subtitle"/>
                style="@style/TextAppearance.AuthNonBioCredential.Subtitle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

            <TextView
                android:id="@+id/description"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        style="@style/TextAppearance.AuthCredential.Description"/>

    <Space
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_weight="1"/>
                style="@style/TextAppearance.AuthNonBioCredential.Description"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
        android:orientation="vertical"
            android:layout_below="@id/auth_credential_header"
            android:gravity="center"
        android:paddingLeft="0dp"
        android:paddingRight="0dp"
        android:paddingTop="0dp"
            android:orientation="vertical"
            android:paddingBottom="16dp"
        android:clipToPadding="false">
            android:paddingTop="60dp">

            <FrameLayout
                style="@style/LockPatternContainerStyle"
                android:layout_width="wrap_content"
                android:layout_height="0dp"
            android:layout_weight="1"
            style="@style/LockPatternContainerStyle">
                android:layout_weight="1">

                <com.android.internal.widget.LockPatternView
                    android:id="@+id/lockPattern"
                    style="@style/LockPatternStyle"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                android:layout_gravity="center"
                style="@style/LockPatternStyleBiometricPrompt"/>
                    android:layout_gravity="center" />

            </FrameLayout>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true">

            <TextView
                android:id="@+id/error"
                style="@style/TextAppearance.AuthNonBioCredential.Error"
                android:layout_width="match_parent"
            android:layout_height="wrap_content"
            style="@style/TextAppearance.AuthCredential.Error"/>
                android:layout_height="wrap_content" />

        </LinearLayout>

    <Space
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_weight="1"/>
    </RelativeLayout>

</com.android.systemui.biometrics.AuthCredentialPatternView>
 No newline at end of file
+46 −3
Original line number Diff line number Diff line
@@ -236,6 +236,41 @@
        <item name="android:textColor">?android:attr/colorError</item>
    </style>

    <style name="TextAppearance.AuthNonBioCredential"
        parent="@android:style/TextAppearance.DeviceDefault">
        <item name="android:accessibilityLiveRegion">polite</item>
        <item name="android:textAlignment">gravity</item>
        <item name="android:layout_gravity">top</item>
        <item name="android:textColor">?android:attr/textColorPrimary</item>
    </style>

    <style name="TextAppearance.AuthNonBioCredential.Title">
        <item name="android:fontFamily">google-sans</item>
        <item name="android:layout_marginTop">20dp</item>
        <item name="android:textSize">36sp</item>
    </style>

    <style name="TextAppearance.AuthNonBioCredential.Subtitle">
        <item name="android:fontFamily">google-sans</item>
        <item name="android:layout_marginTop">20dp</item>
        <item name="android:textSize">18sp</item>
    </style>

    <style name="TextAppearance.AuthNonBioCredential.Description">
        <item name="android:fontFamily">google-sans</item>
        <item name="android:layout_marginTop">20dp</item>
        <item name="android:textSize">16sp</item>
    </style>

    <style name="TextAppearance.AuthNonBioCredential.Error">
        <item name="android:paddingTop">6dp</item>
        <item name="android:paddingBottom">18dp</item>
        <item name="android:paddingHorizontal">24dp</item>
        <item name="android:textSize">14sp</item>
        <item name="android:textColor">?android:attr/colorError</item>
        <item name="android:gravity">center</item>
    </style>

    <style name="TextAppearance.AuthCredential.PasswordEntry" parent="@android:style/TextAppearance.DeviceDefault">
        <item name="android:gravity">center</item>
        <item name="android:singleLine">true</item>
@@ -243,6 +278,15 @@
        <item name="android:textSize">24sp</item>
    </style>

    <style name="AuthCredentialHeaderStyle">
        <item name="android:paddingStart">48dp</item>
        <item name="android:paddingEnd">24dp</item>
        <item name="android:paddingTop">28dp</item>
        <item name="android:paddingBottom">20dp</item>
        <item name="android:orientation">vertical</item>
        <item name="android:layout_gravity">top</item>
    </style>

    <style name="DeviceManagementDialogTitle">
        <item name="android:gravity">center</item>
        <item name="android:textAppearance">@style/TextAppearance.DeviceManagementDialog.Title</item>
@@ -307,9 +351,8 @@
        <item name="android:maxWidth">420dp</item>
        <item name="android:minHeight">0dp</item>
        <item name="android:minWidth">0dp</item>
        <item name="android:paddingBottom">0dp</item>
        <item name="android:paddingHorizontal">44dp</item>
        <item name="android:paddingTop">0dp</item>
        <item name="android:paddingHorizontal">60dp</item>
        <item name="android:paddingBottom">40dp</item>
    </style>

    <style name="LockPatternStyle">