Skip to content

[release/11.0.1xx] [Mono.Android] Remove APIs dropped in API-37.2 platform r02 - #13711

Merged
jonathanpeppers merged 1 commit into
release/11.0.1xxfrom
backport/pr-13661-to-release/11.0.1xx
Nov 23, 2026
Merged

jonathanpeppers merged 1 commit into
release/11.0.1xxfrom
backport/pr-13661-to-release/11.0.1xx

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Backport of #13661 to release/11.0.1xx

/cc @jonathanpeppers

Context: https://issuetracker.google.com/issues/584834598
Context: #13388

Google republished the Android 37.2 platform as `platform-37.2_r02`. It removes APIs that were in `platform-37.2_r01`, which our API-37.2 binding is built from:

  * The `android.app.personalcontext.*` and `android.service.personalcontext.*` packages
  * The `android.agenticon` package
  * `Notification.FLAG_AGENT_TASK_INTERACTION_*`, `Notification.getAgentInteractionFlags()`, `Notification.Builder.setAgentInteractionFlags()`, and `NotificationListenerService.Ranking.getAgentInteractionFlags()`
  * `StatusBarManager.ACTION_AGENT_TASK_MAIN`, `canSetAgentTask()`, `getAgentStateScreenLocation()`, `isAgentTaskFeatureSupported()`, `isAgentTaskLaunchSupported()`, and `setAgentTask()`

These bindings call Java members that no longer exist on r02 devices, so remove them. Update `platform-37.2_r01` to `platform-37.2_r02` in `androidsdk.targets`, the same bump as in #13388, and remove the related `map.csv`, `methodmap.csv`, and `metadata` entries.

This change must also go to servicing, so it binds only changes that do not break C# code. r02 also has these changes, which are intentionally not bound:

  * New: `Manifest.permission.READ_UPDATE_ENGINE_LOGS` and `ViewGroup.requestChildRectangleOnScreen(View, Rect, boolean, int)`.
  * `PolicyIdentifier` is no longer `final`. Unsealing it in C# makes its `(IntPtr, JniHandleOwnership)` constructor `protected`, which adds public API.
  * The `HandlerThread(String, int)` parameter is renamed from `priority` to `linuxPriority`. This breaks C# callers that use named arguments.

The only binding change kept is `[Obsolete]` on `PolicyIdentifier.CreateForTesting()`, because r02 deprecates it.

`api-37.2.xml` and `api-37.2.params.txt` were regenerated with `class-parse`, `api-xml-adjuster`, `api-merge`, and `java-source-utils` against r01 and r02. The r01 output was compared with the committed files to confirm the tools reproduce them; then only the r01 → r02 removals and the deprecation were applied.

Validation:

  * `build.cmd Prepare`: passed; downloaded `platform-37.2_r02.zip`, SHA-1 matches `repository2-3.xml`.
  * `dotnet-local.cmd build Microsoft.Android.slnx`: passed.
  * `dotnet-local.cmd build src/Mono.Android/Mono.Android.csproj -p:AndroidApiLevel=37.2 -p:AndroidPlatformId=37.2 -p:AndroidFrameworkVersion=v17.2`: passed, 0 errors; `CheckApiCompatibility` for v17.2 (against v17.1) passed.

Co-authored-by: Copilot App <[email protected]>
@jonathanpeppers
jonathanpeppers merged commit 5a1fc50 into release/11.0.1xx Nov 23, 2026
44 checks passed
@jonathanpeppers
jonathanpeppers deleted the backport/pr-13661-to-release/11.0.1xx branch November 23, 2026 15:17
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.

1 participant