summaryrefslogtreecommitdiff
path: root/api/api_test.go
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2024-10-16 15:32:18 +0800
committer Riddle Hsu <riddlehsu@google.com> 2024-10-16 15:32:18 +0800
commitf2ec3918c0f1bf1816194e1dd50e7ead98707874 (patch)
tree5447a3c1fa90fc9554fb2580a820c896316fe641 /api/api_test.go
parentd8aa9a2a6156c355cae1e2b1e9bc863d09765499 (diff)
Make SizeCompatTests support compat annotation by default
By default the unit test uses "com.foo" as the package name of test ActivityRecord. But because ApplicationInfo#isChangeEnabled requires a valid package name to get compat flag value, the test record should use a real package name if it is interested in the compat override. Previously it was done by using getActivityBuilderOnSameTask to create another ActivityRecord with specified package name. Now because the default record already has the valid package name, it no longer needs to create additional record. So this also reduces the execution time of each 28 tests by ~500ms. OVERRIDE_ENABLE_INSETS_DECOUPLED_CONFIGURATION are added to some tests now, because they relied on the behavior of invalid package. That means the behavior of the tests in the test class can be more explicit and consistent, e.g. make sure the annotation take effect for all test methods in SizeCompatTests. Bug: 159102753 Bug: 357141415 Flag: EXEMPT simplify unit test Test: atest SizeCompatTests Change-Id: Icd7b374f2bd096b56d91dea3ecd8efedefa93c9b
Diffstat (limited to 'api/api_test.go')
0 files changed, 0 insertions, 0 deletions