Add SharedPrefs helper class to access shared preferences
This commit is contained in:
BinTianqi
2025-02-07 15:51:01 +08:00
parent 5e18c2684c
commit 5e109d74b1
17 changed files with 140 additions and 125 deletions

View File

@@ -74,8 +74,7 @@ class Receiver : DeviceAdminReceiver() {
override fun onTransferOwnershipComplete(context: Context, bundle: PersistableBundle?) {
super.onTransferOwnershipComplete(context, bundle)
val sp = context.getSharedPreferences("data", Context.MODE_PRIVATE)
sp.edit().putBoolean("dhizuku", false).apply()
SharedPrefs(context).dhizuku = false
}
override fun onLockTaskModeEntering(context: Context, intent: Intent, pkg: String) {