Skip to content

Commit 270d1fa

Browse files
author
Douglas Nassif Roma Junior
committed
Fixed bug in postDelay execution
1 parent c525d0b commit 270d1fa

File tree

1 file changed

+2
-4
lines changed
  • BluetoothClassicLibrary/src/main/java/com/github/douglasjunior/bluetoothclassiclibrary

1 file changed

+2
-4
lines changed

BluetoothClassicLibrary/src/main/java/com/github/douglasjunior/bluetoothclassiclibrary/BluetoothService.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
import java.lang.reflect.InvocationTargetException;
1111
import java.util.UUID;
1212

13-
import static android.R.attr.delay;
14-
1513
/**
1614
* Created by douglas on 23/03/15.
1715
*/
@@ -97,8 +95,8 @@ protected void runOnMainThread(Runnable runnable, long delayMillis) {
9795
if (!mConfig.callListenersInMainThread || Looper.myLooper() == Looper.getMainLooper()) {
9896
runnable.run();
9997
} else {
100-
if (delay > 0)
101-
handler.postDelayed(runnable, delay);
98+
if (delayMillis > 0)
99+
handler.postDelayed(runnable, delayMillis);
102100
else
103101
handler.post(runnable);
104102
}

0 commit comments

Comments
 (0)