Merge "Update enroll to match mocks" into qt-dev
am: dbe4384909
Change-Id: Id5692eacf7cfcbdbaae484aaf578ef1852fab68f
This commit is contained in:
@@ -890,6 +890,8 @@
|
|||||||
<string name="security_settings_face_preference_title">Face authentication</string>
|
<string name="security_settings_face_preference_title">Face authentication</string>
|
||||||
<!-- Introduction title shown in face enrollment education screen [CHAR LIMIT=40] -->
|
<!-- Introduction title shown in face enrollment education screen [CHAR LIMIT=40] -->
|
||||||
<string name="security_settings_face_enroll_education_title">How to set up Face unlock</string>
|
<string name="security_settings_face_enroll_education_title">How to set up Face unlock</string>
|
||||||
|
<!-- Introduction title shown in face enrollment education screen for accessibility [CHAR LIMI=40]-->
|
||||||
|
<string name="security_settings_face_enroll_education_title_accessibility">Set up Face unlock</string>
|
||||||
<!-- Introduction title shown in face enrollment education screen to show the face authentication feature, when face unlock is disabled by device admin [CHAR LIMIT=60] -->
|
<!-- Introduction title shown in face enrollment education screen to show the face authentication feature, when face unlock is disabled by device admin [CHAR LIMIT=60] -->
|
||||||
<string name="security_settings_face_enroll_education_title_unlock_disabled">Use your face to authenticate</string>
|
<string name="security_settings_face_enroll_education_title_unlock_disabled">Use your face to authenticate</string>
|
||||||
<!-- Introduction detail message shown in face education [CHAR LIMIT=NONE] -->
|
<!-- Introduction detail message shown in face education [CHAR LIMIT=NONE] -->
|
||||||
|
@@ -33,6 +33,7 @@ import android.view.View;
|
|||||||
import android.view.accessibility.AccessibilityManager;
|
import android.view.accessibility.AccessibilityManager;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.android.settings.R;
|
import com.android.settings.R;
|
||||||
import com.android.settings.Utils;
|
import com.android.settings.Utils;
|
||||||
@@ -59,19 +60,28 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
|
|||||||
private View mIllustrationAccessibility;
|
private View mIllustrationAccessibility;
|
||||||
private Handler mHandler;
|
private Handler mHandler;
|
||||||
private Intent mResultIntent;
|
private Intent mResultIntent;
|
||||||
|
private TextView mDescriptionText;
|
||||||
|
|
||||||
private CompoundButton.OnCheckedChangeListener mSwitchDiversityListener =
|
private CompoundButton.OnCheckedChangeListener mSwitchDiversityListener =
|
||||||
new CompoundButton.OnCheckedChangeListener() {
|
new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||||
|
int titleRes = isChecked ?
|
||||||
|
R.string.security_settings_face_enroll_education_title_accessibility
|
||||||
|
: R.string.security_settings_face_enroll_education_title;
|
||||||
|
getLayout().setHeaderText(titleRes);
|
||||||
|
setTitle(titleRes);
|
||||||
|
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
mIllustrationNormal.stop();
|
mIllustrationNormal.stop();
|
||||||
mIllustrationNormal.setVisibility(View.INVISIBLE);
|
mIllustrationNormal.setVisibility(View.INVISIBLE);
|
||||||
mIllustrationAccessibility.setVisibility(View.VISIBLE);
|
mIllustrationAccessibility.setVisibility(View.VISIBLE);
|
||||||
|
mDescriptionText.setVisibility(View.INVISIBLE);
|
||||||
} else {
|
} else {
|
||||||
mIllustrationNormal.setVisibility(View.VISIBLE);
|
mIllustrationNormal.setVisibility(View.VISIBLE);
|
||||||
mIllustrationNormal.start();
|
mIllustrationNormal.start();
|
||||||
mIllustrationAccessibility.setVisibility(View.INVISIBLE);
|
mIllustrationAccessibility.setVisibility(View.INVISIBLE);
|
||||||
|
mDescriptionText.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -88,6 +98,7 @@ public class FaceEnrollEducation extends BiometricEnrollBase {
|
|||||||
|
|
||||||
mIllustrationNormal = findViewById(R.id.illustration_normal);
|
mIllustrationNormal = findViewById(R.id.illustration_normal);
|
||||||
mIllustrationAccessibility = findViewById(R.id.illustration_accessibility);
|
mIllustrationAccessibility = findViewById(R.id.illustration_accessibility);
|
||||||
|
mDescriptionText = findViewById(R.id.sud_layout_description);
|
||||||
|
|
||||||
mFooterBarMixin = getLayout().getMixin(FooterBarMixin.class);
|
mFooterBarMixin = getLayout().getMixin(FooterBarMixin.class);
|
||||||
mFooterBarMixin.setSecondaryButton(
|
mFooterBarMixin.setSecondaryButton(
|
||||||
|
Reference in New Issue
Block a user