From 0d7739c7612fedc80bad063540258c9e82e86a5c Mon Sep 17 00:00:00 2001 From: Jonathan Klee Date: Wed, 10 May 2023 15:56:50 +0200 Subject: [PATCH] Try to catch a RemoteException thrown by setTestProviderLocation() when the network provider does not exist. --- .../e/blisslauncher/features/weather/WeatherUpdater.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/foundation/e/blisslauncher/features/weather/WeatherUpdater.java b/app/src/main/java/foundation/e/blisslauncher/features/weather/WeatherUpdater.java index ad404d3977..a9b1f1b595 100644 --- a/app/src/main/java/foundation/e/blisslauncher/features/weather/WeatherUpdater.java +++ b/app/src/main/java/foundation/e/blisslauncher/features/weather/WeatherUpdater.java @@ -125,7 +125,11 @@ public class WeatherUpdater { ? new FusedLocationFetcher(mWeakContext.get(), this::onNewLocationFetched) : new NetworkGpsLocationFetcher(mWeakContext.get(), this::onNewLocationFetched); - locationFetcher.fetchLocation(); + try { + locationFetcher.fetchLocation(); + } catch (Exception exception) { + Timber.tag(TAG).w(exception, "Could not fetch location"); + } } protected boolean hasMissingPermissions() { -- GitLab