aconfig: explicitly @hide FLAG_ constants
Because of a bug in metalava [1], the flag constants are incorrectly considered not-hidden when metalava generates the API signature files. This means the FLAG_ constant name will be used, instead of the FLAG_ constant value, which is what we want. While waiting for b/300211291 to be fixed, explicitly mark the FLAG_ constants as hidden (and keep marking the classes as such). This CL can be reverted when b/300211291 is fixed. 1. Item.isHiddenOrRemoved does not check if its parent item is hidden, tracked in b/300211291 Bug: 297881670 Test: atest aconfig.test aconfig.test.java Change-Id: I05de8344ccb424bee51c39f9609489ad312397ce
This commit is contained in:
parent
be6ba681e9
commit
fb10840da5
2 changed files with 6 additions and 0 deletions
|
@ -135,10 +135,15 @@ mod tests {
|
|||
package com.android.aconfig.test;
|
||||
/** @hide */
|
||||
public final class Flags {
|
||||
/** @hide */
|
||||
public static final String FLAG_DISABLED_RO = "com.android.aconfig.test.disabled_ro";
|
||||
/** @hide */
|
||||
public static final String FLAG_DISABLED_RW = "com.android.aconfig.test.disabled_rw";
|
||||
/** @hide */
|
||||
public static final String FLAG_ENABLED_FIXED_RO = "com.android.aconfig.test.enabled_fixed_ro";
|
||||
/** @hide */
|
||||
public static final String FLAG_ENABLED_RO = "com.android.aconfig.test.enabled_ro";
|
||||
/** @hide */
|
||||
public static final String FLAG_ENABLED_RW = "com.android.aconfig.test.enabled_rw";
|
||||
|
||||
@com.android.aconfig.annotations.AssumeFalseForR8
|
||||
|
|
|
@ -3,6 +3,7 @@ package {package_name};
|
|||
/** @hide */
|
||||
public final class Flags \{
|
||||
{{- for item in class_elements}}
|
||||
/** @hide */
|
||||
public static final String FLAG_{item.flag_name_constant_suffix} = "{item.device_config_flag}";
|
||||
{{- endfor }}
|
||||
{{ for item in class_elements}}
|
||||
|
|
Loading…
Reference in a new issue