Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2cc47e01 authored by Ellen Poe's avatar Ellen Poe
Browse files

fix: location permission issued on Android versions prior to 12

parent 6011cb20
Loading
Loading
Loading
Loading
Loading
+3 −7
Original line number Original line Diff line number Diff line
@@ -112,13 +112,9 @@ class MainActivity : ComponentActivity() {
    }
    }


    private fun checkLocationPermission(): Boolean {
    private fun checkLocationPermission(): Boolean {
        return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
        return androidx.core.content.ContextCompat.checkSelfPermission(
            androidx.core.content.ContextCompat.checkSelfPermission(
            this, Manifest.permission.ACCESS_FINE_LOCATION
            this, Manifest.permission.ACCESS_FINE_LOCATION
        ) == android.content.pm.PackageManager.PERMISSION_GRANTED
        ) == android.content.pm.PackageManager.PERMISSION_GRANTED
        } else {
            true
        }
    }
    }


    private fun requestNotificationPermission() {
    private fun requestNotificationPermission() {