Merge "Add a new flag for demo"

This commit is contained in:
Zhi Dou
2023-06-28 20:37:40 +00:00
committed by Gerrit Code Review
2 changed files with 13 additions and 0 deletions

View File

@@ -11,3 +11,9 @@ flag {
namespace: "aconfig_demo_ns"
description: "This flag controls static content"
}
flag {
name: "third_flag"
namespace: "configuration"
description: "This flag controls static content"
}

View File

@@ -17,6 +17,7 @@
package com.example.android.aconfig.demo;
import static com.example.android.aconfig.demo.flags.Flags.appendStaticContent;
import static com.example.android.aconfig.demo.flags.Flags.thirdFlag;
public class StaticContent {
@@ -32,6 +33,12 @@ public class StaticContent {
sBuffer.append("The flag: appendStaticContent is OFF!!\n\n");
}
if (thirdFlag()) {
sBuffer.append("The flag: thirdFlag is ON!!\n\n");
} else {
sBuffer.append("The flag: thirdFlag is OFF!!\n\n");
}
return sBuffer.toString();
}
}