Commit 6a3afe1c authored by sirmordred's avatar sirmordred Committed by Yuichi Araki
Browse files

Various updates and fixes

https://github.com/googlesamples/android-BluetoothChat/pull/9

BluetoothChatService: Robustify connection states
* Declare connection states within methods instead of before nor after
  method
* States should be called immediately after creating sockets && before
  running thread
* Fixes race condition and restore two-way chat again

BluetoothChatService: Update setState method
* Connection state changes are handled externally(mState) now
* So rename setState method to updateUserInterfaceTitle method

BluetoothChatService: Remove unnecessary calls
* BluetoothChatService.this.start() is already declared in
  connectionLost() method

BluetoothChatService: Set connection state after failure
* and update the UI title

Change-Id: Iae5412832205ee13894aa6ba3c786652155e23f2
parent a5a3733f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment