Skip to content

Commit

Permalink
Merge pull request #981 from AltBeacon/fix-medic-thread-crash
Browse files Browse the repository at this point in the history
Fix BluetoothMedic crash when started on non-looper thread.
  • Loading branch information
davidgyoung authored Jun 11, 2020
2 parents 9e7f867 + 909378d commit 77ed36b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Parse multiple manufacturer sections in the advertisement and the scan response to look for beacons. (#970, David G. Young)
- Improve HW filter detection mechanism in order to detect beacons immediately after starting in background (#974, Vlad Vladau)
- Fix crash on BluetoothMedic when started on thread without a looper (#980, David G. Young)

### 2.17 / 2020-04-19

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import android.content.IntentFilter;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.PersistableBundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down Expand Up @@ -86,7 +87,7 @@ public class BluetoothMedic {
@Nullable
private LocalBroadcastManager mLocalBroadcastManager;
@NonNull
private Handler mHandler = new Handler();
private Handler mHandler = new Handler(Looper.getMainLooper());
private int mTestType = 0;
@Nullable
private Boolean mTransmitterTestResult = null;
Expand Down

0 comments on commit 77ed36b

Please sign in to comment.