Commit Graph

3909 Commits

Author SHA1 Message Date
Zhi Dou
4249de3bbc Merge "Fix b/300640506" into main am: aa683c3fa8
Original change: https://android-review.googlesource.com/c/platform/development/+/2754745

Change-Id: Ib9d9f9868a2ce033dfd6d0ce1039f4b77b681ab7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-18 17:07:40 +00:00
Zhi Dou
01f00d9d78 Fix b/300640506
Test: atest AconfigDemoUnitTests
Bug: b/300640506
Change-Id: Ie3893290a53c22b8aed2af2e07d8034f8240cdcf
2023-09-18 14:49:02 +00:00
Zhi Dou
e8d37e5461 Merge "add a read only flag for demo" into main am: dddb3fa987
Original change: https://android-review.googlesource.com/c/platform/development/+/2752905

Change-Id: Id1b2f27a247752baac9408ab06fe66ec41651dbf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-15 15:33:03 +00:00
Zhi Dou
ce3f8d4352 add a read only flag for demo
Bug: 298754733
Test: atest AconfigDemoUnitTests
Change-Id: Ib01918b2469ea59091b47d49672800b5716beb88
2023-09-15 14:17:25 +00:00
Zhi Dou
f2763482b6 Merge "Run unit test with the prod flag java lib" into main am: a4f2876d42
Original change: https://android-review.googlesource.com/c/platform/development/+/2736614

Change-Id: Ie707e21a2dce57cb4e570ba55d37ffa036e39577
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-31 22:14:25 +00:00
Zhi Dou
32120e43e1 Run unit test with the prod flag java lib
Bug: 295561701
Test: m AconfigDemoUnitTests
Change-Id: Ib906c285ee6b4ebc04fde0e09555fb3c56453d16
2023-08-31 18:22:19 +00:00
Xin Li
c48ca52981 Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: I3ecaaa93a89703a6c3d20c81210f7c6683c145fb
Change-Id: Ib5819377b7aad20e03ca639b4e65172fefe0b512
2023-08-25 13:42:52 -07:00
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
Dennis Shen
a117eb53ed Add the first flag to core_experiments_team_internal
Add an internal dir to host an aconfig file that is dedicated to
trunk_stable_workflow testing. We should use this one, instead the one
dedicated to the demo app.

Bug: 294537090
Change-Id: I1a28da8e202f5f454df35f298c8c962d3b9b229b
2023-08-11 14:15:34 +00:00
Zhi Dou
d20064a3ad Rename MockFlagsRule
The testing rule MockFlagsRule is not a "Mock". Rename the class name.

Bug: 280833463
Test: presubmit
Change-Id: I644537163e07dcf55cd69af3690e435251149349
2023-08-07 15:37: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
Treehugger Robot
fcfc138048 Merge "AconfigDemo: associate each flag with exactly one bug" into main 2023-07-28 07:14:42 +00:00
Mårten Kongstad
dc5f6e451e AconfigDemo: associate each flag with exactly one bug
aconfig now requires that each flag is associated with exactly one bug.
Update aconfig_demo_flags.aconfig accordingly.

Also standardize use of whitespace.

Bug: 293156797
Test: presubmit
Change-Id: I3e10f7055ffb2776fbe825f0902b735ca4674b58
2023-07-27 13:54:18 +02:00
Yuyang Huang
3dd4037e6d Add NsdManagerSampleApps to show how to usd NsdManager API
The TestDiscoverService app covers the API for service discover. The
TestAdvertiseService app covers the APT for service advertisement.

Test: ./gradlew build
Change-Id: I6a8d94bbe88a9a20b1adcda8e0916898c68e7ea5
2023-07-24 17:15:34 +09:00
Guang Zhu
1037f3dc47 Add direct usage of Flags in demo app
So that flags aren't subject to optimization

Bug: 289449667
Test: atest FlagStateComboTests
Change-Id: Idafa571e74448fad3ae3d36c1e00a960abb21f24
2023-06-30 12:34:16 -07:00
Guang Zhu
b6434aae53 add more variantions for flag on/off filtering demo
... also fixed missing copyright headers in 2 existing test files
... also made the instrumentation against the demo activity for real

Bug: 277819423
Test: atest FlagStateComboTests
      adb shell device_config put test \
        com.example.android.aconfig.demo.flags.awesome_flag_1 <true|false>
      adb shell device_config put test \
        com.example.android.aconfig.demo.flags.awesome_flag_2 <true|false>
