NTP-63234 | dont keep activity event (#16252)

This commit is contained in:
shreyansu raj
2025-05-21 18:43:57 +05:30
committed by GitHub
parent 4742ae8056
commit efe9336394
3 changed files with 29 additions and 0 deletions

View File

@@ -507,4 +507,18 @@ object BaseUtils {
calendar.get(Calendar.YEAR),
)
}
fun isDontKeepActivitiesEnabled(context: Context): Boolean {
return try {
val value =
Settings.Global.getInt(
context.contentResolver,
Settings.Global.ALWAYS_FINISH_ACTIVITIES,
)
value == 1
} catch (e: Exception) {
e.log()
false
}
}
}