-
Notifications
You must be signed in to change notification settings - Fork 532
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Microsoft.Android.Sdk.ILLink] preserve types with `IJniNameProviderA…
…ttribute` (#9099) Fixes: #8940 Context: TobiasBuchholz/Plugin.Firebase#144 Using the NuGet package: <PackageReference Include="Plugin.Firebase.CloudMessaging" Version="3.0.0" /> Includes a service: namespace Plugin.Firebase.CloudMessaging.Platforms.Android; [Service(Exported = true)] [IntentFilter(new[] { "com.google.firebase.MESSAGING_EVENT" })] public class MyFirebaseMessagingService : FirebaseMessagingService Unfortunately, using `TrimMode=full` completely trims away the above service, which is required for push notifications to work. I could reproduce this problem in a test using the above NuGet package. To fix this, we can modify `MarkJavaObjects` to preserve types with attributes that implement `Java.Interop.IJniNameProviderAttribute`, and the new test now passes. With one exception, `Android.Runtime.RegisterAttribute`, should not be preserved as that would be any Java type bound for C#.
- Loading branch information
1 parent
83626c9
commit 611c269
Showing
2 changed files
with
72 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters