Resolve crash issue when try to unpair the device 56/300256/3
authorAnuj Kumar Singh <anujk.singh@samsung.com>
Thu, 19 Oct 2023 06:39:55 +0000 (12:09 +0530)
committerAnuj Kumar Singh <anujk.singh@samsung.com>
Wed, 25 Oct 2023 08:10:43 +0000 (13:40 +0530)
Change-Id: I6b1c1abe3cfaa2e8a50362b1c865a7ceb9812685
Signed-off-by: Anuj Kumar Singh <anujk.singh@samsung.com>
SettingBluetooth/SettingBluetooth/View/BtDeviceView.cs
packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk

index dcd86ebced96556bbfdbb538bc5f88c8ad10559e..64804a6e9c354c0c76272437d3588116449c5a40 100644 (file)
@@ -241,7 +241,14 @@ namespace SettingBluetooth
             mPaired.RemoveDevice(btDevice);
             if (mPaired.Count == 0)
             {
-                this.Remove(mPaired);
+                try
+                {
+                    this.Remove(mPaired);
+                }
+                catch (Exception e)
+                {
+                    Log.Debug(SettingBluetooth.LogTag, "Exception : " + e.Message);
+                }
             }
             Log.Info(SettingBluetooth.LogTag, "device(" + btDevice.Address + ") removed in paired list");
         }
@@ -530,22 +537,10 @@ namespace SettingBluetooth
                     }
                     break;
                 case BtDeviceState.Unpaired:
-                    if (mDeviceSource.FindInSearched(ev.BtDevice) == null)
-                    {
-                        // TODO: need to add in front of the list
-                        try
-                        {
-                            mDeviceSource.AddToSearched(ev.BtDevice);
-                        }
-                        catch (Exception e)
-                        {
-                            Log.Debug(SettingBluetooth.LogTag, "Exception : " + e.Message);
-                        }
-
-                    }
                     if (mDeviceSource.FindInPaired(ev.BtDevice) != null)
                     {
                         mDeviceSource.RemoveFromPaired(ev.BtDevice);
+                        AdapterController.AutoStart();
                     }
                     break;
                 case BtDeviceState.Connecting:
index 9e09004bcf4706e157c720667619f9d14805e6f9..bba7e10446b1986f313b075481de47de7cd1cac8 100644 (file)
Binary files a/packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk and b/packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk differ