Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2019ac8f authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

refactor: improve exception catching

parent 1058e7cc
Loading
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -47,8 +47,9 @@ class SystemAppsUpdatesRepository @Inject constructor(

    private val androidVersionCode by lazy {
        try { getAndroidVersionCodeChar() }
        catch (exception: RuntimeException) {
            Timber.w(exception.message)
        catch (exception: UnsupportedAndroidApiException) {
            Timber.w(exception.message,
                "Android API isn't in supported range to update some system apps")
            "UnsupportedAndroidAPI"
        }
    }