diff --git a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/QuickSnoozeActivity.kt b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/QuickSnoozeActivity.kt index bb36a43221..40a8f690e9 100644 --- a/wear/src/main/java/info/nightscout/androidaps/interaction/actions/QuickSnoozeActivity.kt +++ b/wear/src/main/java/info/nightscout/androidaps/interaction/actions/QuickSnoozeActivity.kt @@ -41,9 +41,9 @@ class QuickSnoozeActivity : DaggerActivity() { finish() } - private fun isPackageExisted(targetPackage: String?): Boolean { + private fun isPackageExisted(targetPackage: String): Boolean { try { - packageManager.getPackageInfo(targetPackage!!, PackageManager.GET_META_DATA) + packageManager.getPackageInfo(targetPackage, PackageManager.GET_META_DATA) } catch (e: PackageManager.NameNotFoundException) { return false }