mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1003762 - [bluedroid] Notify BluetoothRilListener of service change, r=echou
This commit is contained in:
parent
7b6bddefd0
commit
85369d6c23
@ -897,6 +897,7 @@ BluetoothHfpManager::HandleVoiceConnectionChanged(uint32_t aClientId)
|
||||
voiceInfo->GetType(type);
|
||||
mPhoneType = GetPhoneType(type);
|
||||
|
||||
// Roam
|
||||
bool roaming;
|
||||
voiceInfo->GetRoaming(&roaming);
|
||||
mRoam = (roaming) ? 1 : 0;
|
||||
@ -904,7 +905,13 @@ BluetoothHfpManager::HandleVoiceConnectionChanged(uint32_t aClientId)
|
||||
// Service
|
||||
nsString regState;
|
||||
voiceInfo->GetState(regState);
|
||||
mService = (regState.EqualsLiteral("registered")) ? 1 : 0;
|
||||
|
||||
int service = (regState.EqualsLiteral("registered")) ? 1 : 0;
|
||||
if (service != mService) {
|
||||
// Notify BluetoothRilListener of service change
|
||||
mListener->ServiceChanged(aClientId, service);
|
||||
}
|
||||
mService = service;
|
||||
|
||||
// Signal
|
||||
JSContext* cx = nsContentUtils::GetSafeJSContext();
|
||||
|
Loading…
Reference in New Issue
Block a user