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

Commit e1dfc6f0 authored by Kevin Chyn's avatar Kevin Chyn Committed by Android (Google) Code Review
Browse files

Merge "Make operation-specific layouts, instead of passing in animations" into sc-dev

parents 2b76e792 42432f7b
Loading
Loading
Loading
Loading
+34 −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.
  -->
<com.android.systemui.biometrics.UdfpsAnimationViewEnroll
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/udfps_animation_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <!-- 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.UdfpsAnimationViewEnroll>
+3 −2
Original line number Diff line number Diff line
@@ -14,8 +14,9 @@
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<com.android.systemui.biometrics.UdfpsAnimationView
<com.android.systemui.biometrics.UdfpsAnimationViewFpmOther
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/udfps_animation_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>
    android:layout_height="match_parent">
</com.android.systemui.biometrics.UdfpsAnimationViewFpmOther>
+22 −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.
  -->
<com.android.systemui.biometrics.UdfpsAnimationViewKeyguard
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/udfps_animation_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
</com.android.systemui.biometrics.UdfpsAnimationViewKeyguard>
+3 −8
Original line number Diff line number Diff line
@@ -22,15 +22,10 @@
    android:layout_height="match_parent"
    systemui:sensorTouchAreaCoefficient="0.5">

    <!-- Enrollment progress bar-->
    <com.android.systemui.biometrics.UdfpsProgressBar
        android:id="@+id/progress_bar"
    <com.android.systemui.biometrics.UdfpsSurfaceView
        android:id="@+id/hbm_view"
        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"/>
        android:visibility="invisible"/>

</com.android.systemui.biometrics.UdfpsView>
+11 −1
Original line number Diff line number Diff line
@@ -31,11 +31,13 @@ import com.android.systemui.R;
 * sensor area.
 */
public abstract class UdfpsAnimation extends Drawable {
    abstract void updateColor();
    protected abstract void updateColor();
    protected abstract void onDestroy();

    @NonNull protected final Context mContext;
    @NonNull protected final Drawable mFingerprintDrawable;
    @Nullable private View mView;
    private boolean mIlluminationShowing;

    public UdfpsAnimation(@NonNull Context context) {
        mContext = context;
@@ -61,6 +63,14 @@ public abstract class UdfpsAnimation extends Drawable {
        mView = view;
    }

    boolean isIlluminationShowing() {
        return mIlluminationShowing;
    }

    void setIlluminationShowing(boolean showing) {
        mIlluminationShowing = showing;
    }

    /**
     * @return The amount of padding that's needed on each side of the sensor, in pixels.
     */
Loading