Don't crash when attempting to launch an app that has been uninstalled

This commit is contained in:
MM20 2022-01-29 19:35:30 +01:00
parent 97ba10d3a7
commit 701ab490d2
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -1,5 +1,6 @@
package de.mm20.launcher2.search.data
import android.content.ActivityNotFoundException
import android.content.ComponentName
import android.content.Context
import android.content.Intent
@ -115,6 +116,8 @@ class LauncherApp(
)
} catch (e: SecurityException) {
return false
} catch (e: ActivityNotFoundException) {
return false
}
}
return true