Clean up FeatureFactory.getFeature()
Bug: 286764889 Test: m Settings Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
This commit is contained in:
@@ -84,7 +84,7 @@ public class LockScreenNotificationPreferenceController extends AbstractPreferen
|
||||
mWorkSettingKey = workSettingKey;
|
||||
|
||||
mProfileUserId = Utils.getManagedProfileId(UserManager.get(context), UserHandle.myUserId());
|
||||
final LockPatternUtils utils = FeatureFactory.getFactory(context)
|
||||
final LockPatternUtils utils = FeatureFactory.getFeatureFactory()
|
||||
.getSecurityFeatureProvider()
|
||||
.getLockPatternUtils(context);
|
||||
mSecure = utils.isSecure(UserHandle.myUserId());
|
||||
@@ -278,7 +278,7 @@ public class LockScreenNotificationPreferenceController extends AbstractPreferen
|
||||
|
||||
public static int getSummaryResource(Context context) {
|
||||
final boolean enabled = getLockscreenNotificationsEnabled(context);
|
||||
final boolean secure = FeatureFactory.getFactory(context)
|
||||
final boolean secure = FeatureFactory.getFeatureFactory()
|
||||
.getSecurityFeatureProvider()
|
||||
.getLockPatternUtils(context)
|
||||
.isSecure(UserHandle.myUserId());
|
||||
|
||||
@@ -130,7 +130,7 @@ public class RedactNotificationPreferenceController extends TogglePreferenceCont
|
||||
? UserHandle.myUserId() : mProfileUserId;
|
||||
|
||||
// hide if lockscreen isn't secure for this user
|
||||
final LockPatternUtils utils = FeatureFactory.getFactory(mContext)
|
||||
final LockPatternUtils utils = FeatureFactory.getFeatureFactory()
|
||||
.getSecurityFeatureProvider()
|
||||
.getLockPatternUtils(mContext);
|
||||
if (!utils.isSecure(userId)) {
|
||||
|
||||
@@ -68,7 +68,7 @@ abstract public class AbstractZenModePreferenceController extends
|
||||
mNotificationManager = (NotificationManager) context.getSystemService(
|
||||
Context.NOTIFICATION_SERVICE);
|
||||
|
||||
final FeatureFactory featureFactory = FeatureFactory.getFactory(mContext);
|
||||
final FeatureFactory featureFactory = FeatureFactory.getFeatureFactory();
|
||||
mMetricsFeatureProvider = featureFactory.getMetricsFeatureProvider();
|
||||
mBackend = ZenModeBackend.getInstance(context);
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ public class ZenOnboardingActivity extends Activity {
|
||||
|
||||
private static boolean withinShowTimeThreshold(Context context) {
|
||||
final SuggestionFeatureProvider featureProvider =
|
||||
FeatureFactory.getFactory(context).getSuggestionFeatureProvider();
|
||||
FeatureFactory.getFeatureFactory().getSuggestionFeatureProvider();
|
||||
final SharedPreferences prefs = featureProvider.getSharedPrefs(context);
|
||||
final long currentTimeMs = System.currentTimeMillis();
|
||||
final long firstDisplayTimeMs;
|
||||
|
||||
Reference in New Issue
Block a user