Skip to content

Conversation

@jpobst
Copy link
Contributor

@jpobst jpobst commented Jan 17, 2023

Fixes #2472

Android.Telecom.InCallService.SetAudioRoute (int) was incorrectly enumified as Android.Telecom.VideoQuality instead of Android.Telecom.CallAudioRoute.

To fix, we need to change the enum map to generate the correct method:

[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android23.0")]
[Register ("setAudioRoute", "(I)V", "", ApiSince = 23)]
public unsafe void SetAudioRoute ([global::Android.Runtime.GeneratedEnum] Android.Telecom.CallAudioRoute route)
{ ... }

For backwards compatibility, we need to add an [Obsolete] overload containing the incorrect enumification:

[Obsolete ("Incorrect enum parameter, use the overload that takes a CallAudioRoute paramter instead.")]
[global::System.Runtime.Versioning.SupportedOSPlatformAttribute ("android23.0")]
public void SetAudioRoute ([global::Android.Runtime.GeneratedEnum] Android.Telecom.VideoQuality route)
{ ... }

The acceptable-breakages is due to the [Register] attribute being moved from the old overload to the corrected overload.

@jpobst jpobst marked this pull request as ready for review January 17, 2023 20:16
@jpobst jpobst requested a review from jonpryor as a code owner January 17, 2023 20:16
@jonpryor jonpryor merged commit 639b216 into main Jan 18, 2023
@jonpryor jonpryor deleted the telecom-enum branch January 18, 2023 02:16
grendello added a commit to grendello/xamarin-android that referenced this pull request Jan 18, 2023
* main:
  [Mono.Android] Android.Telecom.InCallService.SetAudioRoute() + enum (dotnet#7711)
  [Mono.Android] Fix some incorrect enums. (dotnet#7670)
  [Xamarin.Android.Build.Tasks] _Microsoft.Android.Resource.Designer namespace (dotnet#7681)
  LEGO: Merge pull request 7713
  [Xamarin.Android.Build.Tasks] lazily populate Resource lookup (dotnet#7686)
grendello added a commit to grendello/xamarin-android that referenced this pull request Jan 19, 2023
* main:
  [ci] Pass token when building Designer tests (dotnet#7715)
  [Mono.Android] Android.Telecom.InCallService.SetAudioRoute() + enum (dotnet#7711)
  [Mono.Android] Fix some incorrect enums. (dotnet#7670)
  [Xamarin.Android.Build.Tasks] _Microsoft.Android.Resource.Designer namespace (dotnet#7681)
  LEGO: Merge pull request 7713
  [Xamarin.Android.Build.Tasks] lazily populate Resource lookup (dotnet#7686)
grendello added a commit to grendello/xamarin-android that referenced this pull request Jan 26, 2023
* main: (32 commits)
  [monodroid] Replace `exit()` with `abort()` in native code (dotnet#7734)
  Bump to xamarin/Java.Interop/main@8a1ae57 (dotnet#7738)
  [build] bump `$(AndroidNet7Version)` (dotnet#7737)
  Bump to xamarin/Java.Interop/main@1366d99 (dotnet#7718)
  [Xamarin.Android.Build.Tasks] fix AndroidGenerateResourceDesigner (dotnet#7721)
  Bump to xamarin/monodroid@50faac94 (dotnet#7725)
  Revert "[Xamarin.Android.Build.Tasks] fix cases of missing `@(Reference)` (dotnet#7642)" (dotnet#7726)
  [marshal methods] Properly support arrays of arrays (dotnet#7707)
  Bump to dotnet/installer@9962c6a 8.0.100-alpha.1.23063.11 (dotnet#7677)
  [Actions] Add action to bump the hash used for the unified pipeline (dotnet#7712)
  Bump to xamarin/xamarin-android-tools/main@099fd95 (dotnet#7709)
  [ci] Move build stages into yaml templates (dotnet#7553)
  [Xamarin.Android.Build.Tasks] fix NRE in `<GenerateResourceCaseMap/>` (dotnet#7716)
  [ci] Pass token when building Designer tests (dotnet#7715)
  [Mono.Android] Android.Telecom.InCallService.SetAudioRoute() + enum (dotnet#7711)
  [Mono.Android] Fix some incorrect enums. (dotnet#7670)
  [Xamarin.Android.Build.Tasks] _Microsoft.Android.Resource.Designer namespace (dotnet#7681)
  LEGO: Merge pull request 7713
  [Xamarin.Android.Build.Tasks] lazily populate Resource lookup (dotnet#7686)
  [Xamarin.Android.Build.Tasks] skip XA1034 logic in some cases (dotnet#7680)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android.Telecom.InCallService SetAudioRoute(int route)

3 participants