Mårten Kongstad | fbd71e2 | 2023-05-31 13:29:35 +0200 | [diff] [blame] | 1 | package {package}; |
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( |
Mårten Kongstad | 066575b | 2023-06-07 16:29:25 +0200 | [diff] [blame^] | 10 | "{item.device_config_namespace}", |
| 11 | "{item.device_config_flag}", |
Zhi Dou | eb74489 | 2023-05-10 04:02:33 +0000 | [diff] [blame] | 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 | } |