You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
}
```
Copy file name to clipboardExpand all lines: source/androidx.media3/media3-session/Transforms/Metadata.xml
+2-13Lines changed: 2 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -53,18 +53,7 @@
53
53
>
54
54
SetBitmapLoader
55
55
</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
+
68
57
<attr
69
58
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']]"
70
59
name="managedName"
@@ -162,7 +151,7 @@
162
151
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']]"
163
152
name="managedName"
164
153
>
165
-
OnGetSeesionFromMediaLibraryService
154
+
OnGetSessionFromMediaLibraryService
166
155
</attr>
167
156
<attr
168
157
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