-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
Use AltitudeConverterCompat instead of custom solution. #1931
Conversation
46937a3
to
12a13a8
Compare
Android core location does include the data into the APK ( This will reduce the APK size by ~17MB. |
@gdt if you have time, it would be great if you could try this out :) |
12a13a8
to
ad18eed
Compare
Haven't used OpenTracks for some time. I checked out this branch and went for a walk I tried to start it again and got this error: App information
Device information
Firmware
Cause of errorException in thread "main": java.lang.IllegalStateException: Cannot access database on the main thread since it may potentially lock the UI for a long period of time.
at androidx.room.RoomDatabase.assertNotMainThread(RoomDatabase.java:469)
at androidx.room.RoomDatabase.query(RoomDatabase.java:525)
at androidx.room.util.DBUtil.query(DBUtil.java:86)
at androidx.core.location.altitude.impl.db.MapParamsDao_Impl.getCurrent(MapParamsDao_Impl.java:29)
at androidx.core.location.altitude.impl.GeoidHeightMap.getParams(GeoidHeightMap.java:93)
at androidx.core.location.altitude.impl.AltitudeConverter.addMslAltitudeToLocation(AltitudeConverter.java:199)
at androidx.core.location.altitude.AltitudeConverterCompat.addMslAltitudeToLocation(AltitudeConverterCompat.java:86)
at de.dennisguse.opentracks.services.handlers.AltitudeCorrectionManager.correctAltitude(AltitudeCorrectionManager.java:29)
at de.dennisguse.opentracks.services.TrackRecordingManager.getDataForUI(TrackRecordingManager.java:128)
at de.dennisguse.opentracks.services.TrackRecordingService.updateRecordingDataWhileRecording(TrackRecordingService.java:307)
at de.dennisguse.opentracks.services.TrackRecordingService.-$$Nest$mupdateRecordingDataWhileRecording(Unknown Source:0)
at de.dennisguse.opentracks.services.TrackRecordingService$1.run(TrackRecordingService.java:76)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8762)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) |
@pstorch I just realized that I was using the SDK34 emulator all the time and there the fallback isn't used.... |
@pstorch I reported this: https://issuetracker.google.com/issues/195660815#comment21 |
ad18eed
to
a811010
Compare
@pstorch I added some |
I'll give it a try. |
The bug from last time is gone. I found another, but this is already in the main branch. |
@pstorch which one? :D |
The crash I reported here: |
Fixes #1920.
Implements fallback to EGM2008 up until API33 using Android's core library.
Aspects: