Skip to content

Commit 344b325

Browse files
authored
[Xamarin.AndroidX.Media3.Session] fix OnGetSeesionFromMediaLibraryService typo (#1198)
Fixes: #1195 Fixed a typo in the managedName attribute for the `MediaLibraryService.onGetSession` method binding where "Session" was misspelled as "Seesion". This was causing build errors when developers tried to override the method with the correct spelling. ## Problem When developers attempted to override the `OnGetSessionFromMediaLibraryService` method (with correct spelling), they would get Java errors during build. However, using the misspelled version `OnGetSeesionFromMediaLibraryService` would compile but not build properly. ## Solution - Changed `OnGetSeesionFromMediaLibraryService` to `OnGetSessionFromMediaLibraryService` in `/source/androidx.media3/media3-session/Transforms/Metadata.xml` - This is a minimal, single-character fix that corrects the typo without affecting any other functionality - Removed the problematic `managedReturn` and `managedOverride` attributes from lines 56-67 in Metadata.xml. These were forcing the `onGetSession` method to return `MediaSession` instead of the correct `MediaLibrarySession` type, causing the Java compatibility errors. Now developers can properly override the method using the correct spelling: ```csharp public override MediaLibrarySession OnGetSessionFromMediaLibraryService(MediaSession.ControllerInfo controllerInfo) { // Implementation } ```
1 parent c7b1e74 commit 344b325

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@
13621362
"groupId": "androidx.media3",
13631363
"artifactId": "media3-session",
13641364
"version": "1.7.1",
1365-
"nugetVersion": "1.7.1",
1365+
"nugetVersion": "1.7.1.1",
13661366
"nugetId": "Xamarin.AndroidX.Media3.Session"
13671367
},
13681368
{

source/androidx.media3/media3-session/Transforms/Metadata.xml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,7 @@
5353
>
5454
SetBitmapLoader
5555
</attr>
56-
<attr
57-
path="/api/package[@name='androidx.media3.session']/class[@name='MediaLibraryService']/method[@name='onGetSession' and count(parameter)=1 and parameter[1][@type='androidx.media3.session.MediaSession.ControllerInfo']]"
58-
name="managedReturn"
59-
>
60-
AndroidX.Media3.Session.MediaSession
61-
</attr>
62-
<attr
63-
path="/api/package[@name='androidx.media3.session']/class[@name='MediaLibraryService']/method[@name='onGetSession' and count(parameter)=1 and parameter[1][@type='androidx.media3.session.MediaSession.ControllerInfo']]"
64-
name="managedOverride"
65-
>
66-
override
67-
</attr>
56+
6857
<attr
6958
path="/api/package[@name='androidx.media3.session']/class[@name='MediaSession.Builder']/method[@name='setBitmapLoader' and @jni-return='Landroidx/media3/session/MediaSession$BuilderBase;' and count(parameter)=1 and parameter[1][@type='androidx.media3.common.util.BitmapLoader']]"
7059
name="managedName"
@@ -162,7 +151,7 @@
162151
path="/api/package[@name='androidx.media3.session']/class[@name='MediaLibraryService']/method[@name='onGetSession' and count(parameter)=1 and parameter[1][@type='androidx.media3.session.MediaSession.ControllerInfo']]"
163152
name="managedName"
164153
>
165-
OnGetSeesionFromMediaLibraryService
154+
OnGetSessionFromMediaLibraryService
166155
</attr>
167156
<attr
168157
path="/api/package[@name='androidx.media3.session']/class[@name='MediaLibraryService']/method[@name='onGetSession' and count(parameter)=1 and parameter[1][@type='androidx.media3.session.MediaSession.ControllerInfo']]"

0 commit comments

Comments
 (0)