NOTE: this update requires bluetooth-qt to be updated to work
authorBrian Jones <brian.j.jones@intel.com>
Thu, 26 Apr 2012 19:51:58 +0000 (12:51 -0700)
committerBrian Jones <brian.j.jones@intel.com>
Thu, 26 Apr 2012 19:51:58 +0000 (12:51 -0700)
Removed code that tries to put the name of the caller in the
dialog, as we don't support this yet. Also added code to keep track
of pairing status, and properly cancel pairing.

projects.pro
qml/CallItemViewLarge.qml
qml/DialPage.qml

index c1a35c8..7c16520 100644 (file)
@@ -1,4 +1,4 @@
-VERSION = 0.3.2
+VERSION = 0.3.3
 CONFIG += link_pkgconfig network opengl
 
 TEMPLATE = subdirs
index 1ea7dd6..01cc891 100644 (file)
@@ -28,20 +28,21 @@ Item
            
            root.state = call.state
 
-            if (call.name) {
+          /*  if (call.name) {
                 root.callerLabelText = call.name;
 
-            } else {
 
+            } else {
+            */
                if (call.numberLen <= 10)
                {
                   root.callerLabelText = call.msisdn[0] + call.msisdn[1] + call.msisdn[2] + '-' +
                                         call.msisdn[3] + call.msisdn[4] + call.msisdn[5] + '-' +
-                                        call.msisdn[6] + call.msisdn[7] + call.msisdn[8] + call.msisdn[9];
+                                         call.msisdn[6] + call.msisdn[7] + call.msisdn[8] + call.msisdn[9];
                }
                else
                  root.callerLabelText = call.msisdn;
-            }
+           //}
         }
     }
 
index 272dee6..2143c09 100644 (file)
@@ -17,6 +17,8 @@ Item
 
     property alias activeCall: activeCallView.call
     property alias callState: activeCallView.state
+    property bool unpairing: FALSE;
+    property bool pairing: FALSE;
 
     Keys.onEscapePressed: {
         console.log("Escape Pressed");
@@ -47,7 +49,7 @@ Item
         onModemOnlineChanged: {
 
             //If the modem gets powered down for any reason, attempt to power it again to maintain connection
-            if (!adapter.modemOnline)
+            if (!adapter.modemOnline && !unpairing)
             {
                 reconnectTimer.running = true;
             }
@@ -244,6 +246,9 @@ Item
                                 target: btDevicesModel
                                 onDevicePaired: {
                                     console.log("new paired device address:" + device.address + "==" + model.address)
+                                    root.unpairing = false;
+                                    root.pairing = false;
+
                                     if(device.address === model.address){
                                         device.trusted = true
                                     }
@@ -254,7 +259,11 @@ Item
                             }
 
                             onClose: {
-                                console.log("unparing ...");
+                                console.log("unpairing ...");
+                                root.unpairing = true;
+                               if (pairing)
+                                   device.cancelPairing();
+
                                 device.unpair();
                                 btDevicesModel.deviceRemoved(device.path);
                             }
@@ -294,6 +303,7 @@ Item
 
                             onClicked: {
                                 console.log("BUTTON CLICKED bubbled up")
+                                root.pairing = true;
                                 nearbyDevicesModel.discover(false)
                                 nearbyDevicesModel.pair(model.address)
                             }