Problem : Maps search crash when no Internet available
Expected : Not crash instead give a warning.
Stacktrace
Process: com.gasturah, PID: 7923 java.lang.Error: java.io.IOException: grpc failed at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1173) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) Caused by: java.io.IOException: grpc failed at android.location.Geocoder.getFromLocationName(Geocoder.java:178) at com.gasturah.ui.location.MapsFragment.searchLocation(MapsFragment.kt:143) at com.gasturah.ui.location.MapsFragment.access$searchLocation(MapsFragment.kt:38) at com.gasturah.ui.location.MapsFragment$setupAction$3.onQueryTextSubmit$lambda-0(MapsFragment.kt:106) at com.gasturah.ui.location.MapsFragment$setupAction$3.$r8$lambda$mnbIZZ8oap-cNK245qpDBVrouYM(Unknown Source:0) at com.gasturah.ui.location.MapsFragment$setupAction$3$$ExternalSyntheticLambda0.run(Unknown Source:8)
Problem : Maps search crash when no Internet available Expected : Not crash instead give a warning.
Stacktrace
Process: com.gasturah, PID: 7923 java.lang.Error: java.io.IOException: grpc failed at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1173) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) Caused by: java.io.IOException: grpc failed at android.location.Geocoder.getFromLocationName(Geocoder.java:178) at com.gasturah.ui.location.MapsFragment.searchLocation(MapsFragment.kt:143) at com.gasturah.ui.location.MapsFragment.access$searchLocation(MapsFragment.kt:38) at com.gasturah.ui.location.MapsFragment$setupAction$3.onQueryTextSubmit$lambda-0(MapsFragment.kt:106) at com.gasturah.ui.location.MapsFragment$setupAction$3.$r8$lambda$mnbIZZ8oap-cNK245qpDBVrouYM(Unknown Source:0) at com.gasturah.ui.location.MapsFragment$setupAction$3$$ExternalSyntheticLambda0.run(Unknown Source:8)