From ab0c9c6754836cb26a520d0a9b2d7bbdd13a5f32 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Fri, 22 Jan 2010 22:16:57 +0200 Subject: Fixed normal bugs EXT-4450 ([BSI] call buttons enabled when voice is disabled) and EXT-4313 (Should not be able to start a call when voice is disabled). Call buttons state now reacts on voice changes in time. - Added voiceWorking() method to LLVoiceClient to determine real availability of voice, because voiceEnabled() doesn't take into account possible errors. Perhaps there is no need in two methods- some investigation will be made and depending on its results they may become one non-static method. voiceWorking() uses state of voice client(mState) to determine voice availability. Also some states which are not currently counted by voiceWorking() as valid may be added if testing reveals problems. - To enable/disable call buttons in time, LLVoiceClientStatusObserver is used. Its trigger uses states from its enum only to skip updating button in some states(to avoid button blinking), but to determine button state LLVoiceClient's voiceWorking() is used. --HG-- branch : product-engine --- indra/newview/llvoiceclient.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llvoiceclient.cpp') diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index c84afa5af1..e52d6a089b 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -5853,6 +5853,11 @@ bool LLVoiceClient::voiceEnabled() return gSavedSettings.getBOOL("EnableVoiceChat") && !gSavedSettings.getBOOL("CmdLineDisableVoice"); } +bool LLVoiceClient::voiceWorking() +{ + return (stateLoggedIn <= mState) && (mState <= stateLeavingSession); +} + void LLVoiceClient::setLipSyncEnabled(BOOL enabled) { mLipSyncEnabled = enabled; -- cgit v1.2.3