Clean up FeatureFactory.getFeature()

Bug: 286764889
Test: m Settings
Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
This commit is contained in:
Chaohui Wang
2023-08-04 15:42:43 +08:00
parent 0062308347
commit 8e2ae547d6
220 changed files with 282 additions and 306 deletions

View File

@@ -182,7 +182,7 @@ public class FaceSettings extends DashboardFragment {
mUserId = getActivity().getIntent().getIntExtra(
Intent.EXTRA_USER_ID, UserHandle.myUserId());
mFaceFeatureProvider = FeatureFactory.getFactory(getContext()).getFaceFeatureProvider();
mFaceFeatureProvider = FeatureFactory.getFeatureFactory().getFaceFeatureProvider();
if (mUserManager.getUserInfo(mUserId).isManagedProfile()) {
getActivity().setTitle(
@@ -418,13 +418,9 @@ public class FaceSettings extends DashboardFragment {
}
private boolean isAttentionSupported(Context context) {
FaceFeatureProvider featureProvider = FeatureFactory.getFactory(
context).getFaceFeatureProvider();
boolean isAttentionSupported = false;
if (featureProvider != null) {
isAttentionSupported = featureProvider.isAttentionSupported(context);
}
return isAttentionSupported;
FaceFeatureProvider featureProvider =
FeatureFactory.getFeatureFactory().getFaceFeatureProvider();
return featureProvider.isAttentionSupported(context);
}
private boolean hasEnrolledBiometrics(Context context) {