Send context object to FeatureFlagUtils.
Bug: 36222960 Test: robotests Change-Id: I9ca2d8c679474e545988f518eaf32acf459abd2c
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.SystemProperties;
|
||||
import android.text.TextUtils;
|
||||
|
||||
@@ -35,7 +36,7 @@ public class FeatureFlagUtils {
|
||||
* @param feature the flag name
|
||||
* @return true if the flag is enabled (either by default in system, or override by user)
|
||||
*/
|
||||
public static boolean isEnabled(String feature) {
|
||||
public static boolean isEnabled(Context context, String feature) {
|
||||
// Tries to get feature flag from system property.
|
||||
// Step 1: check if feature flag has any override. Flag name: sys.fflag.override.<feature>
|
||||
String value = SystemProperties.get(FFLAG_OVERRIDE_PREFIX + feature);
|
||||
@@ -54,7 +55,6 @@ public class FeatureFlagUtils {
|
||||
SystemProperties.set(FFLAG_OVERRIDE_PREFIX + feature, enabled ? "true" : "false");
|
||||
}
|
||||
|
||||
|
||||
public static Map<String, String> getAllFeatureFlags() {
|
||||
final Map<String, String> features = new HashMap<>();
|
||||
features.put(FFLAG_PREFIX + "abc", "false");
|
||||
|
Reference in New Issue
Block a user