Skip to content

Commit

Permalink
why did i lock it to s_v2 anyways
Browse files Browse the repository at this point in the history
  • Loading branch information
qimiko committed Feb 17, 2024
1 parent 645ed77 commit 92c8c71
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/main/java/com/geode/launcher/utils/GeodeUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ object GeodeUtils {
}

// only necessary on newer android versions
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.S_V2) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
internalRequestAllFilesLauncher = activity.registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { _ ->
if (Environment.isExternalStorageManager()) {
afterRequestPermissions?.invoke()
Expand Down Expand Up @@ -219,7 +219,7 @@ object GeodeUtils {
private external fun failedCallback()

private fun checkForFilePermissions(onSuccess: () -> Unit, onFailure: () -> Unit) {
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.S_V2) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
if (Environment.isExternalStorageManager()) {
onSuccess()
} else {
Expand Down Expand Up @@ -376,7 +376,7 @@ object GeodeUtils {
val context = activity.get() ?: return false

return when (permission) {
MANAGE_ALL_FILES -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S_V2) {
MANAGE_ALL_FILES -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
Environment.isExternalStorageManager()
} else {
val permissions = listOf(
Expand Down

0 comments on commit 92c8c71

Please sign in to comment.