Replace BLUETOOTH permission checks with checks for BLUETOOTH_CONNECT.
This replaces all of the remaining checks for the BLUETOOTH and BLUETOOTH_ADMIN permissions with checks for the new BLUETOOTH_CONNECT permission (or in some cases, BLUETOOTH_SCAN). Permissions specified in sendBroadcast calls are not changed in this CL, however. PermissionChecker is used for the new checks, which can return hard denial, soft denial, or permission granted. In the case of a soft denial, a default value is returned as appropriate. All of the new checks are done as ForPreflight in this CL, i.e. app ops will be checked but not noted. Changes to make some of the checks ForDataDelivery (i.e. noting the app op) will be made in follow-ups - this requires additional work as the calling package and attribution tag must be plumbed through from the app side. Bug: 183203469 Test: atest AdapterServiceTest; atest A2dpServiceTest; atest GattServiceTest; atest PanServiceTest; atest HidHostServiceTest... Change-Id: I31ad6b16ac3595f45cd2e2afe50c94eabda03e19
Loading
Please register or sign in to comment