Change-Id: I6083f11ee743a8b4f0f9bc23ac6945b5d072ab5e
2023-06-29 16:03:24 -07:00
Zhi Dou
da74895830 Add bugs in the flag declaration
Test: presubmit
Bug: 287644619
Change-Id: I676d2415c833354b1f053fcd04da8dace61943cd
2023-06-29 17:29:22 +00:00
Zhi Dou
403b998e1d Add a new flag for demo
Bug: 287644619
Test: presubmit
Change-Id: Ic91d0f7e829a249dd6d1d8973d9c179b545d025b
2023-06-28 19:24:05 +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
Treehugger Robot
dbaedc1c87 Merge "Add a folder for Aconfig demo" am: 92b2b32900 am: 631ce77d19 am: f4567a54bf
Original change: https://android-review.googlesource.com/c/platform/development/+/2628494

Change-Id: Ia89ef8023f5ef0415936d51138ba1d8a208cd895
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-16 21:22:48 +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
Anvesh Renikindi
4b48ea39e3 Added shortcutlauncherdemo Initialization provider
Bug: 277943394
Change-Id: I4a87f0539e1f269b5990acd522ba3916fdb6fe56
Test: None
2023-05-10 18:57:52 +00:00
Hongwei Wang
8f10bb853f Add moveTaskToBack to PiP demo
Bug: 281452335
Test: m -j ApiDemos
Change-Id: I00a46f578171d248ccc7311c0f25cbb80de6a3ea
2023-05-09 10:18:00 -07:00
Anvesh Renikindi
1b28fd1211 Added shortcutlauncherdemo Initialization provider
Bug: 277943394
Change-Id: I4a87f0539e1f269b5990acd522ba3916fdb6fe56
Test: None
2023-04-12 20:10:46 +00:00
lpeter
c2fc0c3daf Modify callback method by API Council feedback
Bug: 271107031
Test: Manual
Change-Id: I62e0780c6fb17ffbd64b9cf1028fbdda521c2cf5
Merged-In: I62e0780c6fb17ffbd64b9cf1028fbdda521c2cf5
2023-03-19 16:33:25 +00:00
Nicholas Ambur
ead9d0a229 remove instances of IllegalDetectorStateException
Test: build VoiceInteraction test app only
Bug: 260387702
Change-Id: Ia967f461a44cae28cc00337b14b35641264bce1b
2023-03-15 05:14:58 +00:00
Henri Chataing
5db4bef9d5 Revert^2 "Remove samples for deprecated Android Beam API"
8de7b4b166

Change-Id: I415762b2fcbc9706a33d7a41858c1c142bb7ffab
Merged-In: I415762b2fcbc9706a33d7a41858c1c142bb7ffab
(cherry picked from commit 614c1aec90)
2023-03-14 23:27:34 +00:00
Cole Faust
925ae754d2 Baseline NewApi issues
NewApi was recently updated to support linting methods in
the system, module_lib, and system_server sdks, and was
demoted to a warning due to the new issues it finds.
Baseline all the new issues that NewApi can be made an error
again.

These cls were generated automatically by a script that
copied the NewApi issues from the reference baselines.

Bug: 268261262
Test: m lint-check
Change-Id: Ic4efa122dbdd743b7081368fb8676ad895269aa5
2023-03-09 14:24:05 -08:00
Charles Chen
d9f594f4c3 API rename: SandboxedDetectionServiceInitializer(dev)
Better name now.

Bug: 265288021
Test: atest CtsVoiceInteractionTestCases
Change-Id: I3a25ceeed1cc3113ac5396af6ea3c6461bd1143f
2023-03-02 22:56:01 +00:00
Charles Chen
edf369d11c Remove callback for VisualQueryDetectionService (Sample)
Updated sample app.

Bug: 266564316
Test: atest CtsVoiceInteractionTestCases
Change-Id: I798366aa7103a4aa871c4c82480c5798e8cc37a6
2023-02-28 02:11:19 +00:00
lpeter
de48cc73f0 Change callback method from onError to onFailure
Bug: 256780491
Bug: 261012843
Test: Manual
Change-Id: I249e3a99b1505c1b70b595a6fbae1a5d2bc6e27c
2023-02-17 11:54:06 +00:00
Henri Chataing
3a4e023766 Merge "Revert^2 "Remove samples for deprecated Android Beam API"" 2023-02-13 17:07:59 +00:00
Henri Chataing
614c1aec90 Revert^2 "Remove samples for deprecated Android Beam API"
8de7b4b166

