-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Context: https://cs.android.com/android/platform/superproject/main/+/main:libcore/ojluni/annotations/hiddenapi/java/lang/Boolean.java;l=109?q=boolean.java Some internal APIs in MAUI were using `java.lang.Boolean` when they could just use `boolean` instead. Java `boolean` is a primitive type, while `java.lang.Boolean` is an object (that can be null). This is similar to `bool` vs `bool?` in C#, except Java does not have `struct`. This avoids: * JNI field lookup of `Boolean.TRUE` and `Boolean.FALSE` on startup * JNI field reads of `Boolean.TRUE` and `Boolean.FALSE` on every `UriImageSource` creation * Creating a C# instance of `Java.Lang.Boolean`, and the bookkeeping for reusing C# instances I was also going to change `ImageLoaderCallback.onComplete`, but it is listed as a public API. This is a small improvement, but should help all `UriImageSource` on Android.
- Loading branch information
1 parent
0117681
commit 48d5ebf
Showing
3 changed files
with
7 additions
and
13 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
Binary file not shown.