1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-27 20:36:51 +01:00

do not append Miband to device list if it has already been added as the connected device before

This commit is contained in:
Andreas Shimokawa 2015-04-20 19:32:12 +02:00
parent 16ea52e83c
commit a12a76313c

View File

@ -185,7 +185,7 @@ public class ControlCenter extends Activity {
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
String miAddr = sharedPrefs.getString("development_miaddr", null);
if (miAddr != null && !miAddr.equals("")) {
if (miAddr != null && !miAddr.equals("") && !miAddr.equals(connectedDevice.getAddress())) {
deviceList.add(new GBDevice(miAddr, "MI", GBDevice.Type.MIBAND));
}