mirror of https://github.com/etesync/android
parent
0cda396d20
commit
bbbfbffe59
@ -0,0 +1,15 @@
|
||||
package com.etesync.syncadapter.utils
|
||||
|
||||
import android.content.Context
|
||||
import android.content.pm.PackageManager
|
||||
|
||||
|
||||
fun packageInstalled(context: Context, packageName: String): Boolean {
|
||||
try {
|
||||
context.packageManager.getPackageInfo(packageName, 0)
|
||||
} catch (e: PackageManager.NameNotFoundException) {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
Loading…
Reference in new issue