Skip to content
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
This repository was archived by the owner on Aug 27, 2026. It is now read-only.

Need to track API removals, mark bindings with [UnsupportedOSPlatform] #1309

Closed

Description

@jonpryor

Context: https://developer.android.com/sdk/api_diff/23/changes

Sometimes, Android removes APIs. For example, API-23 removed the android.Manifest.permission.CLEAR_APP_USER_DATA field.

We still list this field, though: Android.Manifest.Permission.ClearAppUserData field

Is there a way for us to automatically detect such removals? If so, we should add UnsupportedOSPlatformAttribute to those members.

Activity

  1. jpobst commented on Feb 11, 2025

    @jpobst
    Contributor

    We do already track this data, however we don't currently do anything with it.

    We modified api-merge to add removed-since in dotnet/android#8897.

    Here is the excerpt from https://github.com/dotnet/android/blob/main/src/Mono.Android/Profiles/api-Baklava.xml:

    <field deprecated="not deprecated" final="true" name="CLEAR_APP_USER_DATA" jni-signature="Ljava/lang/String;" static="true" transient="false" type="java.lang.String" type-generic-aware="java.lang.String" value="&quot;android.permission.CLEAR_APP_USER_DATA&quot;" visibility="public" volatile="false" removed-since="23"></field>

    We would need to modify generator to process this data and add the appropriate [UnsupportedOSPlatform] attribute.

  2. transferred this issue fromdotnet/androidon Feb 18, 2025
  3. locked and limited conversation to collaborators on Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementProposed change to current functionality

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions