mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-01-28 22:01:50 +00:00
save name name whn not renamed
This commit is contained in:
@@ -327,6 +327,10 @@ class AirPodsService: Service() {
|
||||
device = intent.getParcelableExtra("device", BluetoothDevice::class.java)!!
|
||||
val name = this@AirPodsService.getSharedPreferences("settings", MODE_PRIVATE)
|
||||
.getString("name", device?.name)
|
||||
if (this@AirPodsService.getSharedPreferences("settings", MODE_PRIVATE).getString("name", null) == null) {
|
||||
this@AirPodsService.getSharedPreferences("settings", MODE_PRIVATE).edit()
|
||||
.putString("name", name).apply()
|
||||
}
|
||||
Log.d("AirPodsService", "$name connected")
|
||||
showPopup(this@AirPodsService, name.toString())
|
||||
connectToSocket(device!!)
|
||||
|
||||
Reference in New Issue
Block a user