mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-13 03:41:19 +08:00
时钟总开关绑定事件
This commit is contained in:
File diff suppressed because one or more lines are too long
14
app/src/main/java/com/lt2333/simplicitytools/util/SPUtils.kt
Normal file
14
app/src/main/java/com/lt2333/simplicitytools/util/SPUtils.kt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package com.lt2333.simplicitytools.util
|
||||||
|
import android.annotation.SuppressLint
|
||||||
|
import android.content.Context
|
||||||
|
|
||||||
|
|
||||||
|
object SPUtils {
|
||||||
|
@SuppressLint("WorldReadableFiles")
|
||||||
|
fun getBoolean(context: Context, key: String, defValue: Boolean): Boolean {
|
||||||
|
val pref = context.getSharedPreferences("config",Context.MODE_WORLD_READABLE)
|
||||||
|
return pref.getBoolean(key, defValue)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user