Conversation
| <attr api-since="35" path="/api/package[@name='android.media']/class[@name='MediaRouter2']/method[@name='getRouteListingPreference' and count(parameter)=0]" name="propertyName"></attr> | ||
| <attr api-since="35" path="/api/package[@name='android.media']/class[@name='MediaRouter2']/method[@name='setRouteListingPreference' and count(parameter)=1 and parameter[1][@type='android.media.RouteListingPreference']]" name="propertyName"></attr> | ||
|
|
||
| <!-- These new default interface methods on a Listener interface cause duplicate named EventHandlers to be generated, change to a unique name. --> |
There was a problem hiding this comment.
Wouldn't it be better to add eventName metadata to explicitly name the event, vs. renaming the method name itself?
There was a problem hiding this comment.
Unfortunately, it isn't the event itself that is the problem[1], it's the EventHandler name in the internal *ListenerImplementor that is the problem:
[global::Android.Runtime.Register ("mono/android/app/AppOpsManager_OnOpActiveChangedListenerImplementor", ApiSince = 30)]
internal sealed partial class IOnOpActiveChangedListenerImplementor : global::Java.Lang.Object, IOnOpActiveChangedListener
{
public EventHandler<OpActiveChangedEventArgs>? OnOpActiveChangedHandler;
public void OnOpActiveChanged (string op, int uid, string packageName, bool active)
{
var __h = OnOpActiveChangedHandler;
if (__h != null)
__h (sender, new OpActiveChangedEventArgs (op, uid, packageName, active));
}
// Duplicate OnOpActiveChangedHandler
public EventHandler<OpActiveChangedEventArgs>? OnOpActiveChangedHandler;
public void OnOpActiveChanged (string op, int uid, string packageName, string? attributionTag, int virtualDeviceId, bool active, int attributionFlags, int attributionChainId)
{
var __h = OnOpActiveChangedHandler;
if (__h != null)
__h (sender, new OpActiveChangedEventArgs (op, uid, packageName, attributionTag, virtualDeviceId, active, attributionFlags, attributionChainId));
}
}[1] I can't find anything that actually generates events for this listener (ie: no SetOnOpActiveChangedListener method anywhere). If that existed then the event name would likely also be a problem.
There was a problem hiding this comment.
Previously, we have also just removed these new methods, as they are default interface methods, so we could do that here as well:
src/Mono.Android/metadata
Outdated
| <attr api-since="35" path="/api/package[@name='android.media']/class[@name='MediaRouter2']/method[@name='setRouteListingPreference' and count(parameter)=1 and parameter[1][@type='android.media.RouteListingPreference']]" name="propertyName"></attr> | ||
|
|
||
| <!-- These new default interface methods on a Listener interface cause duplicate named EventHandlers to be generated, change to a unique name. --> | ||
| <attr api-since="35" path="/api/package[@name='android.app']/interface[@name='AppOpsManager.OnOpActiveChangedListener']/method[@name='onOpActiveChanged' and count(parameter)=8]" name="managedName">OnOpActiveChanged2</attr> |
There was a problem hiding this comment.
Also not sure I like count(parameter)=8, as if they add an 8-parameter overload in the future, it'll match.
"Safer" would likely to use //method/@jni-signature.
There was a problem hiding this comment.
Updated to use the "full" generated metadata path.
|
Draft commit messages: Context: https://developer.android.com/about/versions/15
Context: https://android-developers.googleblog.com/2024/05/the-second-beta-of-android-15.html
Context: d5b608e8e0c25816d4c5d8df6488ab4d021bd41c
Android 15 Beta 2 was released on 2024-May-15:
* [API-VanillaIceCream Beta 2 vs. API-34][1]
* [API-VanillaIceCream Beta 2 vs. Beta 1][2] (d5b608e8)
The Android 15 Developer Preview [Timeline and updates][0] section
suggests the following timeline:
* Feb/Mar: Developer Previews
* April/May: Unstable Betas
* June/July: Stable Betas with a [Platform Stability milestone][3]
expected in Beta 3
* ???: Final
Beta 2 be usable in its preview form to .NET 9 Preview 5 users who
explicitly target `net9.0-android35`.
[0]: https://web.archive.org/web/20240514210701/https://developer.android.com/about/versions/15/overview#timeline
[1]: https://developer.android.com/sdk/api_diff/v-beta2/changes
[2]: https://developer.android.com/sdk/api_diff/v-beta2-incr/changes
[3]: https://web.archive.org/web/20240514210701/https://developer.android.com/about/versions/15/overview#platform_stability |
* main: Localized file check-in by OneLocBuild Task (#8974) Bump to xamarin/xamarin-android-binutils/L_18.1.6-8.0.0@97b574b (#8969) [Mono.Android] Bind API-VanillaIceCream Beta 2 (#8948) [ci] Update OneLocBuildToken (#8973) [s360] Ignore irrelevant lz4+Python warnings (#8962) LEGO: Merge pull request 8971 Localized file check-in by OneLocBuild Task (#8963) [ci] Use long version for maestro publishing (#8964) Localized file check-in by OneLocBuild Task (#8957) LEGO: Merge pull request 8958
Context: https://developer.android.com/about/versions/15
Context: https://android-developers.googleblog.com/2024/05/the-second-beta-of-android-15.html
Android 15 Beta 2 has been released. The Android 15
Developer Preview Program Overview Timeline and updates section
suggests the following timeline:
This will be usable in its preview form to .NET 9 Preview users who explicitly target
net9.0-android35.