diff --git a/app/src/main/java/com/vanced/manager/core/downloader/MicrogDownloadService.kt b/app/src/main/java/com/vanced/manager/core/downloader/MicrogDownloadService.kt index c9476f6f..e8ceeee3 100644 --- a/app/src/main/java/com/vanced/manager/core/downloader/MicrogDownloadService.kt +++ b/app/src/main/java/com/vanced/manager/core/downloader/MicrogDownloadService.kt @@ -28,10 +28,7 @@ class MicrogDownloadService: Service() { try { downloadMicrog() } catch (e: Exception) { - when (e) { - is ExecutionException, is InterruptedException, is IllegalStateException -> Toast.makeText(this, "Unable to download MicroG", Toast.LENGTH_SHORT).show() - else -> throw e - } + Toast.makeText(this, "Unable to download MicroG", Toast.LENGTH_SHORT).show() } stopSelf() return START_NOT_STICKY diff --git a/app/src/main/java/com/vanced/manager/core/downloader/VancedDownloadService.kt b/app/src/main/java/com/vanced/manager/core/downloader/VancedDownloadService.kt index 728a6f53..d54b6265 100644 --- a/app/src/main/java/com/vanced/manager/core/downloader/VancedDownloadService.kt +++ b/app/src/main/java/com/vanced/manager/core/downloader/VancedDownloadService.kt @@ -31,11 +31,7 @@ class VancedDownloadService: Service() { try { downloadSplits() } catch (e: Exception) { - when (e) { - is ExecutionException, is InterruptedException, is IllegalStateException -> Toast.makeText(this, "Unable to download Vanced", Toast.LENGTH_SHORT).show() - else -> throw e - } - + Toast.makeText(this, "Unable to download Vanced", Toast.LENGTH_SHORT).show() } stopSelf() return START_NOT_STICKY diff --git a/app/src/main/java/com/vanced/manager/utils/InternetTools.kt b/app/src/main/java/com/vanced/manager/utils/InternetTools.kt index 9d92d4fd..ca6967fb 100644 --- a/app/src/main/java/com/vanced/manager/utils/InternetTools.kt +++ b/app/src/main/java/com/vanced/manager/utils/InternetTools.kt @@ -46,11 +46,7 @@ object InternetTools { try { GetJson().AsJSONObject("$installUrl/$json").get(obj).asInt } catch (e: Exception) { - when (e) { - is InterruptedException, is ExecutionException -> GetJson().AsJSONObject("https://x1nto.github.io/VancedFiles/$json").get(obj).asInt - else -> throw e - } - + GetJson().AsJSONObject("https://x1nto.github.io/VancedFiles/$json").get(obj).asInt } } else 0 }