Newer
Older
OverlayMultiCounter / app / src / main / kotlin / jackall / overlaymulticounter / utils / RuntimePermissionUtil.kt
MatsumotoKeiju on 10 Nov 2017 456 bytes [add] Runtime permission util
package jackall.overlaymulticounter.utils

import android.content.Context
import android.os.Build
import android.provider.Settings

/**
 * Created by matsumoto_k on 2017/11/10.
 */
class RuntimePermissionUtil {
    companion object {
        fun checkOverlayPermission(context: Context): Boolean {
            if (Build.VERSION.SDK_INT < 23) {
                return true
            }
            return Settings.canDrawOverlays(context)
        }
    }
}