Backed out changeset c93664e82808 (bug 1227980) for bustage on a CLOSED TREE

This commit is contained in:
Carsten "Tomcat" Book 2016-01-26 12:26:24 +01:00
parent 56b5d17371
commit 5bc7a904e7

View File

@ -681,18 +681,11 @@ Telephony::WindowVolumeChanged(float aVolume, bool aMuted)
}
bool isSingleCall = mCalls.Length();
if (isSingleCall && mCalls[0]->Switchable()) {
if (aMuted && (mCalls[0]->State() == TelephonyCallState::Connected)) {
mCalls[0]->Hold(rv);
} else if (!aMuted && (mCalls[0]->State() == TelephonyCallState::Held)) {
mCalls[0]->Resume(rv);
}
nsCOMPtr<nsITelephonyCallback> callback = new TelephonyCallback(promise);
if (isSingleCall) {
rv = aMuted ? mCalls[0]->Hold(callback) : mCalls[0]->Resume(callback);
} else {
if (aMuted && (mGroup->State() == TelephonyCallGroupState::Connected)) {
mGroup->Hold(rv);
} else if (!aMuted && (mGroup->State() == TelephonyCallGroupState::Held)) {
mGroup->Resume(rv);
}
rv = aMuted ? mGroup->Hold(callback) : mGroup->Resume(callback);
}
if (NS_WARN_IF(rv.Failed())) {
return rv.StealNSResult();