Commit Graph

7 Commits

Author SHA1 Message Date
Zhi Dou
3c4cc122eb Add demo code for testing
This change add demo for using test mode flag lib in
self-instrumentation tests.

There are two options.

The option 1 is to create two versions, prod and test, of the library
using flags. The prod version library uses prod flag lib, and the test
version library uses test flag lib.

The option 2 is to dynamically link to the flag lib in the library. The
flag lib is used as a stub lib and is just used for building purpose.
The in the finally binary which uses the library, the binary should
statically link to the right version of the flag lib.

Bug: 295561701
Test: atest AconfigDemoUnitTests1 && atest AconfigDemoUnitTests2

Change-Id: Ie571a260d9042933032c702095808dbf59d1697c
2023-08-18 19:45:14 +00:00
Dennis Shen
f422a8b846 cherry pick: Create rust codelab via a Rust lib used by a system app
Bug: b/295875546
Change-Id: I3b0e6133c4c007843d24501476a9d391241019b0
Merged-In: I3b0e6133c4c007843d24501476a9d391241019b0
2023-08-16 18:00:32 +00:00
Dennis Shen
22860d2f33 Update codelab system app to use native code
Bug: b/291771121
Test: tested on local devices
Change-Id: I1532d89ef185c584d3cc76c0541a0f47e622e3fb
Merged-In: I1532d89ef185c584d3cc76c0541a0f47e622e3fb
2023-08-16 17:21:29 +00:00
Zhi Dou
4a8cecd0f6 Add usage of test mode
Add usage of test mode of java_aconfig_library.

Add local host unit test of contentlibs

Test: atest ContentLibs_test_host --host
Bug: 287644619
Change-Id: Ib99a3f2b692d3251d445a2e188325ee0b0b6b268
2023-07-28 21:39:45 +00:00
Zhi Dou
52f9498e0e Add Injection use case
Add the Injection use case of Aconfig flag.

Add corresponding tests.

Test: atest AconfigDemo_ContentLibs_Test
Bug: 287644619
Change-Id: I47cea59764b2956644ad0c159945d3cdb3231c09
2023-06-23 22:35:41 +00:00
Zhi Dou
648c081b56 A simple app uses aconfig flag
Add a simple app uses aconfig.

This app can demonstrate

1. declare aconfig flag
2. build aconfig flag in building system
3. generate aconfig java flag
4. use aconfig java flag in java code

Test: atest AconfigDemo_ContentProvide_Test
Bug: 280833426
Change-Id: Ieacbe4b2368a00872254dab1c87dc66c569fc30a
2023-06-23 00:26:04 +00:00
Zhi Dou
709eb6d9a2 Add a folder for Aconfig demo
The Aconfig demo will be used as
1. As an example for aconfig code lab
2. As an example for user to learn Aconfig

Test: N/A
Bug: 287644619
Change-Id: Ida6c922fdd52caaecfadff99809a70fab8442814
2023-06-16 17:39:23 +00:00