mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-01-28 22:01:50 +00:00
i'm stupid. fix device name being null when not renamed
This commit is contained in:
@@ -324,10 +324,10 @@ class AirPodsService: Service() {
|
||||
connectionReceiver = object: BroadcastReceiver() {
|
||||
override fun onReceive(context: Context?, intent: Intent?) {
|
||||
if (intent?.action == AirPodsNotifications.Companion.AIRPODS_CONNECTION_DETECTED) {
|
||||
device = intent.getParcelableExtra("device", BluetoothDevice::class.java)!!
|
||||
val name = this@AirPodsService.getSharedPreferences("settings", MODE_PRIVATE)
|
||||
.getString("name", device?.name)
|
||||
Log.d("AirPodsService", "$name connected")
|
||||
device = intent.getParcelableExtra("device", BluetoothDevice::class.java)!!
|
||||
showPopup(this@AirPodsService, name.toString())
|
||||
connectToSocket(device!!)
|
||||
updateNotificationContent(true, name.toString(), batteryNotification.getBattery())
|
||||
|
||||
Reference in New Issue
Block a user