Don't crash when attempting to launch an app that has been uninstalled
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user