Bug 1056413 - Broadcast system message to notify Gaia when Bluetooth authentication failure occurs. r=shuang

This commit is contained in:
Jamin Liu 2014-08-29 09:58:52 +08:00
parent 82cbd3e616
commit 4fb0be6d18

View File

@ -1554,6 +1554,8 @@ BluetoothServiceBluedroid::BondStateChangedNotification(
return;
}
switch (aStatus) {
case STATUS_SUCCESS: {
bool bonded;
if (aState == BOND_STATE_NONE) {
bonded = false;
@ -1595,6 +1597,21 @@ BluetoothServiceBluedroid::BondStateChangedNotification(
BluetoothSignal(NS_LITERAL_STRING(PAIRED_STATUS_CHANGED_ID),
NS_LITERAL_STRING(KEY_ADAPTER),
BluetoothValue(propertiesArray)));
break;
}
case STATUS_BUSY:
case STATUS_AUTH_FAILURE:
case STATUS_RMT_DEV_DOWN: {
InfallibleTArray<BluetoothNamedValue> propertiesArray;
DistributeSignal(BluetoothSignal(NS_LITERAL_STRING("Cancel"),
NS_LITERAL_STRING(KEY_LOCAL_AGENT),
BluetoothValue(propertiesArray)));
break;
}
default:
BT_WARNING("Got an unhandled status of BondStateChangedCallback!");
break;
}
}
void