Bug 871366 - Cut operator name if it is longer than 16 characters, r=gyeh

This commit is contained in:
Eric Chou 2013-05-15 17:12:48 +08:00
parent 8af7b1dc11
commit dee3a48ec3

View File

@ -658,6 +658,19 @@ BluetoothHfpManager::HandleVoiceConnectionChanged()
NS_ENSURE_TRUE(network, NS_ERROR_FAILURE);
network->GetLongName(mOperatorName);
// According to GSM 07.07, "<format> indicates if the format is alphanumeric
// or numeric; long alphanumeric format can be upto 16 characters long and
// short format up to 8 characters (refer GSM MoU SE.13 [9])..."
// However, we found that the operator name may sometimes be longer than 16
// characters. After discussion, we decided to fix this here but not in RIL
// or modem.
//
// Please see Bug 871366 for more information.
if (mOperatorName.Length() > 16) {
NS_WARNING("The operator name was longer than 16 characters. We cut it.");
mOperatorName.Left(mOperatorName, 16);
}
return NS_OK;
}