When parsing API signature files, check-flagged-apis relies on
ClassItem.superClass to get the parent class of a class or interface.
That method always returns null for interfaces.
When generating api-versions.xml, metalava marks interface classes as
inheriting from java/lang/Object:
<class name="android/os/Parcelable" since="1">
<extends name="java/lang/Object"/>
[...]
</class>
This confuses check-flagged-apis when comparing data parsed from both
sources, as the symbol signatures will be identical, but the superclass
entries differ. Work around this by explicitly marking all interfaces
as inheriting from java/lang/Object when parsing API signature files.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: Icbb8f7d4c3d4232a083289a778b347e33a0856ab
With our version compatibility check, overriding our cow version no
longer works. Updating this check to only apply if a command line
vabc_cow_version is not specified.
NOTE: the ota may not successfully apply, depending on device if we
override the cow version
Test: th
Change-Id: Ibbed6cf94cc2e91597d0c249dc8ade314b8341a2
Framework already has nano protos, and reusing them won't
introduce extra dependencies for the apps
This is setting up the resources flagging in the framework
Bug: 297373084
Test: Built with related changes
Change-Id: I518bd56f56c42e0adef0002e95f8948e0904fb43
aconfig_device_paths uses `include_str!` to include a text file
containing comma-separated strings with each partition aconfig file.
The lib does not handle the escaped newlines and quotation marks.
Adds proper handling.
Test: cargo t && m -j120 && acloud create --local-image && adb shell aflags list
Bug: 340514768
Change-Id: I75214bf02dd962d8291f1654ade8cbce1cda9fde
If the Display interface is implemented the compiler will automatically
derive an implementation of ToString.
Test: m aflags
Bug: 333887339
Change-Id: I861a3065edbef0da1684a6ea28cc374acd0d774a
This reverts commit 681597df18.
retrofit OTA generation relies on files in OTA/* , include these
files when copying target_files dir to tmp location.
Test: th
Bug: 337043530
Fixes: 337043530
Change-Id: Id9bb1cddcf992556923a17fd3f9b5e41eac7ca96
retrofit OTA generation relies on files in OTA/* , include these
files when copying target_files dir to tmp location.
Test: th
Bug: 337043530
Fixes: 337043530
Change-Id: I8fd7729bc1b2d2797f7e76f594b06fd9675fa104
Consider
@FlaggedApi(FLAG_OUTER) Clazz {
@FlaggedApi(FLAG_INNER) method();
}
If FLAG_OUTER is disabled, any class members are ignored. Teach
check-flagged-apis to recognize this and stop reporting false positives.
Bug: 339183637
Test: atest --host check-flagged-apis-test
Change-Id: Ie6799e952dc33874c1239231f841d7dfd947c7ce
* changes:
check-flagged-apis: consider interfaces when looking up symbol
check-flagged-apis: skip self-referential interfaces
check-flagged-apis: record interfaces when parsing classes
check-flagged-apis: add more details to Symbol class
check-flagged-apis: api-versions.xml: correctly parse nested class ctor
If a symbol can't be found in a class, (recursively) check the class'
superclass before reporting the symbol as missing.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I8ef1fbfcc51e0c5ba00959536c087213d688fe39
Extend ClassSymbol with a nullable reference to the class' superclass.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: Ia2741a4d7fb5de908a03ef640f5fcd38d0ce0e28
When searching for potential errors, if a symbol can't be found in the
api-verions.xml data, check if it is present in any of the class'
interfaces.
A follow-up CL will add similar logic to handle super classes.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: Ia6dfcfa8495b89465db60f6a4eb77d304112046b
The return value of ClassItem.allInterfaces will sometimes include the
interface itself (e.g.
android.accessibilityservice.BrailleDisplayController). It is unclear
when this happens; it doesn't happen for the unit test.
Update the logic to record the interfaces for a class to filter out
interfaces named the same as the class.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: croot && ./build/tools/check-flagged-apis/check-flagged-apis.sh
Change-Id: I8d93c230dfedde30e8d43fefd560a47944085d3a
Extend ClassSymbol with a list of the interfaces that class implements.
This will be used in a follow-up CL to improve the logic that checks if
a class member exists in the api-versions.xml data.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I4db7ff47c3ce40ca892cb872810dd559426dfcb8
Change Symbol from a wrapper around a String to a more fleshed out data
class; symbols now encode if they represent a class, or a class member
(including a reference to the containing class).
Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: croot && ./build/tools/check-flagged-apis/check-flagged-apis.sh # with and without this CL; the output should be the same
Change-Id: I003535c721c45d559d00fb3e008325e1db0e18c0
The constructor of a nested class is represented as follows in
api-versions.xml:
<class name="android/Clazz$Foo$Bar" since="1">
<method name="<init>()V"/>
</class>
The nested dollar signs are not replaced by forward slashes before the
parsing logic uses `split("/")` to find the name of the inner-most
class, incorrectly resulting in `Class$Foo$Bar` instead of `Bar`. Fix
this by immediately replacing dollar signs with forward slashes after
extracting the package and class.
Also clean up the following call of `Symbol.create`.
Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I8c0619faae90ded7eb14dcc20ecb94a086a1c764
Note that not all partitions are moved to Soong. Soong doesn't yet
support *_dlkm partitions and the oem partition.
This change also removes dead code for support VNDK snapshot.
Finally, as a minor clean up, the leading '_' is dropped from the module
names _fs_config_*. There's no need to hide the module names.
Bug: 337993745
Test: m
Change-Id: I5beec5c6734291b9361f870fc1a8dba19def062e
Return a pointer of MappedStorageFile/MutableMappedStorageFile instead
of an object of MappedStorageFile/MutableMappedStorageFile. Now added
destructor for MappedStorageFile/MutableMappedStorageFile to unmap the
in memory file to free up memory.
Bug: b/321077378
Test: atest -c
Change-Id: Iaa02696feb07ff383f0c7e46b645d82e57c38254
Previously, the check-flagged-apis.sh script used `api-versions.xml`
for `module-lib` and `system-server` which did not include the
latest up-to-date information about updatable modules or historical
information about sdk extensions which lead to false positives for
APIs from those updatable modules. This changes switches to use the
`api-versions.xml` produced by the new `api_versions_*_complete`
modules which does include that information.
Bug: 337836752
Test: Run script before and after applying this change to make sure
that flagged APIs from updatable modules are no longer
reported as missing.
Change-Id: If09e89a4595a19d9f00390fb5fbd24330ec11be5
Instead of building the entire SDK, explicitly build the
api-versions.xml files.
Bug: 334870672
Test: croot && build/tools/check-flagged-apis/check-flagged-apis.sh
Change-Id: Ib165c0acd4766ad3000aaf17220050d5e66ddf2c