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

Commit 313bb770 authored by Ellen Poe's avatar Ellen Poe
Browse files

Merge branch 'ellenhp/fix_android_12_location_bug' into 'main'

Fix location permission request issues on Android versions prior to 12

See merge request e/os/cardinal!27
parents 6011cb20 2cc47e01
Loading
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -112,13 +112,9 @@ class MainActivity : ComponentActivity() {
    }

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

    private fun requestNotificationPermission() {