PBAP: Split startSocketListeners()
* Rename startSocketListeners() to prepareServerSocket().
* prepareServerSocket() is only used to indicate it can accept a
new connection. It no longer
- disconnects current OBEX session;
- starts the server socket;
- makes SDP record;
- calls BluetoothPbapUtils.fetchPbapParams().
* Instead, the callers of startSocketListeners() handle the rest:
- service.start() explicitly starts the server socket, makes SDP
record, and calls fetchPbapParams();
- stopObexServerSession() just disconnects the current OBEX session
and indicates that it is OK to accept a new connection;
- onAcceptFailed() closes the server socket, cleans up SDP record,
and then does the same thing as server.start().
Test: carkit with PBAP
Bug: 69417672
Change-Id: Ib5fe14835a77b0de69d476a74227fa6f78bfa698
Loading
Please register or sign in to comment