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

Commit a96dad0a authored by Mill Chen's avatar Mill Chen
Browse files

Apply color extraction for Fingerprint enrollment

Bug: 183710937
Test: visual verified
1) Navigate to Settings > Security > Fingerprint unlock
2) Follow the flow to register a fingerprint
3) See and check if the icon is applied to the new color

Change-Id: Ia1119c9fb245e0e1ed8257416d2942368a45e9e1
parent 4e168dd6
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import static com.android.settings.Utils.SETTINGS_PACKAGE_NAME;

import android.annotation.Nullable;
import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Color;
import android.os.Bundle;
import android.os.UserHandle;
@@ -38,6 +37,7 @@ import com.google.android.setupcompat.template.FooterBarMixin;
import com.google.android.setupcompat.template.FooterButton;
import com.google.android.setupcompat.util.WizardManagerHelper;
import com.google.android.setupdesign.GlifLayout;
import com.google.android.setupdesign.util.ThemeHelper;

/**
 * Base activity for all biometric enrollment steps.
@@ -100,6 +100,8 @@ public abstract class BiometricEnrollBase extends InstrumentedActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setTheme(SetupWizardUtils.getTheme(this, getIntent()));
        ThemeHelper.trySetDynamicColor(this);
        mChallenge = getIntent().getLongExtra(EXTRA_KEY_CHALLENGE, -1L);
        mSensorId = getIntent().getIntExtra(EXTRA_KEY_SENSOR_ID, -1);
        // Don't need to retrieve the HAT if it already exists. In some cases, the extras do not
@@ -122,13 +124,6 @@ public abstract class BiometricEnrollBase extends InstrumentedActivity {
        mUserId = getIntent().getIntExtra(Intent.EXTRA_USER_ID, UserHandle.myUserId());
    }

    @Override
    protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) {
        final int new_resid = SetupWizardUtils.getTheme(this, getIntent());
        theme.applyStyle(R.style.SetupWizardPartnerResource, true);
        super.onApplyThemeResource(theme, new_resid, first);
    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);