Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Fix #1999 - checkasync should return restricted for locationinuse whe… #2005

Merged
merged 2 commits into from
May 6, 2022
Merged

Fix #1999 - checkasync should return restricted for locationinuse whe… #2005

merged 2 commits into from
May 6, 2022

Conversation

aritchie
Copy link
Contributor

@aritchie aritchie commented May 3, 2022

Description of Change

Ensuring Permissions.LocationWhenInUse.CheckAsync on Android returns Restricted if only coarse permission is granted

Bugs Fixed

API Changes

LocationWhenInUse & pulled out CheckSelfPermission out of the loop so it can be used for individual checks

Changed:

Since CheckSelfPermission was moved to DoCheck, BasePlatformPermission.CheckStatusAsync had it's loop code pointed at new method.

LocationWhenInUse overrides CheckAsync now

Behavioral Changes

If AccessFineLocation is denied, but AccessCoarseLocation is granted - PermissionStatus.Restricted is now returned

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of main at time of PR
  • Changes adhere to coding standard
  • Updated documentation (see walkthrough)

@jfversluis jfversluis added this to the 1.7.3 milestone May 4, 2022
@Cheesebaron
Copy link
Contributor

Cheesebaron commented May 6, 2022

Seems to work!
Screenshot_1651830213
Screenshot_1651830216
Screenshot_1651830219

I made a small test project for this here: https://github.com/Cheesebaron/EssentialsLocationPermissionTest

@jfversluis
Copy link
Member

Thanks so much @Cheesebaron @aritchie <3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Android 12 Coarse Location Permission is returning Denied Status
3 participants