OSDN Git Service

Implement more location checks
authorHall Liu <hallliu@google.com>
Tue, 27 Nov 2018 22:36:51 +0000 (14:36 -0800)
committerHall Liu <hallliu@google.com>
Wed, 13 Feb 2019 19:07:37 +0000 (11:07 -0800)
commitee313737e970e95c77cdc229c315dd2c0e8551ce
tree76a7f102c0308940ef0e4ba8557ed1454dcb8e37
parent3fdbf46ac172de22670d7faa824c2fcda19168ec
Implement more location checks

Make the following modifications to APIs and required permissions.
Move the following APIs from checking coarse permission to fine
permission (except for apps targeting pre-Q):
TelephonyManager.getCellLocation()
(deprecated) TelephonyManager.getNeighboringCellInfo()
TelephonyManager.getAllCellInfo()
TelephonyManager.requestCellInfoUpdate()
PhoneStateListener#onCellLocationChanged
PhoneStateListener#onCellInfoChanged

Start checking for fine permission on the following APIs:
(Note -- these will only be logged, not denied until a future CL)
TelephonyManager.requestNetworkScan()
TelephonyScanManager.requestNetworkScan()
NetworkScanCallback#onResults

Start checking for coarse permission on the following APIs:
(Note -- these will only be logged, not denied until a future CL)
TelephonyManager#getAvailableNetworks
TelephonyManager#getServiceStateForSubscriber and #getServiceState
PhoneStateListener#onServiceStateChanged

Bug: 116258458
Test: manual via testapps
Change-Id: I45326ddacbcf538da50ca544d67eed12cf0c0861
api/current.txt
api/removed.txt
api/system-current.txt
services/core/java/com/android/server/TelephonyRegistry.java
telephony/java/android/telephony/LocationAccessPolicy.java
telephony/java/android/telephony/NetworkRegistrationState.java
telephony/java/android/telephony/ServiceState.java
telephony/java/android/telephony/TelephonyManager.java
telephony/java/android/telephony/TelephonyScanManager.java
telephony/java/com/android/internal/telephony/ITelephony.aidl