Check permissions when registering a scan pending intent

Check the permissions when registering and use them when
starting the scan.

Bug: 65013767
Test: Manually modify the cts test to not include the permission
   and ensure the scan results are not delivered.

Change-Id: Id9322182ae65a3e5fc5158a09d77c7ca28b2be2d
2 files changed