Send context object to FeatureFlagUtils.

Bug: 36222960
Test: robotests
Change-Id: I9ca2d8c679474e545988f518eaf32acf459abd2c
This commit is contained in:
Fan Zhang
2017-11-13 17:37:53 -08:00
parent 4f74ed2d07
commit 06b0d5b564
19 changed files with 61 additions and 63 deletions

View File

@@ -73,7 +73,7 @@ public class SuggestionFeatureProviderImpl implements SuggestionFeatureProvider
final ActivityManager am =
(ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
boolean isLowRamDevice = am.isLowRamDevice();
return !isLowRamDevice && !isV2Enabled();
return !isLowRamDevice && !isV2Enabled(context);
}
@Override
@@ -81,7 +81,7 @@ public class SuggestionFeatureProviderImpl implements SuggestionFeatureProvider
final ActivityManager am =
(ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
boolean isLowRamDevice = am.isLowRamDevice();
return !isLowRamDevice && isV2Enabled();
return !isLowRamDevice && isV2Enabled(context);
}
@Override
@@ -91,8 +91,8 @@ public class SuggestionFeatureProviderImpl implements SuggestionFeatureProvider
"com.android.settings.intelligence.suggestions.SuggestionService");
}
private static boolean isV2Enabled() {
return FeatureFlagUtils.isEnabled(SUGGESTIONS_V2) || true;
private static boolean isV2Enabled(Context context) {
return FeatureFlagUtils.isEnabled(context, SUGGESTIONS_V2) || true;
}
@Override