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

Commit 739c15c7 authored by Mark Harman's avatar Mark Harman
Browse files

Only granting approximate location on Android 12 shouldn't disable geotagging.

parent 552bea7d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -50,6 +50,8 @@
Version 1.50 (Work in progress)

FIXED   HDR photos came out black on some Samsung Galaxy devices with Android 12.
FIXED   Granting only approximate location permission on Android 12 would turn geotagging option
        back off.
FIXED   Gallery icon overlapped with navigation bar if using widescreen resolution with UI in left
        or right handed mode.
ADDED   New debug option Settings/Photo settings/"Enable dummy capture HDR/expo fix". Please enable
+13 −4
Original line number Diff line number Diff line
@@ -311,12 +311,21 @@ public class PermissionHandler {
            case MY_PERMISSIONS_REQUEST_LOCATION:
            {
                // If request is cancelled, the result arrays are empty.
                if( grantResults.length > 0
                if( grantResults.length == 2 && (grantResults[0] == PackageManager.PERMISSION_GRANTED || grantResults[1] == PackageManager.PERMISSION_GRANTED) ) {
                    // On Android 12 users can choose to only grant approximation location. This means
                    // one of the permissions will be denied, but as long as one location permission
                    // is granted, we can still go ahead and use location.
                    // Otherwise we have a problem that if user selects approximate location, we end
                    // up turning the location option back off.
                    if( MyDebug.LOG )
                        Log.d(TAG, "location permission granted [1]");
                    main_activity.initLocation();
                }
                else if( grantResults.length > 0
                    && grantResults[0] == PackageManager.PERMISSION_GRANTED ) {
                    // permission was granted, yay! Do the
                    // contacts-related task you need to do.
                    // in theory this code path is now redundant, but keep here just in case
                    if( MyDebug.LOG )
                        Log.d(TAG, "location permission granted");
                        Log.d(TAG, "location permission granted [2]");
                    main_activity.initLocation();
                }
                else {