Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
res/ | 03-May-2024 | - | 947 | 849 | ||
src/com/android/car/frameworkpackagestubs/ | 03-May-2024 | - | 175 | 73 | ||
Android.bp | D | 03-May-2024 | 287 | 17 | 11 | |
AndroidManifest.xml | D | 03-May-2024 | 16.2 KiB | 332 | 282 | |
README.md | D | 03-May-2024 | 1.5 KiB | 38 | 26 |
README.md
1# Car FrameworkPackageStubs 2 3Car FrameworkPackageStubs handles certain [Common intents] and informs users 4they are not supported by android.hardware.type.automotive devices. This keeps 5users informed, simplifies app development and avoids app crashing even when 6apps do not check resolveActivity() first nor handle ActivityNotFoundException. 7 8## How to add common intents 9 10The steps are: 11 121. Ensure the intents should be no-ops according to CDD, CTS, developer guides, 13 etc. 142. Add the same activity intent-filter to the AndroidManifest.xml as them in the 15 original package. 163. Add a stub class in the Stubs.java to show the toast. You may also customize 17 the message as needed. 184. Remove the original package handling those intents from the build targets. 195. Add & pass [CarFrameworkPackageStubsTest]. 206. Validate the build targets can pass the relevant CTS and sample apps will not 21 crash. 22 23## References 24 251. CDD: [3.2.3.1. Common Application Intents] 262. CTS: [AvailableIntentsTest.java] 273. Developer guides: [Common Intents (API 31)] 28 29[CarFrameworkPackageStubsTest]: ../tests/CarFrameworkPackageStubsTest/README.md 30 31[Common intents]: https://developer.android.com/guide/components/intents-common 32 33[3.2.3.1. Common Application Intents]: https://source.android.com/docs/compatibility/12/android-12-cdd#3231_common_application_intents 34 35[AvailableIntentsTest.java]: ../../../../cts/tests/tests/content/src/android/content/cts/AvailableIntentsTest.java 36 37[Common Intents (API 31)]: https://developer.android.com/about/versions/12/reference/common-intents-31 38