Loading packages/SystemUI/res/drawable/udfps_progress_bar.xml 0 → 100644 +44 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2021 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. --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background"> <shape android:innerRadiusRatio="2.2" android:shape="ring" android:thickness="@dimen/udfps_enroll_progress_thickness" android:useLevel="false" android:tint="?android:colorControlNormal"> <solid android:color="@*android:color/white_disabled_material" /> </shape> </item> <item android:id="@android:id/progress"> <rotate android:fromDegrees="270" android:pivotX="50%" android:pivotY="50%" android:toDegrees="270"> <shape android:innerRadiusRatio="2.2" android:shape="ring" android:thickness="@dimen/udfps_enroll_progress_thickness" android:tint="?android:attr/colorControlActivated"> <solid android:color="@android:color/white" /> </shape> </rotate> </item> </layer-list> No newline at end of file packages/SystemUI/res/layout/udfps_view.xml +14 −1 Original line number Diff line number Diff line Loading @@ -20,4 +20,17 @@ android:id="@+id/udfps_view" android:layout_width="match_parent" android:layout_height="match_parent" systemui:sensorTouchAreaCoefficient="0.5"/> systemui:sensorTouchAreaCoefficient="0.5"> <!-- Enrollment progress bar--> <com.android.systemui.biometrics.UdfpsProgressBar android:id="@+id/progress_bar" android:layout_width="match_parent" android:layout_height="match_parent" android:max="100" android:padding="@dimen/udfps_enroll_progress_thickness" android:progress="0" android:layout_gravity="center" android:visibility="gone"/> </com.android.systemui.biometrics.UdfpsView> packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1117,6 +1117,9 @@ <!-- Y translation for credential contents when animating in --> <dimen name="biometric_dialog_credential_translation_offset">60dp</dimen> <!-- UDFPS enrollment progress bar thickness --> <dimen name="udfps_enroll_progress_thickness">12dp</dimen> <!-- Wireless Charging Animation values --> <dimen name="wireless_charging_dots_radius_start">0dp</dimen> <dimen name="wireless_charging_dots_radius_end">4dp</dimen> Loading packages/SystemUI/res/values/styles.xml +8 −0 Original line number Diff line number Diff line Loading @@ -765,4 +765,12 @@ <item name="android:textSize">14sp</item> <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item> </style> <style name="UdfpsProgressBarStyle" parent="android:style/Widget.Material.ProgressBar.Horizontal"> <item name="android:indeterminate">false</item> <item name="android:max">10000</item> <item name="android:mirrorForRtl">false</item> <item name="android:progressDrawable">@drawable/udfps_progress_bar</item> </style> </resources> packages/SystemUI/src/com/android/systemui/biometrics/UdfpsAnimationEnroll.java +3 −10 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ public class UdfpsAnimationEnroll extends UdfpsAnimation { private static final String TAG = "UdfpsAnimationEnroll"; private static final float SHADOW_RADIUS = 5.f; private static final float PROGRESS_BAR_RADIUS = 140.f; @Nullable private RectF mSensorRect; @NonNull private final Paint mSensorPaint; Loading Loading @@ -81,12 +82,12 @@ public class UdfpsAnimationEnroll extends UdfpsAnimation { @Override public int getPaddingX() { return (int) Math.ceil(SHADOW_RADIUS); return (int) Math.ceil(PROGRESS_BAR_RADIUS); } @Override public int getPaddingY() { return (int) Math.ceil(SHADOW_RADIUS); return (int) Math.ceil(PROGRESS_BAR_RADIUS); } @Override Loading @@ -104,12 +105,4 @@ public class UdfpsAnimationEnroll extends UdfpsAnimation { public int getOpacity() { return 0; } public void onEnrollmentProgress(int remaining) { Log.d(TAG, "Remaining: " + remaining); } public void onEnrollmentHelp() { Log.d(TAG, "onEnrollmentHelp"); } } Loading
packages/SystemUI/res/drawable/udfps_progress_bar.xml 0 → 100644 +44 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2021 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. --> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background"> <shape android:innerRadiusRatio="2.2" android:shape="ring" android:thickness="@dimen/udfps_enroll_progress_thickness" android:useLevel="false" android:tint="?android:colorControlNormal"> <solid android:color="@*android:color/white_disabled_material" /> </shape> </item> <item android:id="@android:id/progress"> <rotate android:fromDegrees="270" android:pivotX="50%" android:pivotY="50%" android:toDegrees="270"> <shape android:innerRadiusRatio="2.2" android:shape="ring" android:thickness="@dimen/udfps_enroll_progress_thickness" android:tint="?android:attr/colorControlActivated"> <solid android:color="@android:color/white" /> </shape> </rotate> </item> </layer-list> No newline at end of file
packages/SystemUI/res/layout/udfps_view.xml +14 −1 Original line number Diff line number Diff line Loading @@ -20,4 +20,17 @@ android:id="@+id/udfps_view" android:layout_width="match_parent" android:layout_height="match_parent" systemui:sensorTouchAreaCoefficient="0.5"/> systemui:sensorTouchAreaCoefficient="0.5"> <!-- Enrollment progress bar--> <com.android.systemui.biometrics.UdfpsProgressBar android:id="@+id/progress_bar" android:layout_width="match_parent" android:layout_height="match_parent" android:max="100" android:padding="@dimen/udfps_enroll_progress_thickness" android:progress="0" android:layout_gravity="center" android:visibility="gone"/> </com.android.systemui.biometrics.UdfpsView>
packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -1117,6 +1117,9 @@ <!-- Y translation for credential contents when animating in --> <dimen name="biometric_dialog_credential_translation_offset">60dp</dimen> <!-- UDFPS enrollment progress bar thickness --> <dimen name="udfps_enroll_progress_thickness">12dp</dimen> <!-- Wireless Charging Animation values --> <dimen name="wireless_charging_dots_radius_start">0dp</dimen> <dimen name="wireless_charging_dots_radius_end">4dp</dimen> Loading
packages/SystemUI/res/values/styles.xml +8 −0 Original line number Diff line number Diff line Loading @@ -765,4 +765,12 @@ <item name="android:textSize">14sp</item> <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item> </style> <style name="UdfpsProgressBarStyle" parent="android:style/Widget.Material.ProgressBar.Horizontal"> <item name="android:indeterminate">false</item> <item name="android:max">10000</item> <item name="android:mirrorForRtl">false</item> <item name="android:progressDrawable">@drawable/udfps_progress_bar</item> </style> </resources>
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsAnimationEnroll.java +3 −10 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ public class UdfpsAnimationEnroll extends UdfpsAnimation { private static final String TAG = "UdfpsAnimationEnroll"; private static final float SHADOW_RADIUS = 5.f; private static final float PROGRESS_BAR_RADIUS = 140.f; @Nullable private RectF mSensorRect; @NonNull private final Paint mSensorPaint; Loading Loading @@ -81,12 +82,12 @@ public class UdfpsAnimationEnroll extends UdfpsAnimation { @Override public int getPaddingX() { return (int) Math.ceil(SHADOW_RADIUS); return (int) Math.ceil(PROGRESS_BAR_RADIUS); } @Override public int getPaddingY() { return (int) Math.ceil(SHADOW_RADIUS); return (int) Math.ceil(PROGRESS_BAR_RADIUS); } @Override Loading @@ -104,12 +105,4 @@ public class UdfpsAnimationEnroll extends UdfpsAnimation { public int getOpacity() { return 0; } public void onEnrollmentProgress(int remaining) { Log.d(TAG, "Remaining: " + remaining); } public void onEnrollmentHelp() { Log.d(TAG, "onEnrollmentHelp"); } }