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

Commit b4840814 authored by Jason Chang's avatar Jason Chang Committed by Android (Google) Code Review
Browse files

Merge "[DO NOT MERGE] Fix fingerprint enrollment finished Checkmark drawable...

Merge "[DO NOT MERGE] Fix fingerprint enrollment finished Checkmark drawable does not apply the correct theme color" into tm-qpr-dev
parents 1b4e2876 7cbf8ebb
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -26,10 +26,10 @@
        android:fillType="evenOdd"/>
        android:fillType="evenOdd"/>
    <path
    <path
        android:pathData="M27,0C12.088,0 0,12.088 0,27C0,41.912 12.088,54 27,54C41.912,54 54,41.912 54,27C54,12.088 41.912,0 27,0ZM27,3.962C39.703,3.962 50.037,14.297 50.037,27C50.037,39.703 39.703,50.038 27,50.038C14.297,50.038 3.963,39.703 3.963,27C3.963,14.297 14.297,3.962 27,3.962Z"
        android:pathData="M27,0C12.088,0 0,12.088 0,27C0,41.912 12.088,54 27,54C41.912,54 54,41.912 54,27C54,12.088 41.912,0 27,0ZM27,3.962C39.703,3.962 50.037,14.297 50.037,27C50.037,39.703 39.703,50.038 27,50.038C14.297,50.038 3.963,39.703 3.963,27C3.963,14.297 14.297,3.962 27,3.962Z"
        android:fillColor="?attr/biometricsEnrollProgress"
        android:fillColor="@color/udfps_enroll_progress"
        android:fillType="evenOdd"/>
        android:fillType="evenOdd"/>
    <path
    <path
        android:pathData="M23.0899,38.8534L10.4199,26.1824L13.2479,23.3544L23.0899,33.1974L41.2389,15.0474L44.0679,17.8754L23.0899,38.8534Z"
        android:pathData="M23.0899,38.8534L10.4199,26.1824L13.2479,23.3544L23.0899,33.1974L41.2389,15.0474L44.0679,17.8754L23.0899,38.8534Z"
        android:fillColor="?attr/biometricsEnrollProgress"
        android:fillColor="@color/udfps_enroll_progress"
        android:fillType="evenOdd"/>
        android:fillType="evenOdd"/>
</vector>
</vector>
+50 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2022 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.systemui.biometrics;

import static com.google.common.truth.Truth.assertThat;

import android.content.res.Configuration;
import android.graphics.Color;
import android.testing.AndroidTestingRunner;

import androidx.test.filters.SmallTest;

import com.android.systemui.R;
import com.android.systemui.SysuiTestCase;

import org.junit.Test;
import org.junit.runner.RunWith;

@SmallTest
@RunWith(AndroidTestingRunner.class)
public class UdfpsEnrollViewTest extends SysuiTestCase {

    private static String ENROLL_PROGRESS_COLOR_LIGHT = "#699FF3";
    private static String ENROLL_PROGRESS_COLOR_DARK = "#7DA7F1";

    @Test
    public void fingerprintUdfpsEnroll_usesCorrectThemeCheckmarkFillColor() {
        final Configuration config = mContext.getResources().getConfiguration();
        final boolean isDarkThemeOn = (config.uiMode & Configuration.UI_MODE_NIGHT_MASK)
                == Configuration.UI_MODE_NIGHT_YES;
        final int currentColor = mContext.getColor(R.color.udfps_enroll_progress);

        assertThat(currentColor).isEqualTo(Color.parseColor(isDarkThemeOn
                ? ENROLL_PROGRESS_COLOR_DARK : ENROLL_PROGRESS_COLOR_LIGHT));
    }
}