Skip to content

Android.Telecom.RemoteConference has wrong type #1087

Closed

Description

@jonpryor

Context: #1078 (comment)

API-24 introduced android.telecom.RemoteConference.getConnectionProperties().

In $(TargetFrameworkVersion) v7.0 (API-24), we bound this as as type CallProperty:

https://github.com/xamarin/xamarin-android/blob/2c2d47c4a28eeb398500a8c0a9a0a803324de014/src/Mono.Android/methodmap.csv#L2100

24, android.telecom, RemoteConference, getConnectionProperties, return, Android.Telecom.CallProperty

In $(TargetFrameworkVersion) v7.1 (API-25), we bound this as ConnectionProperties:

https://github.com/xamarin/xamarin-android/blob/2c2d47c4a28eeb398500a8c0a9a0a803324de014/src/Mono.Android/methodmap.csv#L2144

25, android.telecom, RemoteConnection, getConnectionProperties, return, Android.Telecom.ConnectionProperties

Question: Why do we have three separate enumifications for this method? (There's a 2nd API-25 one two lines below the link above.)

Regardless, this mismatch introduces an inter-api-level inconsistency around the type of RemoteConference.ConnectionProperties. The result is that any assemblies which build against v7.0 and run in v7.1+ will throw a MissingMethodException.

We should fix things so that all API levels -- API-24+ -- bind RemoteConference.ConnectionProperties as ConnectionProperties

Activity

  1. atsushieno commented on Dec 7, 2017

    @atsushieno
    Contributor

    As I commented at #1078 (comment) those constants didn't exist in API Level 24 (see the comment for more details).

  2. jonpryor commented on Dec 7, 2017

    @jonpryor
    ContributorAuthor

    @atsushieno suggested:

    (2) mark those constants as if they existed since API Level 24.

    I think we should go for (2a): Introduce an empty enum in API-24:

    #if ANDROID_24 && !ANDROID_25
    namespace Android.Telecom {
        public enum ConnectionProperties {
        }
    }
    #endif

    We do similar things elsewhere:

  3. atsushieno commented on Dec 7, 2017

    @atsushieno
    Contributor

    Not quite like an additional code, but more like metadata fixup trick.

  4. added this to the d15-6 milestone on Dec 8, 2017
  5. ghost locked as resolved and limited conversation to collaborators on Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions