Leku icon indicating copy to clipboard operation
Leku copied to clipboard

TimeZoneApi is called in Main thread resulting in ANR

Open pasmat opened this issue 4 years ago • 0 comments

TimeZoneApi is called in Main thread resulting in ANR

To Reproduce start LocationPickerActivity on slow network, so TimeZoneApi takes long enough to result in ANR

Expected behavior No ANR

Info Required Master branch

  • Do you have the localization permission granted? Yeah

  • Are you sending parameters to the activity through the bundle? Yeah

  • Android monitor shows any log related to the library when the error is shown? Yeah

  • Any other thing that could help me to reproduce the error? Emulate slow network, but isn't required, as network calls shouldn't be executed on main thread anyway.

https://github.com/AdevintaSpain/Leku/blob/6fa60abc6b6ba6560cdac79e6279af210461d493/leku/src/main/java/com/schibstedspain/leku/geocoder/GeocoderPresenter.kt#L113

Runs on Main thread instead of io

Screenshots

Smartphone: All

Additional context

pasmat avatar Feb 24 '21 18:02 pasmat