Loading res/values/e_config.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright Murena SAS 2024 ~ This program is free software: you can redistribute it and/or modify ~ it under the terms of the GNU General Public License as published by ~ the Free Software Foundation, either version 3 of the License, or ~ (at your option) any later version. ~ ~ This program is distributed in the hope that it will be useful, ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ~ GNU General Public License for more details. ~ ~ You should have received a copy of the GNU General Public License ~ along with this program. If not, see <https://www.gnu.org/licenses/>. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- Indicates whether device uses Google's sfps implementation --> <bool name="config_use_google_side_fps" translatable="false">false</bool> </resources> src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java +1 −1 Original line number Diff line number Diff line Loading @@ -260,7 +260,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling { } else if (mCanAssumeSfps) { mSfpsEnrollmentFeature = FeatureFactory.getFeatureFactory() .getFingerprintFeatureProvider().getSfpsEnrollmentFeature(); .getFingerprintFeatureProvider().getSfpsEnrollmentFeature(getApplicationContext()); setContentView(R.layout.sfps_enroll_enrolling); setHelpAnimation(); } else { Loading src/com/android/settings/biometrics/fingerprint/FingerprintFeatureProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ public interface FingerprintFeatureProvider { * Gets the feature implementation of SFPS enrollment. * @return the feature implementation */ SfpsEnrollmentFeature getSfpsEnrollmentFeature(); SfpsEnrollmentFeature getSfpsEnrollmentFeature(@NonNull Context context); /** * Gets calibrator for udfps pre-enroll Loading src/com/android/settings/biometrics/fingerprint/FingerprintFeatureProviderImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -35,9 +35,9 @@ public class FingerprintFeatureProviderImpl implements FingerprintFeatureProvide private SfpsRestToUnlockFeature mSfpsRestToUnlockFeature = null; @Override public SfpsEnrollmentFeature getSfpsEnrollmentFeature() { public SfpsEnrollmentFeature getSfpsEnrollmentFeature(@NonNull Context context) { if (mSfpsEnrollmentFeatureImpl == null) { mSfpsEnrollmentFeatureImpl = new SfpsEnrollmentFeatureImpl(); mSfpsEnrollmentFeatureImpl = new SfpsEnrollmentFeatureImpl(context); } return mSfpsEnrollmentFeatureImpl; } Loading src/com/android/settings/biometrics/fingerprint/feature/SfpsEnrollmentFeatureImpl.java +8 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,11 @@ public class SfpsEnrollmentFeatureImpl implements SfpsEnrollmentFeature { private FingerprintManager mFingerprintManager = null; private static final int HELP_RESUME_ENROLL_MSG = 1000; private Context mContext; public SfpsEnrollmentFeatureImpl(Context context) { this.mContext = context; } @Override public int getCurrentSfpsEnrollStage(int progressSteps, Function<Integer, Integer> mapper) { Loading Loading @@ -111,7 +116,9 @@ public class SfpsEnrollmentFeatureImpl implements SfpsEnrollmentFeature { } private void resumeEnrollmentIfNecessary(int helpMsgId, String helpString, Supplier supplier) { if (helpMsgId == HELP_RESUME_ENROLL_MSG) { final boolean useGoogleSfps = mContext.getResources().getBoolean( R.bool.config_use_google_side_fps); if (helpMsgId == HELP_RESUME_ENROLL_MSG && useGoogleSfps) { SfpsUtils.resumeEnroll(); } } Loading Loading
res/values/e_config.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright Murena SAS 2024 ~ This program is free software: you can redistribute it and/or modify ~ it under the terms of the GNU General Public License as published by ~ the Free Software Foundation, either version 3 of the License, or ~ (at your option) any later version. ~ ~ This program is distributed in the hope that it will be useful, ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ~ GNU General Public License for more details. ~ ~ You should have received a copy of the GNU General Public License ~ along with this program. If not, see <https://www.gnu.org/licenses/>. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <!-- Indicates whether device uses Google's sfps implementation --> <bool name="config_use_google_side_fps" translatable="false">false</bool> </resources>
src/com/android/settings/biometrics/fingerprint/FingerprintEnrollEnrolling.java +1 −1 Original line number Diff line number Diff line Loading @@ -260,7 +260,7 @@ public class FingerprintEnrollEnrolling extends BiometricsEnrollEnrolling { } else if (mCanAssumeSfps) { mSfpsEnrollmentFeature = FeatureFactory.getFeatureFactory() .getFingerprintFeatureProvider().getSfpsEnrollmentFeature(); .getFingerprintFeatureProvider().getSfpsEnrollmentFeature(getApplicationContext()); setContentView(R.layout.sfps_enroll_enrolling); setHelpAnimation(); } else { Loading
src/com/android/settings/biometrics/fingerprint/FingerprintFeatureProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ public interface FingerprintFeatureProvider { * Gets the feature implementation of SFPS enrollment. * @return the feature implementation */ SfpsEnrollmentFeature getSfpsEnrollmentFeature(); SfpsEnrollmentFeature getSfpsEnrollmentFeature(@NonNull Context context); /** * Gets calibrator for udfps pre-enroll Loading
src/com/android/settings/biometrics/fingerprint/FingerprintFeatureProviderImpl.java +2 −2 Original line number Diff line number Diff line Loading @@ -35,9 +35,9 @@ public class FingerprintFeatureProviderImpl implements FingerprintFeatureProvide private SfpsRestToUnlockFeature mSfpsRestToUnlockFeature = null; @Override public SfpsEnrollmentFeature getSfpsEnrollmentFeature() { public SfpsEnrollmentFeature getSfpsEnrollmentFeature(@NonNull Context context) { if (mSfpsEnrollmentFeatureImpl == null) { mSfpsEnrollmentFeatureImpl = new SfpsEnrollmentFeatureImpl(); mSfpsEnrollmentFeatureImpl = new SfpsEnrollmentFeatureImpl(context); } return mSfpsEnrollmentFeatureImpl; } Loading
src/com/android/settings/biometrics/fingerprint/feature/SfpsEnrollmentFeatureImpl.java +8 −1 Original line number Diff line number Diff line Loading @@ -50,6 +50,11 @@ public class SfpsEnrollmentFeatureImpl implements SfpsEnrollmentFeature { private FingerprintManager mFingerprintManager = null; private static final int HELP_RESUME_ENROLL_MSG = 1000; private Context mContext; public SfpsEnrollmentFeatureImpl(Context context) { this.mContext = context; } @Override public int getCurrentSfpsEnrollStage(int progressSteps, Function<Integer, Integer> mapper) { Loading Loading @@ -111,7 +116,9 @@ public class SfpsEnrollmentFeatureImpl implements SfpsEnrollmentFeature { } private void resumeEnrollmentIfNecessary(int helpMsgId, String helpString, Supplier supplier) { if (helpMsgId == HELP_RESUME_ENROLL_MSG) { final boolean useGoogleSfps = mContext.getResources().getBoolean( R.bool.config_use_google_side_fps); if (helpMsgId == HELP_RESUME_ENROLL_MSG && useGoogleSfps) { SfpsUtils.resumeEnroll(); } } Loading