Commit graph

4 commits

Author SHA1 Message Date
Zhi Dou
3dea629a9e aconfig: cache flag value in generated java code
This change add cache in generated jave code to improve the performance.

The cache is a DeviceConfig.Properties. One Properties contains all
flag values from the given namesapce.

The Properties for a given namespace is initialized as null, and the
first call for any flags in that Properties will trigger the call to
fetch all the values. After the first call, the flag values are stored
in the Properties, so the following calls will directly get the value
from the Properties instead from the backup storage.

Test: atest aconfig.test.java
Bug: 307511846
Change-Id: Ic43626101c28099199b6faa419cf1945bd53b15d
2023-10-27 23:53:09 +00:00
Yu Liu
3cfde0e5dd Change the sdk_version to core_current.
Bazel currently can't build core_platform yet and needs this lib to
build some java_aconfig_library.

Bug: 305255550
Test: CI
Change-Id: Ic94efe7888e35099618e2fdbbbb481168ed2bcf2
2023-10-13 18:16:52 +00:00
Joe Onorato
cede86dd28 make fake_device_config buildable on host
Test: treehugger
Bug: 277916185
Change-Id: I002669bbb605b7968b81c66d1cbf0ff3caa0c699
Merged-In: I002669bbb605b7968b81c66d1cbf0ff3caa0c699
2023-08-30 11:39:29 -07:00
Joe Onorato
03d53f7d2d Add a fake library that contains the minimum DeviceConfig that aconfig code needs to compile.
The aconfig-generated code in the framework is added with srcjars. To
get those srcjars, we still need a java_aconfig_library.  This class is
there to allow that to compile, even though those compiled .jar files
are not actually used.

Bug: 293195086
Test: m
Change-Id: I34c21925fbc5912a34fea3e7796d5e0c77c9a4af
2023-08-20 07:40:44 -07:00