diff --git a/b2g/config/aries/sources.xml b/b2g/config/aries/sources.xml
index 44f6ffead4c9..8047683c7677 100644
--- a/b2g/config/aries/sources.xml
+++ b/b2g/config/aries/sources.xml
@@ -15,7 +15,7 @@
-
+
@@ -122,7 +122,7 @@
-
+
@@ -130,7 +130,6 @@
-
@@ -144,6 +143,7 @@
+
diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml
index 881d3c78a816..702d2ad6b34f 100644
--- a/b2g/config/dolphin/sources.xml
+++ b/b2g/config/dolphin/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml
index 98ff122f0466..7ba63fde6d4d 100644
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -15,11 +15,11 @@
-
+
-
+
diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml
index d63adc161f5e..90e61e642cc3 100644
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml
index 15ec68bdad74..227e10306606 100644
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/emulator-l/sources.xml b/b2g/config/emulator-l/sources.xml
index e0ec32a104c1..52a24ba9d842 100644
--- a/b2g/config/emulator-l/sources.xml
+++ b/b2g/config/emulator-l/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml
index 98ff122f0466..7ba63fde6d4d 100644
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -15,11 +15,11 @@
-
+
-
+
diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml
index 8f678a4a4108..18e5d9ce4b84 100644
--- a/b2g/config/flame-kk/sources.xml
+++ b/b2g/config/flame-kk/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json
index 520838b84ec0..ae61d5e34155 100644
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -1,9 +1,9 @@
{
"git": {
- "git_revision": "a8319543833b08e986fa3ed590faeb2624bf1683",
+ "git_revision": "862f0895f3f5a97200601542d99a152a46385a0b",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
- "revision": "4fc562ca01a3e8e17dd042af9076f1fe7bc8f91d",
+ "revision": "b176b86e412fb3143fa31ced79faa5238d540f93",
"repo_path": "integration/gaia-central"
}
diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml
index 2b96ad640746..96e74eda3b2a 100644
--- a/b2g/config/nexus-4/sources.xml
+++ b/b2g/config/nexus-4/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/nexus-5-l/sources.xml b/b2g/config/nexus-5-l/sources.xml
index b0f6a16d6f49..de568b0af3a5 100644
--- a/b2g/config/nexus-5-l/sources.xml
+++ b/b2g/config/nexus-5-l/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/installer/package-manifest.in b/b2g/installer/package-manifest.in
index afbdb9491c7f..100973054c1d 100644
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -498,8 +498,8 @@
@RESPATH@/components/CellBroadcastService.manifest
@RESPATH@/components/DataCallManager.js
@RESPATH@/components/DataCallManager.manifest
-@BINPATH@/components/IccService.js
-@BINPATH@/components/IccService.manifest
+@RESPATH@/components/IccService.js
+@RESPATH@/components/IccService.manifest
@RESPATH@/components/MmsService.js
@RESPATH@/components/MmsService.manifest
@RESPATH@/components/MobileMessageDatabaseService.js
diff --git a/dom/media/AudioSink.cpp b/dom/media/AudioSink.cpp
index 522a4c33b64c..ad2fc73f465d 100644
--- a/dom/media/AudioSink.cpp
+++ b/dom/media/AudioSink.cpp
@@ -36,7 +36,13 @@ AudioSink::AudioSink(MediaQueue& aAudioQueue,
, mLastGoodPosition(0)
, mInfo(aInfo)
, mChannel(aChannel)
+ , mVolume(1.0)
+ , mPlaybackRate(1.0)
+ , mPreservesPitch(false)
, mStopAudioThread(false)
+ , mSetVolume(false)
+ , mSetPlaybackRate(false)
+ , mSetPreservesPitch(false)
, mPlaying(true)
{
}
@@ -127,21 +133,15 @@ AudioSink::HasUnplayedFrames()
void
AudioSink::Shutdown()
{
- {
- ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
- if (mAudioStream) {
- mAudioStream->Cancel();
- }
+ ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
+ mStopAudioThread = true;
+ if (mAudioStream) {
+ mAudioStream->Cancel();
}
- nsRefPtr self = this;
- nsCOMPtr r = NS_NewRunnableFunction([=] () {
- self->mStopAudioThread = true;
- if (!self->mAudioLoopScheduled) {
- self->AudioLoop();
- }
- });
- DispatchTask(r.forget());
+ ScheduleNextLoopCrossThread();
+ // Exit the monitor so audio loop can enter the monitor and finish its job.
+ ReentrantMonitorAutoExit exit(GetReentrantMonitor());
mThread->Shutdown();
mThread = nullptr;
if (mAudioStream) {
@@ -159,66 +159,34 @@ AudioSink::Shutdown()
void
AudioSink::SetVolume(double aVolume)
{
- AssertNotOnAudioThread();
- nsRefPtr self = this;
- nsCOMPtr r = NS_NewRunnableFunction([=] () {
- if (self->mState == AUDIOSINK_STATE_PLAYING) {
- self->mAudioStream->SetVolume(aVolume);
- }
- });
- DispatchTask(r.forget());
+ ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
+ mVolume = aVolume;
+ mSetVolume = true;
}
void
AudioSink::SetPlaybackRate(double aPlaybackRate)
{
- AssertNotOnAudioThread();
- MOZ_ASSERT(aPlaybackRate != 0, "Don't set the playbackRate to 0 on AudioStream");
- nsRefPtr self = this;
- nsCOMPtr r = NS_NewRunnableFunction([=] () {
- if (self->mState == AUDIOSINK_STATE_PLAYING) {
- self->mAudioStream->SetPlaybackRate(aPlaybackRate);
- }
- });
- DispatchTask(r.forget());
+ ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
+ NS_ASSERTION(mPlaybackRate != 0, "Don't set the playbackRate to 0 on AudioStream");
+ mPlaybackRate = aPlaybackRate;
+ mSetPlaybackRate = true;
}
void
AudioSink::SetPreservesPitch(bool aPreservesPitch)
{
- AssertNotOnAudioThread();
- nsRefPtr self = this;
- nsCOMPtr r = NS_NewRunnableFunction([=] () {
- if (self->mState == AUDIOSINK_STATE_PLAYING) {
- self->mAudioStream->SetPreservesPitch(aPreservesPitch);
- }
- });
- DispatchTask(r.forget());
+ ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
+ mPreservesPitch = aPreservesPitch;
+ mSetPreservesPitch = true;
}
void
AudioSink::SetPlaying(bool aPlaying)
{
- AssertNotOnAudioThread();
- nsRefPtr self = this;
- nsCOMPtr r = NS_NewRunnableFunction([=] () {
- if (self->mState != AUDIOSINK_STATE_PLAYING ||
- self->mPlaying == aPlaying) {
- return;
- }
- self->mPlaying = aPlaying;
- // pause/resume AudioStream as necessary.
- if (!aPlaying && !self->mAudioStream->IsPaused()) {
- self->mAudioStream->Pause();
- } else if (aPlaying && self->mAudioStream->IsPaused()) {
- self->mAudioStream->Resume();
- }
- // Wake up the audio loop to play next sample.
- if (aPlaying && !self->mAudioLoopScheduled) {
- self->AudioLoop();
- }
- });
- DispatchTask(r.forget());
+ ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
+ mPlaying = aPlaying;
+ ScheduleNextLoopCrossThread();
}
void
@@ -243,6 +211,7 @@ AudioSink::InitializeAudioStream()
ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
mAudioStream = audioStream;
+ UpdateStreamSettings();
return NS_OK;
}
@@ -250,18 +219,21 @@ AudioSink::InitializeAudioStream()
void
AudioSink::Drain()
{
- AssertOnAudioThread();
MOZ_ASSERT(mPlaying && !mAudioStream->IsPaused());
+ AssertCurrentThreadInMonitor();
// If the media was too short to trigger the start of the audio stream,
// start it now.
mAudioStream->Start();
- mAudioStream->Drain();
+ {
+ ReentrantMonitorAutoExit exit(GetReentrantMonitor());
+ mAudioStream->Drain();
+ }
}
void
AudioSink::Cleanup()
{
- AssertOnAudioThread();
+ AssertCurrentThreadInMonitor();
mEndPromise.Resolve(true, __func__);
// Since the promise if resolved asynchronously, we don't shutdown
// AudioStream here so MDSM::ResyncAudioClock can get the correct
@@ -277,10 +249,13 @@ AudioSink::ExpectMoreAudioData()
bool
AudioSink::WaitingForAudioToPlay()
{
- AssertOnAudioThread();
// Return true if we're not playing, and we're not shutting down, or we're
// playing and we've got no audio to play.
+ AssertCurrentThreadInMonitor();
if (!mStopAudioThread && (!mPlaying || ExpectMoreAudioData())) {
+ if (!mPlaying && !mAudioStream->IsPaused()) {
+ mAudioStream->Pause();
+ }
return true;
}
return false;
@@ -289,13 +264,19 @@ AudioSink::WaitingForAudioToPlay()
bool
AudioSink::IsPlaybackContinuing()
{
- AssertOnAudioThread();
+ AssertCurrentThreadInMonitor();
+ if (mPlaying && mAudioStream->IsPaused()) {
+ mAudioStream->Resume();
+ }
+
// If we're shutting down, captured, or at EOS, break out and exit the audio
// thread.
if (mStopAudioThread || AudioQueue().AtEndOfStream()) {
return false;
}
+ UpdateStreamSettings();
+
return true;
}
@@ -320,13 +301,16 @@ AudioSink::AudioLoop()
}
case AUDIOSINK_STATE_PLAYING: {
- if (WaitingForAudioToPlay()) {
- // NotifyData() will schedule next loop.
- break;
- }
- if (!IsPlaybackContinuing()) {
- SetState(AUDIOSINK_STATE_COMPLETE);
- break;
+ {
+ ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
+ if (WaitingForAudioToPlay()) {
+ // NotifyData() will schedule next loop.
+ break;
+ }
+ if (!IsPlaybackContinuing()) {
+ SetState(AUDIOSINK_STATE_COMPLETE);
+ break;
+ }
}
if (!PlayAudio()) {
SetState(AUDIOSINK_STATE_COMPLETE);
@@ -399,7 +383,7 @@ AudioSink::PlayAudio()
void
AudioSink::FinishAudioLoop()
{
- AssertOnAudioThread();
+ ReentrantMonitorAutoEnter mon(GetReentrantMonitor());
MOZ_ASSERT(mStopAudioThread || AudioQueue().AtEndOfStream());
if (!mStopAudioThread && mPlaying) {
Drain();
@@ -451,6 +435,40 @@ AudioSink::PlayFromAudioQueue()
return audio->mFrames;
}
+void
+AudioSink::UpdateStreamSettings()
+{
+ AssertCurrentThreadInMonitor();
+
+ bool setVolume = mSetVolume;
+ bool setPlaybackRate = mSetPlaybackRate;
+ bool setPreservesPitch = mSetPreservesPitch;
+ double volume = mVolume;
+ double playbackRate = mPlaybackRate;
+ bool preservesPitch = mPreservesPitch;
+
+ mSetVolume = false;
+ mSetPlaybackRate = false;
+ mSetPreservesPitch = false;
+
+ {
+ ReentrantMonitorAutoExit exit(GetReentrantMonitor());
+ if (setVolume) {
+ mAudioStream->SetVolume(volume);
+ }
+
+ if (setPlaybackRate &&
+ NS_FAILED(mAudioStream->SetPlaybackRate(playbackRate))) {
+ NS_WARNING("Setting the playback rate failed in AudioSink.");
+ }
+
+ if (setPreservesPitch &&
+ NS_FAILED(mAudioStream->SetPreservesPitch(preservesPitch))) {
+ NS_WARNING("Setting the pitch preservation failed in AudioSink.");
+ }
+ }
+}
+
void
AudioSink::StartAudioStreamPlaybackIfNeeded()
{
diff --git a/dom/media/AudioSink.h b/dom/media/AudioSink.h
index b380033b36d5..e9dba4ee4617 100644
--- a/dom/media/AudioSink.h
+++ b/dom/media/AudioSink.h
@@ -114,6 +114,8 @@ private:
// audio data to the audio hardware. Called on the audio thread.
uint32_t PlayFromAudioQueue();
+ void UpdateStreamSettings();
+
// If we have already written enough frames to the AudioStream, start the
// playback.
void StartAudioStreamPlaybackIfNeeded();
@@ -170,8 +172,16 @@ private:
dom::AudioChannel mChannel;
+ double mVolume;
+ double mPlaybackRate;
+ bool mPreservesPitch;
+
bool mStopAudioThread;
+ bool mSetVolume;
+ bool mSetPlaybackRate;
+ bool mSetPreservesPitch;
+
bool mPlaying;
MozPromiseHolder mEndPromise;
diff --git a/dom/telephony/ipc/TelephonyParent.cpp b/dom/telephony/ipc/TelephonyParent.cpp
index b653226a47c7..b7ce1c571844 100644
--- a/dom/telephony/ipc/TelephonyParent.cpp
+++ b/dom/telephony/ipc/TelephonyParent.cpp
@@ -41,7 +41,7 @@ TelephonyParent::RecvPTelephonyRequestConstructor(PTelephonyRequestParent* aActo
nsCOMPtr service = do_GetService(TELEPHONY_SERVICE_CONTRACTID);
if (!service) {
- return NS_SUCCEEDED(actor->NotifyError(NS_LITERAL_STRING("InvalidStateError")));
+ return NS_SUCCEEDED(actor->GetCallback()->NotifyError(NS_LITERAL_STRING("InvalidStateError")));
}
switch (aRequest.type()) {
@@ -57,79 +57,79 @@ TelephonyParent::RecvPTelephonyRequestConstructor(PTelephonyRequestParent* aActo
case IPCTelephonyRequest::TDialRequest: {
const DialRequest& request = aRequest.get_DialRequest();
service->Dial(request.clientId(), request.number(),
- request.isEmergency(), actor);
+ request.isEmergency(), actor->GetDialCallback());
return true;
}
case IPCTelephonyRequest::TSendUSSDRequest: {
const SendUSSDRequest& request = aRequest.get_SendUSSDRequest();
- service->SendUSSD(request.clientId(), request.ussd(), actor);
+ service->SendUSSD(request.clientId(), request.ussd(), actor->GetCallback());
return true;
}
case IPCTelephonyRequest::TCancelUSSDRequest: {
const CancelUSSDRequest& request = aRequest.get_CancelUSSDRequest();
- service->CancelUSSD(request.clientId(), actor);
+ service->CancelUSSD(request.clientId(), actor->GetCallback());
return true;
}
case IPCTelephonyRequest::TConferenceCallRequest: {
const ConferenceCallRequest& request = aRequest.get_ConferenceCallRequest();
- service->ConferenceCall(request.clientId(), actor);
+ service->ConferenceCall(request.clientId(), actor->GetCallback());
return true;
}
case IPCTelephonyRequest::TSeparateCallRequest: {
const SeparateCallRequest& request = aRequest.get_SeparateCallRequest();
- service->SeparateCall(request.clientId(), request.callIndex(), actor);
+ service->SeparateCall(request.clientId(), request.callIndex(), actor->GetCallback());
return true;
}
case IPCTelephonyRequest::THangUpConferenceRequest: {
const HangUpConferenceRequest& request = aRequest.get_HangUpConferenceRequest();
- service->HangUpConference(request.clientId(), actor);
+ service->HangUpConference(request.clientId(), actor->GetCallback());
return true;
}
case IPCTelephonyRequest::THoldConferenceRequest: {
const HoldConferenceRequest& request = aRequest.get_HoldConferenceRequest();
- service->HoldConference(request.clientId(), actor);
+ service->HoldConference(request.clientId(), actor->GetCallback());
return true;
}
case IPCTelephonyRequest::TResumeConferenceRequest: {
const ResumeConferenceRequest& request = aRequest.get_ResumeConferenceRequest();
- service->ResumeConference(request.clientId(), actor);
+ service->ResumeConference(request.clientId(), actor->GetCallback());
return true;
}
case IPCTelephonyRequest::TAnswerCallRequest: {
const AnswerCallRequest& request = aRequest.get_AnswerCallRequest();
- service->AnswerCall(request.clientId(), request.callIndex(), actor);
+ service->AnswerCall(request.clientId(), request.callIndex(), actor->GetCallback());
return true;
}
case IPCTelephonyRequest::THangUpCallRequest: {
const HangUpCallRequest& request = aRequest.get_HangUpCallRequest();
- service->HangUpCall(request.clientId(), request.callIndex(), actor);
+ service->HangUpCall(request.clientId(), request.callIndex(), actor->GetCallback());
return true;
}
case IPCTelephonyRequest::TRejectCallRequest: {
const RejectCallRequest& request = aRequest.get_RejectCallRequest();
- service->RejectCall(request.clientId(), request.callIndex(), actor);
+ service->RejectCall(request.clientId(), request.callIndex(), actor->GetCallback());
return true;
}
case IPCTelephonyRequest::THoldCallRequest: {
const HoldCallRequest& request = aRequest.get_HoldCallRequest();
- service->HoldCall(request.clientId(), request.callIndex(), actor);
+ service->HoldCall(request.clientId(), request.callIndex(), actor->GetCallback());
return true;
}
case IPCTelephonyRequest::TResumeCallRequest: {
const ResumeCallRequest& request = aRequest.get_ResumeCallRequest();
- service->ResumeCall(request.clientId(), request.callIndex(), actor);
+ service->ResumeCall(request.clientId(), request.callIndex(), actor->GetCallback());
return true;
}
@@ -139,7 +139,7 @@ TelephonyParent::RecvPTelephonyRequestConstructor(PTelephonyRequestParent* aActo
request.dtmfChars(),
request.pauseDuration(),
request.toneDuration(),
- actor);
+ actor->GetCallback());
return true;
}
@@ -347,12 +347,12 @@ TelephonyParent::SupplementaryServiceNotification(uint32_t aClientId,
******************************************************************************/
NS_IMPL_ISUPPORTS(TelephonyRequestParent,
- nsITelephonyListener,
- nsITelephonyCallback,
- nsITelephonyDialCallback)
+ nsITelephonyListener)
TelephonyRequestParent::TelephonyRequestParent()
- : mActorDestroyed(false)
+ : mActorDestroyed(false),
+ mCallback(new Callback(*this)),
+ mDialCallback(new DialCallback(*this))
{
}
@@ -428,56 +428,74 @@ TelephonyRequestParent::SupplementaryServiceNotification(uint32_t aClientId,
MOZ_CRASH("Not a TelephonyParent!");
}
-// nsITelephonyDialCallback
+/*******************************************************************************
+ * TelephonyRequestParent::Callback
+ ******************************************************************************/
-NS_IMETHODIMP
-TelephonyRequestParent::NotifyDialMMI(const nsAString& aServiceCode)
+NS_IMPL_ISUPPORTS(TelephonyRequestParent::Callback,
+ nsITelephonyCallback)
+
+nsresult TelephonyRequestParent::Callback::SendResponse(const IPCTelephonyResponse& aResponse)
{
- NS_ENSURE_TRUE(!mActorDestroyed, NS_ERROR_FAILURE);
-
- return SendNotifyDialMMI(nsAutoString(aServiceCode)) ? NS_OK : NS_ERROR_FAILURE;
+ return mParent.SendResponse(aResponse);
}
NS_IMETHODIMP
-TelephonyRequestParent::NotifySuccess()
+TelephonyRequestParent::Callback::NotifySuccess()
{
return SendResponse(SuccessResponse());
}
NS_IMETHODIMP
-TelephonyRequestParent::NotifyError(const nsAString& aError)
+TelephonyRequestParent::Callback::NotifyError(const nsAString& aError)
{
return SendResponse(ErrorResponse(nsAutoString(aError)));
}
+/*******************************************************************************
+ * TelephonyRequestParent::DialCallback
+ ******************************************************************************/
+
+NS_IMPL_ISUPPORTS_INHERITED(TelephonyRequestParent::DialCallback,
+ TelephonyRequestParent::Callback,
+ nsITelephonyDialCallback)
+
NS_IMETHODIMP
-TelephonyRequestParent::NotifyDialCallSuccess(uint32_t aClientId,
- uint32_t aCallIndex,
- const nsAString& aNumber)
+TelephonyRequestParent::DialCallback::NotifyDialMMI(const nsAString& aServiceCode)
+{
+ NS_ENSURE_TRUE(!mParent.mActorDestroyed, NS_ERROR_FAILURE);
+
+ return mParent.SendNotifyDialMMI(nsAutoString(aServiceCode)) ? NS_OK : NS_ERROR_FAILURE;
+}
+
+NS_IMETHODIMP
+TelephonyRequestParent::DialCallback::NotifyDialCallSuccess(uint32_t aClientId,
+ uint32_t aCallIndex,
+ const nsAString& aNumber)
{
return SendResponse(DialResponseCallSuccess(aClientId, aCallIndex,
nsAutoString(aNumber)));
}
NS_IMETHODIMP
-TelephonyRequestParent::NotifyDialMMISuccess(const nsAString& aStatusMessage)
+TelephonyRequestParent::DialCallback::NotifyDialMMISuccess(const nsAString& aStatusMessage)
{
return SendResponse(DialResponseMMISuccess(nsAutoString(aStatusMessage),
AdditionalInformation(mozilla::void_t())));
}
NS_IMETHODIMP
-TelephonyRequestParent::NotifyDialMMISuccessWithInteger(const nsAString& aStatusMessage,
- uint16_t aAdditionalInformation)
+TelephonyRequestParent::DialCallback::NotifyDialMMISuccessWithInteger(const nsAString& aStatusMessage,
+ uint16_t aAdditionalInformation)
{
return SendResponse(DialResponseMMISuccess(nsAutoString(aStatusMessage),
AdditionalInformation(aAdditionalInformation)));
}
NS_IMETHODIMP
-TelephonyRequestParent::NotifyDialMMISuccessWithStrings(const nsAString& aStatusMessage,
- uint32_t aCount,
- const char16_t** aAdditionalInformation)
+TelephonyRequestParent::DialCallback::NotifyDialMMISuccessWithStrings(const nsAString& aStatusMessage,
+ uint32_t aCount,
+ const char16_t** aAdditionalInformation)
{
nsTArray additionalInformation;
for (uint32_t i = 0; i < aCount; i++) {
@@ -489,9 +507,9 @@ TelephonyRequestParent::NotifyDialMMISuccessWithStrings(const nsAString& aStatus
}
NS_IMETHODIMP
-TelephonyRequestParent::NotifyDialMMISuccessWithCallForwardingOptions(const nsAString& aStatusMessage,
- uint32_t aCount,
- nsIMobileCallForwardingOptions** aAdditionalInformation)
+TelephonyRequestParent::DialCallback::NotifyDialMMISuccessWithCallForwardingOptions(const nsAString& aStatusMessage,
+ uint32_t aCount,
+ nsIMobileCallForwardingOptions** aAdditionalInformation)
{
nsTArray additionalInformation;
for (uint32_t i = 0; i < aCount; i++) {
@@ -503,15 +521,15 @@ TelephonyRequestParent::NotifyDialMMISuccessWithCallForwardingOptions(const nsAS
}
NS_IMETHODIMP
-TelephonyRequestParent::NotifyDialMMIError(const nsAString& aError)
+TelephonyRequestParent::DialCallback::NotifyDialMMIError(const nsAString& aError)
{
return SendResponse(DialResponseMMIError(nsAutoString(aError),
AdditionalInformation(mozilla::void_t())));
}
NS_IMETHODIMP
-TelephonyRequestParent::NotifyDialMMIErrorWithInfo(const nsAString& aError,
- uint16_t aInfo)
+TelephonyRequestParent::DialCallback::NotifyDialMMIErrorWithInfo(const nsAString& aError,
+ uint16_t aInfo)
{
return SendResponse(DialResponseMMIError(nsAutoString(aError),
AdditionalInformation(aInfo)));
diff --git a/dom/telephony/ipc/TelephonyParent.h b/dom/telephony/ipc/TelephonyParent.h
index cc96bef459d5..b4e3a4a583b5 100644
--- a/dom/telephony/ipc/TelephonyParent.h
+++ b/dom/telephony/ipc/TelephonyParent.h
@@ -72,15 +72,42 @@ private:
class TelephonyRequestParent : public PTelephonyRequestParent
, public nsITelephonyListener
- , public nsITelephonyDialCallback
{
friend class TelephonyParent;
public:
NS_DECL_ISUPPORTS
NS_DECL_NSITELEPHONYLISTENER
- NS_DECL_NSITELEPHONYCALLBACK
- NS_DECL_NSITELEPHONYDIALCALLBACK
+
+ class Callback : public nsITelephonyCallback {
+ friend class TelephonyRequestParent;
+
+ public:
+ NS_DECL_ISUPPORTS
+ NS_DECL_NSITELEPHONYCALLBACK
+
+ protected:
+ explicit Callback(TelephonyRequestParent& aParent): mParent(aParent) {}
+ virtual ~Callback() {}
+
+ private:
+ nsresult SendResponse(const IPCTelephonyResponse& aResponse);
+ TelephonyRequestParent& mParent;
+ };
+
+ class DialCallback final : public Callback
+ , public nsITelephonyDialCallback {
+ friend class TelephonyRequestParent;
+
+ public:
+ NS_DECL_ISUPPORTS_INHERITED
+ NS_DECL_NSITELEPHONYDIALCALLBACK
+ NS_FORWARD_NSITELEPHONYCALLBACK(Callback::)
+
+ private:
+ explicit DialCallback(TelephonyRequestParent& aParent): Callback(aParent) {}
+ ~DialCallback() {}
+ };
protected:
TelephonyRequestParent();
@@ -92,8 +119,20 @@ protected:
nsresult
SendResponse(const IPCTelephonyResponse& aResponse);
+ Callback*
+ GetCallback() {
+ return mCallback;
+ }
+
+ DialCallback*
+ GetDialCallback() {
+ return mDialCallback;
+ }
+
private:
bool mActorDestroyed;
+ nsRefPtr mCallback;
+ nsRefPtr mDialCallback;
};
END_TELEPHONY_NAMESPACE
diff --git a/testing/mozharness/scripts/marionette.py b/testing/mozharness/scripts/marionette.py
index 41249df4f379..781fbafde974 100755
--- a/testing/mozharness/scripts/marionette.py
+++ b/testing/mozharness/scripts/marionette.py
@@ -495,6 +495,11 @@ class MarionetteTest(TestingMixin, MercurialScript, BlobUploadMixin, TransferMix
level = ERROR
tbpl_status = TBPL_FAILURE
+ qemu = os.path.join(dirs['abs_work_dir'], 'qemu.log')
+ if os.path.isfile(qemu):
+ self.copyfile(qemu, os.path.join(dirs['abs_blob_upload_dir'],
+ 'qemu.log'))
+
# dump logcat output if there were failures
if self.config.get('emulator'):
if marionette_parser.failed != "0" or 'T-FAIL' in marionette_parser.tsummary: