Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 781f4683 authored by Oli Lan's avatar Oli Lan Committed by Jeff Sharkey
Browse files

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
parent 42cf113d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment