Clear the cached bluetooth devices due to UI bug 66/26066/1
authorJimmy Huang <jimmy.huang@intel.com>
Thu, 14 Aug 2014 20:45:50 +0000 (13:45 -0700)
committerJimmy Huang <jimmy.huang@intel.com>
Thu, 14 Aug 2014 20:49:21 +0000 (13:49 -0700)
This is a work-around to fix the Modello Bluetooth settings UI from
hanging after bluetooth scan.  The cached bluetooth device objects that
are being serialized using the Knockout library is not cached properly,
this caused Modello to load a list of invalid devices.  This fix clears
the cached devices and starts fresh when it loads.

Change-Id: I80115e4510a504e51c4ff7a78cb640cfe517a844
Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
css/car/components/settings/js/bluetooth.js
packaging/modello-common.changes

index 42980e3..704747d 100644 (file)
@@ -465,7 +465,7 @@ Bluetooth.prototype.loadBluetoothConfig = function() {
        if (!!bluetooth) {
                self.lastSync(bluetooth.lastSync);
                if (!!self.adapter() && self.adapter().powered && !!bluetooth.devices) {
-                       self.devices(bluetooth.devices);
+                       self.clearDevices();
                        self.refreshDevices();
                        self._setRefreshDevicesInterval();
                }
@@ -486,7 +486,7 @@ Bluetooth.prototype.getDevice = function(device) {
                self.addUpdateDevice(dev, false);
                self.sortDevices();
                self.saveBluetooth();
-               if (self.selectedDevice().address === dev.address) {
+               if (!!self.selectedDevice() && self.selectedDevice().address === dev.address) {
                        self.selectedDevice(dev);
                }
        }, function(error) {
index ef64dd7..f11a771 100644 (file)
@@ -1,3 +1,6 @@
+* Thu Aug 14 2014 Jimmy Huang <jimmy.huang@intel.com> accepted/tizen/ivi/20140814.201957-1-g4c3a4b4
+- Clear the cached bluetooth devices due to UI bug
+
 * Wed Aug 13 2014 Brian Jones <brian.j.jones@intel.com> submit/tizen_3.0.m14.2_ivi/20140723.000002-4-g94fa069
 - Fix font name, temporarily remove subscribe call, and fix app name