1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-12 13:09:24 +01:00

Bangle.js: Fix crash on connection

This commit is contained in:
José Rebelo 2024-07-16 22:16:33 +01:00
parent b36f6b5ecc
commit 68d8a46b65

View File

@ -51,6 +51,7 @@ import android.os.Bundle;
import android.util.Base64;
import android.widget.Toast;
import androidx.core.content.ContextCompat;
import androidx.core.text.HtmlCompat;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
@ -321,7 +322,8 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
}
}
};
GBApplication.getContext().registerReceiver(globalUartReceiver, commandFilter); // should be RECEIVER_EXPORTED
ContextCompat.registerReceiver(GBApplication.getContext(), globalUartReceiver, commandFilter, ContextCompat.RECEIVER_EXPORTED);
}
@Override