Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android.Telecom.RemoteConference has wrong type #1087

Closed
jonpryor opened this issue Dec 7, 2017 · 3 comments
Closed

Android.Telecom.RemoteConference has wrong type #1087

jonpryor opened this issue Dec 7, 2017 · 3 comments
Assignees
Labels
Area: xamarin-android Build Issues building the xamarin-android repo *itself*.
Milestone

Comments

@jonpryor
Copy link
Member

jonpryor commented Dec 7, 2017

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

@jonpryor jonpryor added the Area: xamarin-android Build Issues building the xamarin-android repo *itself*. label Dec 7, 2017
@atsushieno
Copy link
Contributor

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

@jonpryor
Copy link
Member Author

jonpryor commented Dec 7, 2017

@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:

@atsushieno
Copy link
Contributor

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

atsushieno added a commit to atsushieno/xamarin-android that referenced this issue Dec 7, 2017
…et#1087)

See the github comments on the issue details.

To solve the issue, we introduce a "fake" mapping fixup in enumification-helpers.

Use "force-api-level" mapping information to override the correct API Level
information to generate modified map(.ext).csv.

methodmap.csv is also fixed to (1) remove old mapping for 24 and (2) change
the mapping for 25 down to 24 too.
@jonpryor jonpryor added this to the d15-6 milestone Dec 8, 2017
jonpryor added a commit to jonpryor/xamarin-android that referenced this issue May 13, 2020
Changes: xamarin/monodroid@cc88a89...52312f2

  * xamarin/monodroid@52312f241: Bump to xamarin/androidtools@d5b9818 (dotnet#1092)
  * xamarin/monodroid@0642b39a2: Bump to xamarin/xamarin-android/master@a01756 (dotnet#1087)
  * xamarin/monodroid@b892bc96b: [tools/RuntimeService] base versionCode off xamarin-android (dotnet#1088)
jonpryor added a commit to jonpryor/xamarin-android that referenced this issue May 13, 2020
Changes: xamarin/monodroid@9242fa4...e50ff9a

  * xamarin/monodroid@e50ff9a43: Bump to xamarin/androidtools@ff35fa96 (dotnet#1092)
  * xamarin/monodroid@3d4f171a0: Bump to xamarin/xamarin-android/master@a01756 (dotnet#1087)
  * xamarin/monodroid@5560daf55: [tools/RuntimeService] base versionCode off xamarin-android (dotnet#1088)
jonpryor added a commit that referenced this issue May 14, 2020
Changes: xamarin/monodroid@cc88a89...52312f2

  * xamarin/monodroid@52312f241: Bump to xamarin/androidtools@d5b9818 (#1092)
  * xamarin/monodroid@0642b39a2: Bump to xamarin/xamarin-android/master@a01756 (#1087)
  * xamarin/monodroid@b892bc96b: [tools/RuntimeService] base versionCode off xamarin-android (#1088)
jonpryor added a commit to jonpryor/xamarin-android that referenced this issue May 14, 2020
Changes: xamarin/monodroid@9242fa4...e50ff9a

  * xamarin/monodroid@e50ff9a43: Bump to xamarin/androidtools@ff35fa96 (dotnet#1092)
  * xamarin/monodroid@3d4f171a0: Bump to xamarin/xamarin-android/master@a01756 (dotnet#1087)
  * xamarin/monodroid@5560daf55: [tools/RuntimeService] base versionCode off xamarin-android (dotnet#1088)
jonpryor added a commit to jonpryor/xamarin-android that referenced this issue May 14, 2020
Changes: xamarin/monodroid@9242fa4...5849ea1

  * xamarin/monodroid@5849ea107 [tests] Fix build from xamarin-android (dotnet#1093)
  * xamarin/monodroid@e50ff9a43: Bump to xamarin/androidtools@ff35fa96 (dotnet#1092)
  * xamarin/monodroid@3d4f171a0: Bump to xamarin/xamarin-android/master@a01756 (dotnet#1087)
  * xamarin/monodroid@5560daf55: [tools/RuntimeService] base versionCode off xamarin-android (dotnet#1088)
jonpryor added a commit that referenced this issue May 14, 2020
Changes: xamarin/monodroid@9242fa4...5849ea1

  * xamarin/monodroid@5849ea107 [tests] Fix build from xamarin-android (#1093)
  * xamarin/monodroid@e50ff9a43: Bump to xamarin/androidtools@ff35fa96 (#1092)
  * xamarin/monodroid@3d4f171a0: Bump to xamarin/xamarin-android/master@a01756 (#1087)
  * xamarin/monodroid@5560daf55: [tools/RuntimeService] base versionCode off xamarin-android (#1088)
@ghost ghost locked as resolved and limited conversation to collaborators Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: xamarin-android Build Issues building the xamarin-android repo *itself*.
Projects
None yet
Development

No branches or pull requests

2 participants