Skip to content

Commit b06b6bb

Browse files
jhenrique09Rpingat
authored andcommitted
[2/2] Allow using face as auth method for apps
Change-Id: Ib259d1f020f9ac29a9d85ae7edba55a2b2daa101
1 parent 07f23a5 commit b06b6bb

4 files changed

Lines changed: 6 additions & 26 deletions

File tree

res/values/wave_strings.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,7 @@
319319
<string name="anbi_title">Accidental touch</string>
320320
<string name="anbi_summary">Prevent interaction with navigation buttons while the screen is being touched</string>
321321

322-
<string name="security_settings_face_settings_footer_custom">Face unlock lets you unlock your device by looking at it. Keep in mind:\n\n▒^w^o Your device may unlock any time you look at it.\n▒^w^o Your dev>
323-
<string name="security_settings_face_settings_remove_dialog_details_custom">Data recorded by face unlock will be permanently and securely deleted. After removal, you will need your PIN, pattern, or passwor>
322+
<!-- Face Unlock -->
324323
<string name="security_settings_face_unlock_redo_face_scan_summary">Remove existing face scan and create a new scan</string>
325324
<string name="security_settings_face_unlock_redo_face_scan_title">Redo face scan</string>
326325
<string name="security_dashboard_summary_face_and_fingerprint">Screen lock, fingerprint, face unlock</string>

src/com/android/settings/biometrics/face/FaceSettingsAppPreferenceController.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626

2727
import com.android.settings.Utils;
2828

29-
import com.android.settings.custom.biometrics.FaceUtils;
30-
3129
/**
3230
* Preference controller for Face settings page controlling the ability to use
3331
* Face authentication in apps (through BiometricPrompt).
@@ -80,10 +78,6 @@ public void updateState(Preference preference) {
8078

8179
@Override
8280
public int getAvailabilityStatus() {
83-
if (FaceUtils.isFaceUnlockSupported()){
84-
return UNSUPPORTED_ON_DEVICE;
85-
}
86-
8781
if(mFaceManager == null){
8882
return AVAILABLE_UNSEARCHABLE;
8983
}

src/com/android/settings/biometrics/face/FaceSettingsFooterPreferenceController.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
import com.android.settingslib.HelpUtils;
2929
import com.android.settingslib.widget.FooterPreference;
3030

31-
import com.android.settings.custom.biometrics.FaceUtils;
32-
3331
/**
3432
* Footer for face settings showing the help text and help link.
3533
*/
@@ -62,14 +60,10 @@ public void updateState(Preference preference) {
6260
final AnnotationSpan.LinkInfo linkInfo =
6361
new AnnotationSpan.LinkInfo(mContext, ANNOTATION_URL, helpIntent);
6462

65-
final int footerRes;
66-
if (FaceUtils.isFaceUnlockSupported()) {
67-
footerRes = R.string.security_settings_face_settings_footer_custom;
68-
} else if (mProvider.isAttentionSupported(mContext)) {
69-
footerRes = R.string.security_settings_face_settings_footer;
70-
} else {
71-
footerRes = R.string.security_settings_face_settings_footer_attention_not_supported;
72-
}
63+
final int footerRes = mProvider.isAttentionSupported(mContext)
64+
? R.string.security_settings_face_settings_footer
65+
: R.string.security_settings_face_settings_footer_attention_not_supported;
66+
7367
preference.setTitle(AnnotationSpan.linkify(
7468
mContext.getText(footerRes), linkInfo));
7569
}

src/com/android/settings/biometrics/face/FaceSettingsRemoveButtonPreferenceController.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939

4040
import java.util.List;
4141

42-
import com.android.settings.custom.biometrics.FaceUtils;
43-
4442
/**
4543
* Controller for the remove button. This assumes that there is only a single face enrolled. The UI
4644
* will likely change if multiple enrollments are allowed/supported.
@@ -64,13 +62,8 @@ public int getMetricsCategory() {
6462
public Dialog onCreateDialog(Bundle savedInstanceState) {
6563
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
6664

67-
int dialogMessage = R.string.security_settings_face_settings_remove_dialog_details;
68-
if (FaceUtils.isFaceUnlockSupported()) {
69-
dialogMessage = R.string.security_settings_face_settings_remove_dialog_details_custom;
70-
}
71-
7265
builder.setTitle(R.string.security_settings_face_settings_remove_dialog_title)
73-
.setMessage(dialogMessage)
66+
.setMessage(R.string.security_settings_face_settings_remove_dialog_details)
7467
.setPositiveButton(R.string.delete, mOnClickListener)
7568
.setNegativeButton(R.string.cancel, mOnClickListener);
7669
AlertDialog dialog = builder.create();

0 commit comments

Comments
 (0)