Bug 1133449 - [B2G] The default audio type didn't be set correctly when the call screen app is launched. r=baku

This commit is contained in:
Alastor Wu 2015-02-25 18:46:11 +08:00
parent 40cea12f61
commit 927641d248
2 changed files with 6 additions and 6 deletions

View File

@ -507,15 +507,15 @@ AudioChannelService::ProcessContentOrNormalChannelIsActive(uint64_t aChildID)
void
AudioChannelService::SetDefaultVolumeControlChannel(int32_t aChannel,
bool aHidden)
bool aVisible)
{
SetDefaultVolumeControlChannelInternal(aChannel, aHidden,
SetDefaultVolumeControlChannelInternal(aChannel, aVisible,
CONTENT_PROCESS_ID_MAIN);
}
void
AudioChannelService::SetDefaultVolumeControlChannelInternal(int32_t aChannel,
bool aHidden,
bool aVisible,
uint64_t aChildID)
{
if (XRE_GetProcessType() != GeckoProcessType_Default) {
@ -525,7 +525,7 @@ AudioChannelService::SetDefaultVolumeControlChannelInternal(int32_t aChannel,
// If this child is in the background and mDefChannelChildID is set to
// others then it means other child in the foreground already set it's
// own default channel already.
if ((!aHidden && mDefChannelChildID != aChildID) ||
if ((!aVisible && mDefChannelChildID != aChildID) ||
(mDefChannelChildID != aChildID &&
mDefChannelChildID != CONTENT_PROCESS_ID_UNKNOWN)) {
return;

View File

@ -99,7 +99,7 @@ public:
* AudioChannel enum.
*/
virtual void SetDefaultVolumeControlChannel(int32_t aChannel,
bool aHidden);
bool aVisible);
bool AnyAudioChannelIsActive();
@ -153,7 +153,7 @@ protected:
/* Send the default-volume-channel-changed notification */
void SetDefaultVolumeControlChannelInternal(int32_t aChannel,
bool aHidden, uint64_t aChildID);
bool aVisible, uint64_t aChildID);
AudioChannelState CheckTelephonyPolicy(AudioChannel aChannel,
uint64_t aChildID);