diff --git a/app/src/main/kotlin/jackall/moncalc/utils/RuntimePermissionUtil.kt b/app/src/main/kotlin/jackall/moncalc/utils/RuntimePermissionUtil.kt new file mode 100644 index 0000000..aaaa03d --- /dev/null +++ b/app/src/main/kotlin/jackall/moncalc/utils/RuntimePermissionUtil.kt @@ -0,0 +1,21 @@ +package jackall.moncalc.utils + +import android.content.Context +import android.os.Build +import android.provider.Settings + + +/** + * Created by matsumoto_k on 2017/11/06. + */ +class RuntimePermissionUtil { + + companion object { + fun checkOverlayPermission(context: Context): Boolean { + if (Build.VERSION.SDK_INT < 23) { + return true + } + return Settings.canDrawOverlays(context) + } + } +}