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

Skip to content
Commit e48a80aa authored by Hansong Zhang's avatar Hansong Zhang Committed by Myles Watson
Browse files

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
parent 7c156f68
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