tree: 5ce2519d03a6baf987349e062f83ded06019bc86 [path history] [tgz]
  1. res/
  2. src/
  3. Android.bp
  4. AndroidManifest.xml
  5. README.md
FrameworkPackageStubs/README.md

Car FrameworkPackageStubs

Car FrameworkPackageStubs handles certain Common intents and informs users they are not supported by android.hardware.type.automotive devices. This keeps users informed, simplifies app development and avoids app crashing even when apps do not check resolveActivity() first nor handle ActivityNotFoundException.

How to add common intents

The steps are:

  1. Ensure the intents should be no-ops according to CDD, CTS, developer guides, etc.
  2. Add the same activity intent-filter to the AndroidManifest.xml as them in the original package.
  3. Add a stub class in the Stubs.java to show the toast. You may also customize the message as needed.
  4. Remove the original package handling those intents from the build targets.
  5. Add & pass CarFrameworkPackageStubsTest.
  6. Validate the build targets can pass the relevant CTS and sample apps will not crash.

References

  1. CDD: 3.2.3.1. Common Application Intents
  2. CTS: AvailableIntentsTest.java
  3. Developer guides: Common Intents (API 31)