[Bluetooth][Non-ACR] Fix TrackInfoChanged not invoked issue (#2094)
authorWootak Jung <wootak.jung@samsung.com>
Mon, 12 Oct 2020 08:24:03 +0000 (17:24 +0900)
committerGitHub <noreply@github.com>
Mon, 12 Oct 2020 08:24:03 +0000 (17:24 +0900)
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
src/Tizen.Network.Bluetooth/Tizen.Network.Bluetooth/BluetoothAvrcpControlImpl.cs

index da37d72..c5ddfda 100644 (file)
@@ -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()