Merge changes from topic "unicorn-1" into sc-dev am: 0fcac8bf0d

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14972492

Change-Id: If0c6901245d3d99af5c16dd3f1304222f6fd1e82
This commit is contained in:
Joe Bolinger
2021-06-18 16:42:03 +00:00
committed by Automerger Merge Worker
8 changed files with 295 additions and 185 deletions

View File

@@ -76,10 +76,19 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
final ImageView iconGlasses = findViewById(R.id.icon_glasses);
final ImageView iconLooking = findViewById(R.id.icon_looking);
final ImageView iconSecurity = findViewById(R.id.icon_security);
iconGlasses.getBackground().setColorFilter(getIconColorFilter());
iconLooking.getBackground().setColorFilter(getIconColorFilter());
iconSecurity.getBackground().setColorFilter(getIconColorFilter());
final TextView infoMessageGlasses = findViewById(R.id.info_message_glasses);
final TextView infoMessageLooking = findViewById(R.id.info_message_looking);
final TextView howMessage = findViewById(R.id.how_message);
final TextView inControlTitle = findViewById(R.id.title_in_control);
final TextView inControlMessage = findViewById(R.id.message_in_control);
infoMessageGlasses.setText(getInfoMessageGlasses());
infoMessageLooking.setText(getInfoMessageLooking());
howMessage.setText(getHowMessage());
inControlTitle.setText(getInControlTitle());
inControlMessage.setText(getInControlMessage());
mFaceManager = Utils.getFaceManagerOrNull(this);
mFaceFeatureProvider = FeatureFactory.getFactory(getApplicationContext())
@@ -107,6 +116,31 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
return true;
}
@StringRes
protected int getInfoMessageGlasses() {
return R.string.security_settings_face_enroll_introduction_info_glasses;
}
@StringRes
protected int getInfoMessageLooking() {
return R.string.security_settings_face_enroll_introduction_info_looking;
}
@StringRes
protected int getHowMessage() {
return R.string.security_settings_face_enroll_introduction_how_message;
}
@StringRes
protected int getInControlTitle() {
return R.string.security_settings_face_enroll_introduction_control_title;
}
@StringRes
protected int getInControlMessage() {
return R.string.security_settings_face_enroll_introduction_control_message;
}
@Override
protected boolean isDisabledByAdmin() {
return RestrictedLockUtilsInternal.checkIfKeyguardFeaturesDisabled(

View File

@@ -19,9 +19,11 @@ package com.android.settings.biometrics.face;
import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FACE;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import com.android.settings.R;
@@ -32,6 +34,13 @@ import com.android.settings.R;
*/
public class FaceEnrollParentalConsent extends FaceEnrollIntroduction {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setDescriptionText(R.string.security_settings_face_enroll_introduction_consent_message);
}
@Override
protected void onNextButtonClick(View view) {
onConsentResult(true /* granted */);
@@ -60,6 +69,36 @@ public class FaceEnrollParentalConsent extends FaceEnrollIntroduction {
return false;
}
@Override
@StringRes
protected int getInfoMessageGlasses() {
return R.string.security_settings_face_enroll_introduction_info_consent_glasses;
}
@Override
@StringRes
protected int getInfoMessageLooking() {
return R.string.security_settings_face_enroll_introduction_info_consent_looking;
}
@Override
@StringRes
protected int getHowMessage() {
return R.string.security_settings_face_enroll_introduction_how_consent_message;
}
@Override
@StringRes
protected int getInControlTitle() {
return R.string.security_settings_face_enroll_introduction_control_consent_title;
}
@Override
@StringRes
protected int getInControlMessage() {
return R.string.security_settings_face_enroll_introduction_control_consent_message;
}
@Override
protected int getHeaderResDefault() {
return R.string.security_settings_face_enroll_consent_introduction_title;

View File

@@ -64,21 +64,62 @@ public class FingerprintEnrollIntroduction extends BiometricEnrollIntroduction {
super.onCreate(savedInstanceState);
final ImageView iconFingerprint = findViewById(R.id.icon_fingerprint);
final ImageView iconLocked = findViewById(R.id.icon_locked);
final ImageView iconDelete = findViewById(R.id.icon_delete);
final ImageView iconInfo = findViewById(R.id.icon_info);
final ImageView iconLink = findViewById(R.id.icon_link);
iconFingerprint.getDrawable().setColorFilter(getIconColorFilter());
iconLocked.getDrawable().setColorFilter(getIconColorFilter());
iconDelete.getDrawable().setColorFilter(getIconColorFilter());
iconInfo.getDrawable().setColorFilter(getIconColorFilter());
iconLink.getDrawable().setColorFilter(getIconColorFilter());
final TextView footerMessage2 = findViewById(R.id.footer_message_2);
final TextView footerMessage3 = findViewById(R.id.footer_message_3);
final TextView footerMessage4 = findViewById(R.id.footer_message_4);
final TextView footerMessage5 = findViewById(R.id.footer_message_5);
footerMessage2.setText(getFooterMessage2());
footerMessage3.setText(getFooterMessage3());
footerMessage4.setText(getFooterMessage4());
footerMessage5.setText(getFooterMessage5());
final TextView footerTitle1 = findViewById(R.id.footer_title_1);
final TextView footerTitle2 = findViewById(R.id.footer_title_2);
footerTitle1.setText(getFooterTitle1());
footerTitle2.setText(getFooterTitle2());
}
@StringRes
int getNegativeButtonTextId() {
return R.string.security_settings_fingerprint_enroll_introduction_skip;
}
@StringRes
protected int getFooterTitle1() {
return R.string.security_settings_fingerprint_enroll_introduction_footer_title_1;
}
@StringRes
protected int getFooterTitle2() {
return R.string.security_settings_fingerprint_enroll_introduction_footer_title_2;
}
@StringRes
protected int getFooterMessage2() {
return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_2;
}
@StringRes
protected int getFooterMessage3() {
return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_3;
}
@StringRes
protected int getFooterMessage4() {
return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_4;
}
@StringRes
protected int getFooterMessage5() {
return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_5;
}
@Override
protected boolean isDisabledByAdmin() {
return RestrictedLockUtilsInternal.checkIfKeyguardFeaturesDisabled(

View File

@@ -19,9 +19,11 @@ package com.android.settings.biometrics.fingerprint;
import static android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import com.android.settings.R;
@@ -32,6 +34,14 @@ import com.android.settings.R;
*/
public class FingerprintEnrollParentalConsent extends FingerprintEnrollIntroduction {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setDescriptionText(
R.string.security_settings_fingerprint_enroll_introduction_consent_message);
}
@Override
protected void onNextButtonClick(View view) {
onConsentResult(true /* granted */);
@@ -55,6 +65,34 @@ public class FingerprintEnrollParentalConsent extends FingerprintEnrollIntroduct
return true;
}
@StringRes
@Override
protected int getFooterTitle1() {
return R.string.security_settings_fingerprint_enroll_introduction_footer_title_consent_1;
}
@StringRes
@Override
protected int getFooterMessage2() {
return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_consent_2;
}
@StringRes
@Override
protected int getFooterMessage3() {
return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_consent_3;
}
@StringRes
protected int getFooterMessage4() {
return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_consent_4;
}
@StringRes
protected int getFooterMessage5() {
return R.string.security_settings_fingerprint_v2_enroll_introduction_footer_message_consent_5;
}
@Override
protected int getHeaderResDefault() {
return R.string.security_settings_fingerprint_enroll_consent_introduction_title;