File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
play-services-wearable/core/src/main/java/org/microg/gms/wearable Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -686,10 +686,10 @@ private class ConnectionThread extends Thread {
686686 public void run () {
687687 while (!isInterrupted ()) {
688688 try {
689- BluetoothAdapter adapter = BluetoothAdapter .getDefaultAdapter ();
690689 if (adapter != null && adapter .isEnabled ()) {
691690 Set <BluetoothDevice > bondedDevices = adapter .getBondedDevices ();
692- for (BluetoothDevice device : bondedDevices ) {
691+ if (bondedDevices != null ) {
692+ for (BluetoothDevice device : bondedDevices ) {
693693 // Synchronized check for existing connections to this device
694694 boolean isConnected = false ;
695695 synchronized (activeConnections ) {
@@ -760,6 +760,7 @@ public void run() {
760760 }
761761
762762 }
763+ }
763764 }
764765 } catch (Exception e ) {
765766 Log .w (TAG , "Error in Bluetooth ConnectionThread" , e );
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public WearableService() {
3333 super ("GmsWearSvc" , GmsService .WEAR );
3434 }
3535
36- public static WearableImpl impl ;
36+ public static volatile WearableImpl impl ;
3737
3838 @ Override
3939 public void onCreate () {
You can’t perform that action at this time.
0 commit comments