-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geolocation: Add #nullable for Essentials Geolocation code #13371
Conversation
Hey there @vividos! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
|
||
static LocationManager LocationManager => | ||
static LocationManager? LocationManager => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if LocationManager can ever be null on a sane Android environment, but there might be some weird custom ROMs; I guess the best is to throw FeatureNotSupportedException
then...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jfversluis there are still my three questions...
{ | ||
if (provider == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as ILocationListener has the provider
parameter marked with string?, provider may theoretically be null, but from reading the Android documentation, it makes no sense to be null. Therefore I just return here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jfversluis the second...
@@ -183,7 +185,7 @@ public void StopListeningForeground() | |||
listener.ErrorHandler = null; | |||
} | |||
|
|||
listeningManager.Delegate = null; | |||
listeningManager.WeakDelegate = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure setting the WeakDelegate
is the proper thing to do here, but since the Delegate
now is non-nullable, it can't be set to null anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jfversluis the third...
@jfversluis Here's the rest of the changes I mentioned. I added some comments to the changes that we should discuss. |
@mandel-macaque Thanks for the review comments! I addressed all apart from two; see my above comments. Also I have three original comments attached to the code, which we also should discuss. |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
Amazing @vividos thank you! If you're looking for something after this... We might want to enable nullable on the project level and then add Besides the other feedback there is these build errors:
|
I'll check out the Tizen build error. |
Hey I don't blame you! I can only be happy that you not only help yourself out, but also others in the process. So thank you for doing this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree on the ones left as they where, there is a missing comment to be address (probably github hide it by mistake).
fixed the Tizen errors and still waiting opinions on my three comments from Feb. 15th. |
Azure Pipelines successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vividos I took the liberty to do a commit fixing some forgotten == null and != null.
/azp run |
There's still the three code comments... |
Azure Pipelines successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the rest of your comments are valid, so LGTM! Thank you!
Ah sorry I didn't see you comment. Sorry for the noise! |
) * enabled nullable checks for GeolocationRequest class * enabled nullable checks for more Geolocation source files * enabled nullable checks for Geolocation Android and iOS implementation * changed null checks as suggested in review * fixed nullable errors for Tizen * Fix some forgotte == null * Fix some forgotte != null --------- Co-authored-by: Manuel de la Pena <[email protected]>
) * enabled nullable checks for GeolocationRequest class * enabled nullable checks for more Geolocation source files * enabled nullable checks for Geolocation Android and iOS implementation * changed null checks as suggested in review * fixed nullable errors for Tizen * Fix some forgotte == null * Fix some forgotte != null --------- Co-authored-by: Manuel de la Pena <[email protected]>
Description of Change
This PR is a follow-up to #9572 and adds
#nullable enable
to the remaining Essentials' Geolocation classes.Issues Fixed
No issue, but follow-up code changes left over from #9572.