Only set MODE_FOREGROUND when fg app is granted
This changes the code path where we have a pre-Q app that declared a location permissions. In this case the background permission is added as an implicit permission. We never want to automatically extend the grant to the background permission. I.e. If the original permission is granted, we want to switch to foreground mode. If the original permission is revoked, the app-ops state does not matter as everybody is supposed to check for both permission and app-op. Still, setting the app-op to foreground is confusing. Let's not do this. Test: Looked at app-ops state that ... - targets pre-Q - requests location - does not get any permissions pregranted ... and verified that no app-op is set after fresh boot Change-Id: Ic0a6feba98ca553a1ff66cdc348ceb2ca40217ee
Loading
Please register or sign in to comment