1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-16 05:37:51 +01:00

Amazfit Bip: implement find lost device by simulating a phone call from "Gadgetbridge"

This commit is contained in:
Andreas Shimokawa 2017-08-16 20:55:20 +02:00
parent 7108dd7b88
commit cd5af1e66a

View File

@ -17,6 +17,7 @@
package nodomain.freeyourgadget.gadgetbridge.service.devices.amazfitbip; package nodomain.freeyourgadget.gadgetbridge.service.devices.amazfitbip;
import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventCallControl; import nodomain.freeyourgadget.gadgetbridge.deviceevents.GBDeviceEventCallControl;
import nodomain.freeyourgadget.gadgetbridge.model.CallSpec;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.NotificationStrategy; import nodomain.freeyourgadget.gadgetbridge.service.devices.miband.NotificationStrategy;
import nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.MiBand2Support; import nodomain.freeyourgadget.gadgetbridge.service.devices.miband2.MiBand2Support;
@ -28,7 +29,10 @@ public class AmazfitBipSupport extends MiBand2Support {
@Override @Override
public void onFindDevice(boolean start) { public void onFindDevice(boolean start) {
// Prevent notification spamming from MiBand2Support for now CallSpec callSpec = new CallSpec();
callSpec.command = start ? CallSpec.CALL_INCOMING : CallSpec.CALL_END;
callSpec.name = "Gadgetbridge";
onSetCallState(callSpec);
} }
@Override @Override