diff --git a/HDFwear/Tools/BluetoothManager+Function.swift b/HDFwear/Tools/BluetoothManager+Function.swift index 046530a..a96e9d9 100644 --- a/HDFwear/Tools/BluetoothManager+Function.swift +++ b/HDFwear/Tools/BluetoothManager+Function.swift @@ -301,6 +301,11 @@ extension BluetoothManager { } case 0x8014:// 电话挂断 print("电话挂断") + if bytes[10] == 0x02 { + for delegate in syncDelegateList { + delegate.didReceiveCallOff() + } + } case 0x8015:// 找手机 print("找手机") let ring = Int(bytes[10]) diff --git a/HDFwear/Tools/BluetoothManager.swift b/HDFwear/Tools/BluetoothManager.swift index e4126d3..1fc5cbd 100644 --- a/HDFwear/Tools/BluetoothManager.swift +++ b/HDFwear/Tools/BluetoothManager.swift @@ -39,6 +39,7 @@ protocol BluetoothSyncDelegate { // adapted func didReceiveBattery(value: Int) func didReceiveFindPhoneCommand(value: Int) + func didReceiveCallOff() } extension BluetoothSyncDelegate { func didReceiveFindCommand(status: Bool) { } @@ -53,6 +54,7 @@ extension BluetoothSyncDelegate { // adapted func didReceiveBattery(value: Int) { } func didReceiveFindPhoneCommand(value: Int) { } + func didReceiveCallOff(){ } }