Change-Id: I415762b2fcbc9706a33d7a41858c1c142bb7ffab
2023-02-06 22:25:55 +00:00
Charles Chen
d644524452 Add sample app for VisualQueryDetection connection
Test: Manual
Bug: 261517532
Change-Id: I5121f86b5ec3469813f5f3d95dfba01d39ce6f1c
2023-02-06 15:45:38 +00:00
Daniel Chapin
c81d1a48f6 Merge "Revert "Remove samples for deprecated Android Beam API"" 2023-01-19 19:41:42 +00:00
Daniel Chapin
8de7b4b166 Revert "Remove samples for deprecated Android Beam API"
Revert submission 20750504-nfc-beam-cleanup

Reason for revert: Droidfood blocking bug: 265628639

Reverted changes: /q/submissionid:20750504-nfc-beam-cleanup

Change-Id: I52227544aa152471ab3186eb21dd3a3f0e7cc193
2023-01-17 23:00:19 +00:00
Charles Chen
fb50c5cd8f Merge "Create SampleVisualQueryDetectionService" 2023-01-14 06:06:24 +00:00
Charles Chen
27871db61e Create SampleVisualQueryDetectionService
Create SampleVisualQueryDetectionService for the Sample VoiceInteractor
devlopment app. The service currently only has the no functionalities.
Only the creation and initialization is integrated.

Test: Manual
Bug: 261517532
Change-Id: Ia5354b24e21854fb5e53857f9a6db7c8b80d3f5a
2023-01-12 21:13:18 +00:00
Alisher Alikhodjaev
72f4cdb23f Remove samples for deprecated Android Beam API
Removed samples:
- AndroidBeamDemo
- browseable/BeamLargeFiles

Bug: 236980291
Test: n/a
Change-Id: I1a4565fd087f038e715ea6eb66a5cac700636819
2023-01-09 09:07:35 +00:00
Hui Yu
412e563671 Specify foreground service type and permissions for FGS under development/samples
TO meet the U requirement that apps targetSdkVersion U+ must specify
foreground service type and permissions.

Bug: 262580021
Test: build and run.
Change-Id: I0e6bf918b17eee82bdb2669a8c28e17e327a728f
2023-01-03 17:39:01 +00:00
Hongwei Wang
42ee03d623 Support aspect ratio change in PiP demo am: 0373c0b168 am: 5f56b6a2d7
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/20655734

Change-Id: I944aa00218b945d03282bb645fdb9ef4435beba7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-07 20:03:33 +00:00
Hongwei Wang
5f56b6a2d7 Support aspect ratio change in PiP demo am: 0373c0b168
Original change: https://googleplex-android-review.googlesource.com/c/platform/development/+/20655734

Change-Id: Id9fed6a36eb9fa389f92f21e71af77feccca7694
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-07 19:20:40 +00:00
Hongwei Wang
0373c0b168 Support aspect ratio change in PiP demo
For testing and demo purpose, currently support selecting from well
defined list of aspect ratio, include 21:9, 16:9, 1:1, 9:16 and 9:21

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/gqFQI7mpeQ6EZZ5JibsV6R
Bug: 198643358
Test: Change aspect ratio within the app, see video
Change-Id: I0580dc45bf32e795fefd7d80f5183f268f810790
2022-12-06 15:11:17 -08:00
Nicholas Ambur
fd8279171c update Readme with tracing instructions
Bug: 232147045
Test: manual
Change-Id: I848be96c96c4db59f46d51e96166d7570dd7101c
2022-11-07 23:38:47 +00:00
Nicholas Ambur
8ffec3f908 add trace events for SampleHotwordDetectionService
The same trace events are logged for both the VoiceInteractionService
and the HotwordDetectionService

Bug: 232147045
Test: manual
Change-Id: I8b46f1a76c46a34c62a42762d5c56d67f44d8b31
2022-11-07 23:37:47 +00:00
Elliott Hughes
3354f617a9 Merge "Remove renderscript samples." am: 14f9cec041 am: b240895819 am: 350f649d83
Original change: https://android-review.googlesource.com/c/platform/development/+/2282102

Change-Id: I487a614d55c2a5897e0128de4c0b75e883fba74b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 17:25:16 +00:00
Elliott Hughes
b240895819 Merge "Remove renderscript samples." am: 14f9cec041
Original change: https://android-review.googlesource.com/c/platform/development/+/2282102

Change-Id: I63a95ff65f3992bd25fc5e0490ff121e37df2a89
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-03 16:08:40 +00:00