diff options
author | Andrew Dyukov <adyukov@productengine.com> | 2010-01-22 22:16:57 +0200 |
---|---|---|
committer | Andrew Dyukov <adyukov@productengine.com> | 2010-01-22 22:16:57 +0200 |
commit | ab0c9c6754836cb26a520d0a9b2d7bbdd13a5f32 (patch) | |
tree | 4afb816e9714bdcc15f6b302a7972177044959e7 /indra/newview/llavataractions.cpp | |
parent | 818ab4b493f97b6bd98f361518953a5f2d624c03 (diff) |
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
Diffstat (limited to 'indra/newview/llavataractions.cpp')
-rw-r--r-- | indra/newview/llavataractions.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 40c9bb6afa..bb14c41cec 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -263,18 +263,9 @@ bool LLAvatarActions::isCalling(const LLUUID &id) } //static -bool LLAvatarActions::canCall(const LLUUID &id) +bool LLAvatarActions::canCall() { - // For now we do not need to check whether passed UUID is ID of agent's friend. - // Use common check of Voice Client state. - { - // don't need to check online/offline status because "usual resident" (resident that is not a friend) - // can be only ONLINE. There is no way to see "usual resident" in OFFLINE status. If we see "usual - // resident" it automatically means that the resident is ONLINE. So to make a call to the "usual resident" - // we need to check only that "our" voice is enabled. - return LLVoiceClient::voiceEnabled(); - } - + return LLVoiceClient::voiceEnabled() && gVoiceClient->voiceWorking(); } // static |