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;
- }
+ //}
}
}
property alias activeCall: activeCallView.call
property alias callState: activeCallView.state
+ property bool unpairing: FALSE;
+ property bool pairing: FALSE;
Keys.onEscapePressed: {
console.log("Escape Pressed");
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;
}
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
}
}
onClose: {
- console.log("unparing ...");
+ console.log("unpairing ...");
+ root.unpairing = true;
+ if (pairing)
+ device.cancelPairing();
+
device.unpair();
btDevicesModel.deviceRemoved(device.path);
}
onClicked: {
console.log("BUTTON CLICKED bubbled up")
+ root.pairing = true;
nearbyDevicesModel.discover(false)
nearbyDevicesModel.pair(model.address)
}