Merge "Apply color extraction for Fingerprint enrollment" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-05-19 03:19:56 +00:00
committed by Android (Google) Code Review

View File

@@ -20,7 +20,6 @@ import static com.android.settings.Utils.SETTINGS_PACKAGE_NAME;
import android.annotation.Nullable; import android.annotation.Nullable;
import android.content.Intent; import android.content.Intent;
import android.content.res.Resources;
import android.graphics.Color; import android.graphics.Color;
import android.os.Bundle; import android.os.Bundle;
import android.os.UserHandle; 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.template.FooterButton;
import com.google.android.setupcompat.util.WizardManagerHelper; import com.google.android.setupcompat.util.WizardManagerHelper;
import com.google.android.setupdesign.GlifLayout; import com.google.android.setupdesign.GlifLayout;
import com.google.android.setupdesign.util.ThemeHelper;
/** /**
* Base activity for all biometric enrollment steps. * Base activity for all biometric enrollment steps.
@@ -100,6 +100,8 @@ public abstract class BiometricEnrollBase extends InstrumentedActivity {
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setTheme(SetupWizardUtils.getTheme(this, getIntent()));
ThemeHelper.trySetDynamicColor(this);
mChallenge = getIntent().getLongExtra(EXTRA_KEY_CHALLENGE, -1L); mChallenge = getIntent().getLongExtra(EXTRA_KEY_CHALLENGE, -1L);
mSensorId = getIntent().getIntExtra(EXTRA_KEY_SENSOR_ID, -1); 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 // 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()); 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 @Override
protected void onSaveInstanceState(Bundle outState) { protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState); super.onSaveInstanceState(outState);