[Biometric Onboarding & Edu] Update face settings page

- Added a feature provider for face settings page in FaceFeatureProvider
  for customization
- When face is deleted, disabled the settings buttons instead of hiding
  them.
- Updated new UX style for add/remove face button.

Bug: 370940762
Test: atest FaceSettingsEnrollButtonPreferenceControllerTest
            FaceSettingsFooterPreferenceControllerTest
Test: manual - 1. Enroll face
               2. Go Face Settings page and remove face
	       3. Enroll face again
Flag: com.android.settings.flags.biometrics_onboarding_education

Change-Id: I490e647523eeff2dd1a58aab07f638e3e5e0ffb8
This commit is contained in:
Shawn Lin
2025-01-27 05:16:39 +00:00
parent d6e99d3783
commit d747235a4c
14 changed files with 394 additions and 54 deletions

View File

@@ -32,6 +32,8 @@ import android.hardware.face.FaceSensorPropertiesInternal;
import android.hardware.face.IFaceAuthenticatorsRegisteredCallback;
import android.os.Looper;
import android.os.RemoteException;
import android.platform.test.annotations.DisableFlags;
import android.platform.test.flag.junit.SetFlagsRule;
import androidx.preference.Preference;
import androidx.preference.PreferenceManager;
@@ -60,6 +62,8 @@ import java.util.List;
public class FaceSettingsFooterPreferenceControllerTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@Rule
public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
private static final String PREF_KEY = "security_face_footer";
@Mock
private FaceManager mFaceManager;
@@ -140,6 +144,7 @@ public class FaceSettingsFooterPreferenceControllerTest {
}
@Test
@DisableFlags(com.android.settings.flags.Flags.FLAG_BIOMETRICS_ONBOARDING_EDUCATION)
public void testString_faceClass3() throws RemoteException {
setupHasFaceFeature();
displayFaceSettingsFooterPreferenceController();