Add a new flag for demo

Bug: 287644619
Test: presubmit
Change-Id: Ic91d0f7e829a249dd6d1d8973d9c179b545d025b
This commit is contained in:
Zhi Dou
2023-06-28 18:23:38 +00:00
parent 43a0a82979
commit 403b998e1d
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();
}
}