Actually fix SV-2181 this time? I think. It seems to work.

This commit is contained in:
Lirusaito
2018-07-16 02:55:40 -04:00
parent 4c8bd8d3ca
commit 562353929e

View File

@@ -221,11 +221,11 @@ void LLVoiceChannel::deactivate()
//Default mic is OFF when leaving voice calls //Default mic is OFF when leaving voice calls
if (gSavedSettings.getBOOL("AutoDisengageMic") && if (gSavedSettings.getBOOL("AutoDisengageMic") &&
sCurrentVoiceChannel == this && sCurrentVoiceChannel == this /*&&
LLVoiceClient::getInstance()->getUserPTTState()) LLVoiceClient::getInstance()->getUserPTTState()*/) // Singu Note: This could be false, but we still need to do this.
{ {
gSavedSettings.setBOOL("PTTCurrentlyEnabled", true); gSavedSettings.setBOOL("PTTCurrentlyEnabled", true);
LLVoiceClient::getInstance()->inputUserControlState(true); LLVoiceClient::getInstance()->setUserPTTState(false);
} }
} }
LLVoiceClient::getInstance()->removeObserver(this); LLVoiceClient::getInstance()->removeObserver(this);
@@ -652,6 +652,7 @@ void LLVoiceCallCapResponder::httpSuccess(void)
} }
} }
// //
// LLVoiceChannelProximal // LLVoiceChannelProximal
// //
@@ -711,6 +712,7 @@ void LLVoiceChannelProximal::handleStatusChange(EStatusType status)
// do not notify user when leaving proximal channel // do not notify user when leaving proximal channel
return; return;
case STATUS_VOICE_DISABLED: case STATUS_VOICE_DISABLED:
LLVoiceClient::getInstance()->setUserPTTState(false);
//skip showing "Voice not available at your current location" when agent voice is disabled (EXT-4749) //skip showing "Voice not available at your current location" when agent voice is disabled (EXT-4749)
if(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking()) if(LLVoiceClient::getInstance()->voiceEnabled() && LLVoiceClient::getInstance()->isVoiceWorking())
{ {
@@ -928,7 +930,7 @@ void LLVoiceChannelP2P::setState(EState state)
{ {
// you only "answer" voice invites in p2p mode // you only "answer" voice invites in p2p mode
// so provide a special purpose message here // so provide a special purpose message here
if (mReceivedCall && state == STATE_RINGING) if (state == STATE_RINGING)
{ {
gIMMgr->addSystemMessage(mSessionID, "answering", mNotifyArgs); gIMMgr->addSystemMessage(mSessionID, "answering", mNotifyArgs);
doSetState(state); doSetState(state);