Upgrade to AppFunctions 1.0.0-alpha10#24
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates the application to the new androidx.appfunctions version 1.0.0-alpha10 architecture, replacing the legacy configuration with the new AppFunctionService entry points. It introduces BaseChatAppFunctionService, BaseBuiltInAppFunctionService, and BaseFakeAppFunctionService, registers them in the manifests, and adds AppFunctionExceptionFormatter to format exceptions for LLM outputs. Feedback focuses on ensuring cooperative coroutine cancellation by rethrowing CancellationException instead of swallowing or wrapping it in BaseChatAppFunctionService and AgentOrchestrator. Additionally, it is recommended to avoid using reflection with Class.forName when launching MainActivity in BaseChatAppFunctionService.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
- Re-throw CancellationException in BaseChatAppFunctionService and AgentOrchestrator to preserve cooperative coroutine cancellation. - Replace reflection (Class.forName) with Intent.setClassName for MainActivity resolution. - Remove legacy mock-based AppFunctionsTest in favor of E2E AppFunctionInstrumentationTest. - Update targetApi to 37 for multiple AppFunction services in agent AndroidManifest.xml. - Bump wear module minSdk to 36 and remove redundant @RequiresApi annotations. - Rename appException to appFunctionException in AgentOrchestrator. - Remove obsolete AppFunctionManager null-check test in ExecuteAppFunctionUseCaseTest. - Replace inline FQCN usages for PendingIntent, UUID, and CancellationException with imports. - Remove manual AppFunctionsIds object in favor of KSP-generated ChatAppFunctionService function ID constants in instrumentation tests and view models.
• Upgraded both
agentandChatAppmodules to AppFunctions 1.0.0-alpha10.• Refactored exception handling in
AgentOrchestratorto act on errors directly instead of surfacing them as unhandled exceptions.• Cleaned up obsolete repository classes and refactored base service architectures.