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 90f0589539
commit c0f8ea7c78
2 changed files with 6 additions and 6 deletions

View File

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

View File

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