Add mechanism for vendor-specific enrollment
Bug: 111548033 Test: Builds Change-Id: I1b87d40a584ea21c3de50651f880ce94ed7d40d7
This commit is contained in:
@@ -168,4 +168,7 @@
|
|||||||
|
|
||||||
<!-- Uri that represents extra bluetooth settings -->
|
<!-- Uri that represents extra bluetooth settings -->
|
||||||
<string name="config_bluetooth_device_settings_uri" translatable="false">content://com.google.android.gms.nearby.fastpair/settings_slice?addr=<xliff:g id="mac_address">%1$s</xliff:g></string>
|
<string name="config_bluetooth_device_settings_uri" translatable="false">content://com.google.android.gms.nearby.fastpair/settings_slice?addr=<xliff:g id="mac_address">%1$s</xliff:g></string>
|
||||||
|
|
||||||
|
<!-- ComponentName to launch a vendor-specific enrollment activity if available -->
|
||||||
|
<string name="config_face_enroll" translatable="false"></string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@@ -17,9 +17,11 @@
|
|||||||
package com.android.settings.biometrics.face;
|
package com.android.settings.biometrics.face;
|
||||||
|
|
||||||
import android.app.admin.DevicePolicyManager;
|
import android.app.admin.DevicePolicyManager;
|
||||||
|
import android.content.ComponentName;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.hardware.face.FaceManager;
|
import android.hardware.face.FaceManager;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
@@ -156,7 +158,15 @@ public class FaceEnrollIntroduction extends BiometricEnrollIntroduction {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Intent getEnrollingIntent() {
|
protected Intent getEnrollingIntent() {
|
||||||
final Intent intent = new Intent(this, FaceEnrollEnrolling.class);
|
final String flattenedString = getString(R.string.config_face_enroll);
|
||||||
|
final Intent intent = new Intent();
|
||||||
|
if (!TextUtils.isEmpty(flattenedString)) {
|
||||||
|
ComponentName componentName = ComponentName.unflattenFromString(flattenedString);
|
||||||
|
intent.setComponent(componentName);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
intent.setClass(this, FaceEnrollEnrolling.class);
|
||||||
|
}
|
||||||
intent.putExtra(EXTRA_KEY_REQUIRE_VISION, mSwitchVision.isChecked());
|
intent.putExtra(EXTRA_KEY_REQUIRE_VISION, mSwitchVision.isChecked());
|
||||||
intent.putExtra(EXTRA_KEY_REQUIRE_DIVERSITY, mSwitchDiversity.isChecked());
|
intent.putExtra(EXTRA_KEY_REQUIRE_DIVERSITY, mSwitchDiversity.isChecked());
|
||||||
return intent;
|
return intent;
|
||||||
|
Reference in New Issue
Block a user