Skip to content

Commit

Permalink
refactor startDisconnectTimer
Browse files Browse the repository at this point in the history
  • Loading branch information
weliem committed Jun 14, 2020
1 parent 1127be7 commit 490cc69
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/testapp/BluetoothHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,7 @@ public void startDisconnectTimer(final BluetoothPeripheral peripheral) {
timeoutRunnable = null;
}

this.timeoutRunnable = () -> {
peripheral.cancelConnection();
};
this.timeoutRunnable = peripheral::cancelConnection;
handler.postDelayed(timeoutRunnable, 2000L);
}

Expand Down

0 comments on commit 490cc69

Please sign in to comment.