Skip to content

Support AOSP AppSearch APEX package in CheckMainlineVersionUseCase - #56

Merged
JolandaVerhoef merged 1 commit into
android:mainfrom
alanschen-google:fix-aosp-appsearch-mainline-check
Sep 18, 2026
Merged

JolandaVerhoef merged 1 commit into
android:mainfrom
alanschen-google:fix-aosp-appsearch-mainline-check

Conversation

@alanschen-google

Copy link
Copy Markdown
Contributor

What I have done and why

On AOSP builds (such as Android Automotive OS emulators running Android 17 / SDK 37), the AppSearch APEX module name is com.android.appsearch, whereas on Google Play / GMS devices it is com.google.android.appsearch.

Currently, CheckMainlineVersionUseCase only queries com.google.android.appsearch. When running on AOSP / automotive emulators, PackageManager.getPackageInfo() throws NameNotFoundException, causing the agent to report "AppFunction Not Supported" and block operations even when AppFunctions are available and exposed.

This PR updates CheckMainlineVersionUseCase to check both package names (com.google.android.appsearch and com.android.appsearch), allowing the agent to run seamlessly across both AOSP automotive and standard GMS environments.

Testing Done

  • Formatted and verified with ./gradlew spotlessCheck.
  • Built and deployed the standard debug APK to an Android 17 Automotive emulator (gcar_x86_64).
  • Confirmed the "AppFunction Not Supported" dialog is resolved and the agent starts normally.

Currently, CheckMainlineVersionUseCase only checks for the Google mainline package name com.google.android.appsearch. On AOSP builds and automotive emulators, the package name is com.android.appsearch, causing the agent to report 'AppFunction Not Supported'.

Check both com.google.android.appsearch and com.android.appsearch to support AOSP environments.
@alanschen-google
alanschen-google requested a review from a team as a code owner September 17, 2026 18:48
@JolandaVerhoef
JolandaVerhoef merged commit fc9ce59 into android:main Sep 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants