Mårten Kongstad | 00cf045 | 2023-05-26 16:48:01 +0200 | [diff] [blame^] | 1 | package aconfig.{namespace}; |
Zhi Dou | eb74489 | 2023-05-10 04:02:33 +0000 | [diff] [blame] | 2 | {{ if readwrite }} |
| 3 | import android.provider.DeviceConfig; |
| 4 | {{ endif }} |
Joe Onorato | 0c4ef0f | 2023-05-13 11:30:11 -0700 | [diff] [blame] | 5 | public final class Flags \{ |
Zhi Dou | eb74489 | 2023-05-10 04:02:33 +0000 | [diff] [blame] | 6 | {{ for item in class_elements}} |
| 7 | public static boolean {item.method_name}() \{ |
| 8 | {{ if item.readwrite- }} |
| 9 | return DeviceConfig.getBoolean( |
| 10 | "{namespace}", |
| 11 | "{item.feature_name}__{item.flag_name}", |
| 12 | {item.default_value} |
Mårten Kongstad | 00cf045 | 2023-05-26 16:48:01 +0200 | [diff] [blame^] | 13 | ); |
Zhi Dou | eb74489 | 2023-05-10 04:02:33 +0000 | [diff] [blame] | 14 | {{ -else- }} |
| 15 | return {item.default_value}; |
| 16 | {{ -endif }} |
| 17 | } |
| 18 | {{ endfor }} |
| 19 | } |