PBAP: Convert notifications to use NotificationChannel
Test Setup:
===========
HW DUT: Pixel O
Remote1: MecApp PBAP Client
Steps:
=====
1. Enable BT on DUT and bond with Remote.
2. Connect from MecApp PBAP Client Tab and observe.(Request
Authentication checkbox enabled in MecApp).
Expected Result:
================
Device should connect successfully.
Actual Result:
===========
In Step2, "The remote PBAP server did not accept the connect request error
popup is displayed."
Reproducibility:
===========
5/5
Log trace:
Line 6855: 05-08 14:04:23.453 10051 11015 D BluetoothPbapService:
Pbap state 0 -> 2, result = 1
Line 6868: 05-08 14:04:23.465 1615 1751 E NotificationService:
Cannot post notification
without channel ID when targeting O - notification=Notification
(pri=0 contentView=null vibrate=null
sound=default tick defaults=0x1 flags=0x18 color=0xff607d8b vis=PRIVATE)
Line 6947: 05-08 14:04:33.471 10051 10051 W BluetoothPbapService:
Release Wake Lock
Line 7155: 05-08 14:04:53.491 10051 11492 D BluetoothPbapObexServer:
onClose(): msg MSG_SERVERSESSION_CLOSE sent out.
Line 7172: 05-08 14:04:53.509 10051 10051 D BluetoothPbapService:
Pbap state 2 -> 0, result = 1
Root Cause:
In Android O, Bluetooth notifications are hidden by default.
This must be changed to use notification channels so that the
priority of the notifications can be updated.
Test: PBAP connection works fine when remote sends authentication
challenge.
Bug: 38149308
Change-Id: Ifff0a81912f1bf11edc73279a9a127b791188d02
2 files changed