[android] Simplify some code using java.time #7494

Merged
Isira-Seneviratne merged 4 commits from java.time into master 2024-03-06 09:39:57 +00:00
Isira-Seneviratne commented 2024-03-01 02:31:15 +00:00 (Migrated from github.com)
  • Enable core library desugaring to backport java.time for Android versions below 8.0.
  • Simplify some code using java.time's functionality.
* Enable [core library desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) to backport `java.time` for Android versions below 8.0. * Simplify some code using `java.time`'s functionality.
rtsisyk reviewed 2024-03-01 02:31:15 +00:00
Jean-BaptisteC (Migrated from github.com) approved these changes 2024-03-02 08:31:05 +00:00
Jean-BaptisteC (Migrated from github.com) left a comment

Lenovo Yoga Tab 2 - Android 5

✅ Lenovo Yoga Tab 2 - Android 5
biodranik (Migrated from github.com) reviewed 2024-03-04 23:29:20 +00:00
biodranik (Migrated from github.com) left a comment

Were all modifications tested? Does the date look OK everywhere? Do kayak links work?

Were all modifications tested? Does the date look OK everywhere? Do kayak links work?
biodranik (Migrated from github.com) commented 2024-03-04 23:25:38 +00:00

Why linter is not aware of desugaring?

Why linter is not aware of desugaring?
biodranik (Migrated from github.com) commented 2024-03-04 23:26:56 +00:00

How did you find which methods should be replaced?

How did you find which methods should be replaced?
Isira-Seneviratne (Migrated from github.com) reviewed 2024-03-04 23:55:47 +00:00
Isira-Seneviratne (Migrated from github.com) commented 2024-03-04 23:55:47 +00:00

That's for the builder constructor (it's marked as requiring API level 26 due to the ZonedDateTime parameter).

Enabling desugaring makes the linter not generate warnings for the new APIs.

That's for the builder constructor (it's marked as requiring API level 26 due to the `ZonedDateTime` parameter). Enabling desugaring makes the linter not generate warnings for the new APIs.
Isira-Seneviratne (Migrated from github.com) reviewed 2024-03-04 23:57:29 +00:00
Isira-Seneviratne (Migrated from github.com) commented 2024-03-04 23:57:29 +00:00
I checked the code for `TravelEstimate.Builder`, and it included a constructor that accepted a `ZonedDateTime`: https://developer.android.com/reference/kotlin/androidx/car/app/navigation/model/TravelEstimate.Builder#Builder(androidx.car.app.model.Distance,java.time.ZonedDateTime)
biodranik (Migrated from github.com) reviewed 2024-03-05 22:49:47 +00:00
biodranik (Migrated from github.com) commented 2024-03-05 22:49:47 +00:00

Did you test your changes, including AA, on devices older than API 26?

Did you test your changes, including AA, on devices older than API 26?
Isira-Seneviratne (Migrated from github.com) reviewed 2024-03-05 23:51:31 +00:00
Isira-Seneviratne (Migrated from github.com) commented 2024-03-05 23:51:31 +00:00

I'm getting this list of errors when building:
Build error.txt

I'm getting this list of errors when building: [Build error.txt](https://github.com/organicmaps/organicmaps/files/14502746/Build.error.txt)
This repo is archived. You cannot comment on pull requests.
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#7494
No description provided.