Fix a few issues with foreground service location accesses.
Location access should be allowed only when the UID state is higher than UID_STATE_FOREGROUND_SERVICE_LOCATION. UID_STATE_FOREGROUND_SERVICE should not have location access. Also fixed an issue where MONITOR_LOCATION is allowed for location access from foreground services. Since UID_STATE_FOREGROUND_SERVICE is considered as background for location, and foreground for other ops, we cannot simply use UID state to check the foreground status of an app. Instead, the uid_state <-> op pair needs to be evaluated together. Bug: 128520624 Test: Manually run GNSS logger app to verify Change-Id: I9413e9c6009e38e3d9db57a02e8f0a275119b063
Loading
Please register or sign in to comment