Loading build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionName = '3.14.6' propVersionName = '3.14.7' kotlin_version = '1.2.30' support_libs = '27.1.0' } Loading commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context.kt +11 −9 Original line number Diff line number Diff line Loading @@ -103,15 +103,6 @@ val Context.baseConfig: BaseConfig get() = BaseConfig.newInstance(this) val Context.sdCardPath: String get() = baseConfig.sdCardPath val Context.internalStoragePath: String get() = baseConfig.internalStoragePath fun Context.isThankYouInstalled(): Boolean { return try { packageManager.getPackageInfo("com.simplemobiletools.thankyou", 0) true } catch (e: Exception) { false } } @SuppressLint("InlinedApi", "NewApi") fun Context.isFingerPrintSensorAvailable() = isMarshmallowPlus() && Reprint.isHardwarePresent() Loading Loading @@ -351,3 +342,14 @@ fun Context.getUriMimeType(path: String, newUri: Uri): String { } return mimeType } fun Context.isThankYouInstalled() = isPackageInstalled("com.simplemobiletools.thankyou") fun Context.isPackageInstalled(pkgName: String): Boolean { return try { packageManager.getPackageInfo(pkgName, 0) true } catch (e: Exception) { false } } Loading
build.gradle +1 −1 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ buildscript { propMinSdkVersion = 16 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionName = '3.14.6' propVersionName = '3.14.7' kotlin_version = '1.2.30' support_libs = '27.1.0' } Loading
commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context.kt +11 −9 Original line number Diff line number Diff line Loading @@ -103,15 +103,6 @@ val Context.baseConfig: BaseConfig get() = BaseConfig.newInstance(this) val Context.sdCardPath: String get() = baseConfig.sdCardPath val Context.internalStoragePath: String get() = baseConfig.internalStoragePath fun Context.isThankYouInstalled(): Boolean { return try { packageManager.getPackageInfo("com.simplemobiletools.thankyou", 0) true } catch (e: Exception) { false } } @SuppressLint("InlinedApi", "NewApi") fun Context.isFingerPrintSensorAvailable() = isMarshmallowPlus() && Reprint.isHardwarePresent() Loading Loading @@ -351,3 +342,14 @@ fun Context.getUriMimeType(path: String, newUri: Uri): String { } return mimeType } fun Context.isThankYouInstalled() = isPackageInstalled("com.simplemobiletools.thankyou") fun Context.isPackageInstalled(pkgName: String): Boolean { return try { packageManager.getPackageInfo(pkgName, 0) true } catch (e: Exception) { false } }