From 5f11fd832d154ac7b115b69b4f464abb1846ab91 Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Mon, 12 Oct 2020 17:24:03 +0900 Subject: [PATCH] [Bluetooth][Non-ACR] Fix TrackInfoChanged not invoked issue (#2094) Signed-off-by: Wootak Jung --- .../Tizen.Network.Bluetooth/BluetoothAvrcpControlImpl.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAvrcpControlImpl.cs b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAvrcpControlImpl.cs index da37d72..c5ddfda 100644 --- a/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAvrcpControlImpl.cs +++ b/src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAvrcpControlImpl.cs @@ -156,13 +156,12 @@ namespace Tizen.Network.Bluetooth TrackNum = track_info.number, Duration = track_info.duration })); - int ret = Interop.Bluetooth.SetTrackInfoChangedCallback(_trackInfoChangedCallback, IntPtr.Zero); - if (ret != (int)BluetoothError.None) - { - Log.Error(Globals.LogTag, "Failed to set track info changed callback, Error - " + (BluetoothError)ret); - } }; - + int ret = Interop.Bluetooth.SetTrackInfoChangedCallback(_trackInfoChangedCallback, IntPtr.Zero); + if (ret != (int)BluetoothError.None) + { + Log.Error(Globals.LogTag, "Failed to set track info changed callback, Error - " + (BluetoothError)ret); + } } private void UnregisterTrackInfoChangedEvent() -- 2.7.4