-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Changed compile SDK version to 33. #2693
Conversation
Fixed a new error in DrawingBoundaryActivity.kt handling a nullable Location.
if (location != null && location.accuracy <= locationMinAccuracy) { | ||
val addLocation = previousLocation == 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.
curious what was the compile error with earlier code ?
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.
The previousLocation variable is a nullable Location but the distanceTo function won't accept null and generated a compile error. We actually null check previousLocation before entering the code block that calls distanceTo, but it's a class member so the compiler assumes it could be changed from somewhere else in the code. The fix was to simply retrieve the previousLocation into a local prevLocation variable, then null check and use that.
app/build.gradle
Outdated
@@ -249,7 +249,7 @@ android { | |||
|
|||
defaultConfig { | |||
minSdkVersion 21 | |||
targetSdkVersion 31 | |||
targetSdkVersion 33 |
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.
@OrangeAndGreen We can't change the targetSdkVersion without actually making the supporting Android 33 changes that Ahmad is working on. I think we should only be able to change the compileSdkVersion
for incorporating the navigation UI component in code.
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.
Done
…nto dv/compile_sdk_33
@damagatchi Retest this please |
1 similar comment
@damagatchi Retest this please |
Actually Closing this in favour of #2683 as we need to get those changes in anyway. |
Fixed a new error in DrawingBoundaryActivity.kt handling a nullable Location.
Summary
Changed from API 31 to 33 to support future work.
Safety Assurance
Safety story
A new compile error appeared in DrawingBoundaryActivity.kt involving safe usage of a nullable Location, so the code was changed slightly to handle the error.