You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hmz007 f8b41b0f23
Rockchip Anroid14_SDK 20250804-rkr7.1 (3740ef92)
6 months ago
..
res Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
src/com/android/car/frameworkpackagestubs Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
Android.bp Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago
AndroidManifest.xml Rockchip Anroid14_SDK 20250804-rkr7.1 (3740ef92) 6 months ago
README.md Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a) 1 year ago

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)