Bug 927320 - 1/2: rename TelephonyProvider to TelephonyService. r=aknow
authorVicamo Yang <vyang@mozilla.com>
Tue, 03 Jun 2014 22:15:25 +0800
changeset 205628 8272c8646ec5b802f33f0889b2ba6d1fae71f291
parent 205627 f43a0522240a1843cb196d6ef2b4acfaa243b02e
child 205629 9575c4678bd5a80740b5b829ba76d1a41721aafa
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaknow
bugs927320
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 927320 - 1/2: rename TelephonyProvider to TelephonyService. r=aknow
b2g/installer/package-manifest.in
dom/bluetooth/BluetoothRilListener.cpp
dom/bluetooth/BluetoothRilListener.h
dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp
dom/bluetooth/bluez/BluetoothHfpManager.cpp
dom/bluetooth2/BluetoothRilListener.cpp
dom/bluetooth2/BluetoothRilListener.h
dom/bluetooth2/bluedroid/hfp/BluetoothHfpManager.cpp
dom/bluetooth2/bluez/BluetoothHfpManager.cpp
dom/system/gonk/RadioInterfaceLayer.js
dom/telephony/Telephony.cpp
dom/telephony/Telephony.h
dom/telephony/TelephonyCall.cpp
dom/telephony/TelephonyCallGroup.cpp
dom/telephony/TelephonyFactory.cpp
dom/telephony/TelephonyFactory.h
dom/telephony/gonk/TelephonyProvider.js
dom/telephony/gonk/TelephonyProvider.manifest
dom/telephony/gonk/TelephonyService.js
dom/telephony/gonk/TelephonyService.manifest
dom/telephony/ipc/TelephonyChild.cpp
dom/telephony/ipc/TelephonyChild.h
dom/telephony/ipc/TelephonyIPCProvider.cpp
dom/telephony/ipc/TelephonyIPCProvider.h
dom/telephony/ipc/TelephonyIPCService.cpp
dom/telephony/ipc/TelephonyIPCService.h
dom/telephony/ipc/TelephonyParent.cpp
dom/telephony/ipc/TelephonyParent.h
dom/telephony/moz.build
dom/telephony/nsIGonkTelephonyProvider.idl
dom/telephony/nsIGonkTelephonyService.idl
dom/telephony/nsITelephonyProvider.idl
dom/telephony/nsITelephonyService.idl
dom/telephony/test/marionette/test_dsds_default_service_id.js
layout/build/nsLayoutModule.cpp
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -425,18 +425,18 @@
 #if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL)
 @BINPATH@/components/MmsService.js
 @BINPATH@/components/MmsService.manifest
 @BINPATH@/components/MobileMessageDatabaseService.js
 @BINPATH@/components/MobileMessageDatabaseService.manifest
 @BINPATH@/components/RadioInterfaceLayer.js
 @BINPATH@/components/RadioInterfaceLayer.manifest
 @BINPATH@/components/RILContentHelper.js
-@BINPATH@/components/TelephonyProvider.js
-@BINPATH@/components/TelephonyProvider.manifest
+@BINPATH@/components/TelephonyService.js
+@BINPATH@/components/TelephonyService.manifest
 #endif // MOZ_WIDGET_GONK && MOZ_B2G_RIL
 
 #ifndef MOZ_WIDGET_GONK
 @BINPATH@/components/extensions.manifest
 @BINPATH@/components/addonManager.js
 @BINPATH@/components/amContentHandler.js
 @BINPATH@/components/amInstallTrigger.js
 @BINPATH@/components/amWebInstallListener.js
--- a/dom/bluetooth/BluetoothRilListener.cpp
+++ b/dom/bluetooth/BluetoothRilListener.cpp
@@ -224,17 +224,17 @@ TelephonyListener::NotifyError(uint32_t 
 
   if (aCallIndex > 0) {
     // In order to not miss any related call state transition.
     // It's possible that 3G network signal lost for unknown reason.
     // If a call is released abnormally, NotifyError() will be called,
     // instead of CallStateChanged(). We need to reset the call array state
     // via setting CALL_STATE_DISCONNECTED
     hfp->HandleCallStateChanged(aCallIndex,
-                                nsITelephonyProvider::CALL_STATE_DISCONNECTED,
+                                nsITelephonyService::CALL_STATE_DISCONNECTED,
                                 aError, EmptyString(), false, false, true);
     BT_WARNING("Reset the call state due to call transition ends abnormally");
   }
 
   BT_WARNING(NS_ConvertUTF16toUTF8(aError).get());
   return NS_OK;
 }
 
@@ -278,18 +278,18 @@ TelephonyListener::NotifyCdmaCallWaiting
   hfp->UpdateSecondNumber(aNumber);
 
   return NS_OK;
 }
 
 bool
 TelephonyListener::Listen(bool aStart)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, false);
 
   nsresult rv;
   if (aStart) {
     rv = provider->RegisterListener(this);
   } else {
     rv = provider->UnregisterListener(this);
   }
@@ -389,18 +389,18 @@ BluetoothRilListener::ServiceChanged(uin
 
   BT_LOGR("%d client %d. new mClientId %d", aRegistered, aClientId,
           (mClientId < mMobileConnListeners.Length()) ? mClientId : -1);
 }
 
 void
 BluetoothRilListener::EnumerateCalls()
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE_VOID(provider);
 
   nsCOMPtr<nsITelephonyListener> listener(
     do_QueryObject(mTelephonyListener));
 
   provider->EnumerateCalls(listener);
 }
 
--- a/dom/bluetooth/BluetoothRilListener.h
+++ b/dom/bluetooth/BluetoothRilListener.h
@@ -8,17 +8,17 @@
 #define mozilla_dom_bluetooth_bluetoothrillistener_h__
 
 #include "BluetoothCommon.h"
 
 #include "nsAutoPtr.h"
 
 #include "nsIIccProvider.h"
 #include "nsIMobileConnectionProvider.h"
-#include "nsITelephonyProvider.h"
+#include "nsITelephonyService.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothRilListener;
 
 class IccListener : public nsIIccListener
 {
 public:
--- a/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp
+++ b/dom/bluetooth/bluedroid/hfp/BluetoothHfpManager.cpp
@@ -18,17 +18,17 @@
 #include "nsIAudioManager.h"
 #include "nsIDOMIccInfo.h"
 #include "nsIIccProvider.h"
 #include "nsIMobileConnectionInfo.h"
 #include "nsIMobileConnectionProvider.h"
 #include "nsIMobileNetworkInfo.h"
 #include "nsIObserverService.h"
 #include "nsISettingsService.h"
-#include "nsITelephonyProvider.h"
+#include "nsITelephonyService.h"
 #include "nsRadioInterfaceLayer.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
 
 #define MOZSETTINGS_CHANGED_ID               "mozsettings-changed"
 #define AUDIO_VOLUME_BT_SCO_ID               "audio.volume.bt_sco"
 
 /**
@@ -331,26 +331,26 @@ Call::Set(const nsAString& aNumber, cons
   if (aNumber.Length() && aNumber[0] == '+') {
     mType = BTHF_CALL_ADDRTYPE_INTERNATIONAL;
   }
 }
 
 void
 Call::Reset()
 {
-  mState = nsITelephonyProvider::CALL_STATE_DISCONNECTED;
+  mState = nsITelephonyService::CALL_STATE_DISCONNECTED;
   mDirection = BTHF_CALL_DIRECTION_OUTGOING;
   mNumber.Truncate();
   mType = BTHF_CALL_ADDRTYPE_UNKNOWN;
 }
 
 bool
 Call::IsActive()
 {
-  return (mState == nsITelephonyProvider::CALL_STATE_CONNECTED);
+  return (mState == nsITelephonyService::CALL_STATE_CONNECTED);
 }
 
 /**
  *  BluetoothHfpManager
  */
 BluetoothHfpManager::BluetoothHfpManager() : mPhoneType(PhoneType::NONE)
 {
   Reset();
@@ -669,18 +669,18 @@ BluetoothHfpManager::ProcessAtCnum()
   SendResponse(BTHF_AT_RESPONSE_OK);
 }
 
 void
 BluetoothHfpManager::ProcessAtCind()
 {
   NS_ENSURE_TRUE_VOID(sBluetoothHfpInterface);
 
-  int numActive = GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_CONNECTED);
-  int numHeld = GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_HELD);
+  int numActive = GetNumberOfCalls(nsITelephonyService::CALL_STATE_CONNECTED);
+  int numHeld = GetNumberOfCalls(nsITelephonyService::CALL_STATE_HELD);
 
   bt_status_t status = sBluetoothHfpInterface->cind_response(
                           mService,
                           numActive,
                           numHeld,
                           ConvertToBthfCallState(GetCallSetupState()),
                           mSignal,
                           mRoam,
@@ -725,20 +725,20 @@ BluetoothHfpManager::ProcessUnknownAt(ch
   NS_ENSURE_TRUE_VOID(BT_STATUS_SUCCESS ==
     sBluetoothHfpInterface->at_response(BTHF_AT_RESPONSE_ERROR, 0));
 }
 
 void
 BluetoothHfpManager::ProcessKeyPressed()
 {
   bool hasActiveCall =
-    (FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED) > 0);
+    (FindFirstCall(nsITelephonyService::CALL_STATE_CONNECTED) > 0);
 
   // Refer to AOSP HeadsetStateMachine.processKeyPressed
-  if (FindFirstCall(nsITelephonyProvider::CALL_STATE_INCOMING)
+  if (FindFirstCall(nsITelephonyService::CALL_STATE_INCOMING)
       && !hasActiveCall) {
     /**
      * Bluetooth HSP spec 4.2.2
      * There is an incoming call, notify Dialer to pick up the phone call
      * and SCO will be established after we get the CallStateChanged event
      * indicating the call is answered successfully.
      */
     ProcessAnswerCall();
@@ -970,28 +970,28 @@ BluetoothHfpManager::HandleShutdown()
   DisconnectSco();
   sBluetoothHfpManager = nullptr;
 }
 
 void
 BluetoothHfpManager::SendCLCC(Call& aCall, int aIndex)
 {
   NS_ENSURE_TRUE_VOID(aCall.mState !=
-                        nsITelephonyProvider::CALL_STATE_DISCONNECTED);
+                        nsITelephonyService::CALL_STATE_DISCONNECTED);
   NS_ENSURE_TRUE_VOID(sBluetoothHfpInterface);
 
   bthf_call_state_t callState = ConvertToBthfCallState(aCall.mState);
 
   if (mPhoneType == PhoneType::CDMA && aIndex == 1 && aCall.IsActive()) {
     callState = (mCdmaSecondCall.IsActive()) ? BTHF_CALL_STATE_HELD :
                                                BTHF_CALL_STATE_ACTIVE;
   }
 
   if (callState == BTHF_CALL_STATE_INCOMING &&
-      FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED)) {
+      FindFirstCall(nsITelephonyService::CALL_STATE_CONNECTED)) {
     callState = BTHF_CALL_STATE_WAITING;
   }
 
   bt_status_t status = sBluetoothHfpInterface->clcc_response(
                           aIndex,
                           aCall.mDirection,
                           callState,
                           BTHF_CALL_TYPE_VOICE,
@@ -1017,18 +1017,18 @@ BluetoothHfpManager::SendResponse(bthf_a
     sBluetoothHfpInterface->at_response(aResponseCode, 0));
 }
 
 void
 BluetoothHfpManager::UpdatePhoneCIND(uint32_t aCallIndex)
 {
   NS_ENSURE_TRUE_VOID(sBluetoothHfpInterface);
 
-  int numActive = GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_CONNECTED);
-  int numHeld = GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_HELD);
+  int numActive = GetNumberOfCalls(nsITelephonyService::CALL_STATE_CONNECTED);
+  int numHeld = GetNumberOfCalls(nsITelephonyService::CALL_STATE_HELD);
   bthf_call_state_t callSetupState =
     ConvertToBthfCallState(GetCallSetupState());
   nsAutoCString number =
     NS_ConvertUTF16toUTF8(mCurrentCallArray[aCallIndex].mNumber);
   bthf_call_addrtype_t type = mCurrentCallArray[aCallIndex].mType;
 
   BT_LOGR("[%d] state %d => BTHF: active[%d] held[%d] setupstate[%d]",
           aCallIndex, mCurrentCallArray[aCallIndex].mState,
@@ -1083,43 +1083,43 @@ BluetoothHfpManager::GetNumberOfCalls(ui
 
 uint16_t
 BluetoothHfpManager::GetCallSetupState()
 {
   uint32_t callLength = mCurrentCallArray.Length();
 
   for (uint32_t i = 1; i < callLength; ++i) {
     switch (mCurrentCallArray[i].mState) {
-      case nsITelephonyProvider::CALL_STATE_INCOMING:
-      case nsITelephonyProvider::CALL_STATE_DIALING:
-      case nsITelephonyProvider::CALL_STATE_ALERTING:
+      case nsITelephonyService::CALL_STATE_INCOMING:
+      case nsITelephonyService::CALL_STATE_DIALING:
+      case nsITelephonyService::CALL_STATE_ALERTING:
         return mCurrentCallArray[i].mState;
       default:
         break;
     }
   }
 
-  return nsITelephonyProvider::CALL_STATE_DISCONNECTED;
+  return nsITelephonyService::CALL_STATE_DISCONNECTED;
 }
 
 bthf_call_state_t
 BluetoothHfpManager::ConvertToBthfCallState(int aCallState)
 {
   bthf_call_state_t state;
 
   // Refer to AOSP BluetoothPhoneService.convertCallState
-  if (aCallState == nsITelephonyProvider::CALL_STATE_INCOMING) {
+  if (aCallState == nsITelephonyService::CALL_STATE_INCOMING) {
     state = BTHF_CALL_STATE_INCOMING;
-  } else if (aCallState == nsITelephonyProvider::CALL_STATE_DIALING) {
+  } else if (aCallState == nsITelephonyService::CALL_STATE_DIALING) {
     state = BTHF_CALL_STATE_DIALING;
-  } else if (aCallState == nsITelephonyProvider::CALL_STATE_ALERTING) {
+  } else if (aCallState == nsITelephonyService::CALL_STATE_ALERTING) {
     state = BTHF_CALL_STATE_ALERTING;
-  } else if (aCallState == nsITelephonyProvider::CALL_STATE_CONNECTED) {
+  } else if (aCallState == nsITelephonyService::CALL_STATE_CONNECTED) {
     state = BTHF_CALL_STATE_ACTIVE;
-  } else if (aCallState == nsITelephonyProvider::CALL_STATE_HELD) {
+  } else if (aCallState == nsITelephonyService::CALL_STATE_HELD) {
     state = BTHF_CALL_STATE_HELD;
   } else { // disconnected
     state = BTHF_CALL_STATE_IDLE;
   }
 
   return state;
 }
 
@@ -1132,21 +1132,21 @@ BluetoothHfpManager::IsTransitionState(u
    * - the call becomes held, and numHeld > 1 or an incoming call exists
    *
    * TODO:
    * 1) handle CHLD=1 transition state
    * 2) handle conference call cases
    */
   if (!aIsConference) {
     switch (aCallState) {
-      case nsITelephonyProvider::CALL_STATE_CONNECTED:
+      case nsITelephonyService::CALL_STATE_CONNECTED:
         return (GetNumberOfCalls(aCallState) > 1);
-      case nsITelephonyProvider::CALL_STATE_HELD:
+      case nsITelephonyService::CALL_STATE_HELD:
         return (GetNumberOfCalls(aCallState) > 1 ||
-                FindFirstCall(nsITelephonyProvider::CALL_STATE_INCOMING));
+                FindFirstCall(nsITelephonyService::CALL_STATE_INCOMING));
       default:
         break;
     }
   }
 
   return false;
 }
 
@@ -1183,27 +1183,27 @@ BluetoothHfpManager::HandleCallStateChan
 
   // Notify bluedroid of phone state change if this
   // call state change is not during transition state
   if (!IsTransitionState(aCallState, aIsConference)) {
     UpdatePhoneCIND(aCallIndex);
   }
 
   switch (aCallState) {
-    case nsITelephonyProvider::CALL_STATE_DIALING:
+    case nsITelephonyService::CALL_STATE_DIALING:
       // We've send Dialer a dialing request and this is the response.
       if (!mDialingRequestProcessed) {
         SendResponse(BTHF_AT_RESPONSE_OK);
         mDialingRequestProcessed = true;
       }
       break;
-    case nsITelephonyProvider::CALL_STATE_DISCONNECTED:
+    case nsITelephonyService::CALL_STATE_DISCONNECTED:
       // -1 is necessary because call 0 is an invalid (padding) call object.
       if (mCurrentCallArray.Length() - 1 ==
-          GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_DISCONNECTED)) {
+          GetNumberOfCalls(nsITelephonyService::CALL_STATE_DISCONNECTED)) {
         // In order to let user hear busy tone via connected Bluetooth headset,
         // we postpone the timing of dropping SCO.
         if (aError.EqualsLiteral("BusyError")) {
           // FIXME: UpdatePhoneCIND later since it causes SCO close but
           // Dialer is still playing busy tone via HF.
           BT_HF_DISPATCH_MAIN(MainThreadTaskCmd::POST_TASK_CLOSE_SCO);
         }
 
@@ -1248,17 +1248,17 @@ BluetoothHfpManager::UpdateSecondNumber(
 
 void
 BluetoothHfpManager::AnswerWaitingCall()
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mPhoneType == PhoneType::CDMA);
 
   // Pick up second call. First call is held now.
-  mCdmaSecondCall.mState = nsITelephonyProvider::CALL_STATE_CONNECTED;
+  mCdmaSecondCall.mState = nsITelephonyService::CALL_STATE_CONNECTED;
   // FIXME: check CDMA + bluedroid
   //UpdateCIND(CINDType::CALLSETUP, CallSetupState::NO_CALLSETUP, true);
 
   //sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
   //SendCommand("+CIEV: ", CINDType::CALLHELD);
 }
 
 void
@@ -1275,18 +1275,18 @@ BluetoothHfpManager::IgnoreWaitingCall()
 void
 BluetoothHfpManager::ToggleCalls()
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mPhoneType == PhoneType::CDMA);
 
   // Toggle acitve and held calls
   mCdmaSecondCall.mState = (mCdmaSecondCall.IsActive()) ?
-                             nsITelephonyProvider::CALL_STATE_HELD :
-                             nsITelephonyProvider::CALL_STATE_CONNECTED;
+                             nsITelephonyService::CALL_STATE_HELD :
+                             nsITelephonyService::CALL_STATE_CONNECTED;
 }
 
 bool
 BluetoothHfpManager::ConnectSco()
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   NS_ENSURE_TRUE(!sInShutdown, false);
--- a/dom/bluetooth/bluez/BluetoothHfpManager.cpp
+++ b/dom/bluetooth/bluez/BluetoothHfpManager.cpp
@@ -25,17 +25,17 @@
 #include "nsServiceManagerUtils.h"
 
 #ifdef MOZ_B2G_RIL
 #include "nsIDOMIccInfo.h"
 #include "nsIIccProvider.h"
 #include "nsIMobileConnectionInfo.h"
 #include "nsIMobileConnectionProvider.h"
 #include "nsIMobileNetworkInfo.h"
-#include "nsITelephonyProvider.h"
+#include "nsITelephonyService.h"
 #include "nsRadioInterfaceLayer.h"
 #endif
 
 /**
  * BRSF bitmask of AG supported features. See 4.34.1 "Bluetooth Defined AT
  * Capabilities" in Bluetooth hands-free profile 1.6
  */
 #define BRSF_BIT_THREE_WAY_CALLING         1
@@ -328,27 +328,27 @@ IsMandatoryIndicator(const CINDType aTyp
 Call::Call()
 {
   Reset();
 }
 
 void
 Call::Reset()
 {
-  mState = nsITelephonyProvider::CALL_STATE_DISCONNECTED;
+  mState = nsITelephonyService::CALL_STATE_DISCONNECTED;
   mDirection = false;
   mIsConference = false;
   mNumber.Truncate();
   mType = TOA_UNKNOWN;
 }
 
 bool
 Call::IsActive()
 {
-  return (mState == nsITelephonyProvider::CALL_STATE_CONNECTED);
+  return (mState == nsITelephonyService::CALL_STATE_CONNECTED);
 }
 #endif // MOZ_B2G_RIL
 
 /**
  *  BluetoothHfpManager
  */
 BluetoothHfpManager::BluetoothHfpManager()
 {
@@ -1200,45 +1200,45 @@ BluetoothHfpManager::SendCCWA(const nsAS
     ccwaMsg.AppendInt(aType);
     SendLine(ccwaMsg.get());
   }
 }
 
 bool
 BluetoothHfpManager::SendCLCC(const Call& aCall, int aIndex)
 {
-  if (aCall.mState == nsITelephonyProvider::CALL_STATE_DISCONNECTED) {
+  if (aCall.mState == nsITelephonyService::CALL_STATE_DISCONNECTED) {
     return true;
   }
 
   nsAutoCString message(RESPONSE_CLCC);
   message.AppendInt(aIndex);
   message.Append(',');
   message.AppendInt(aCall.mDirection);
   message.Append(',');
 
   int status = 0;
   switch (aCall.mState) {
-    case nsITelephonyProvider::CALL_STATE_CONNECTED:
+    case nsITelephonyService::CALL_STATE_CONNECTED:
       if (mPhoneType == PhoneType::CDMA && aIndex == 1) {
         status = (mCdmaSecondCall.IsActive()) ? 1 : 0;
       }
       message.AppendInt(status);
       break;
-    case nsITelephonyProvider::CALL_STATE_HELD:
+    case nsITelephonyService::CALL_STATE_HELD:
       message.AppendInt(1);
       break;
-    case nsITelephonyProvider::CALL_STATE_DIALING:
+    case nsITelephonyService::CALL_STATE_DIALING:
       message.AppendInt(2);
       break;
-    case nsITelephonyProvider::CALL_STATE_ALERTING:
+    case nsITelephonyService::CALL_STATE_ALERTING:
       message.AppendInt(3);
       break;
-    case nsITelephonyProvider::CALL_STATE_INCOMING:
-      if (!FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED)) {
+    case nsITelephonyService::CALL_STATE_INCOMING:
+      if (!FindFirstCall(nsITelephonyService::CALL_STATE_CONNECTED)) {
         message.AppendInt(4);
       } else {
         message.AppendInt(5);
       }
       break;
     default:
       BT_WARNING("Not handling call status for CLCC");
       break;
@@ -1452,21 +1452,21 @@ BluetoothHfpManager::HandleCallStateChan
     mCurrentCallArray[aCallIndex].mType = TOA_INTERNATIONAL;
   }
   mCurrentCallArray[aCallIndex].mNumber = aNumber;
 
   nsRefPtr<nsRunnable> sendRingTask;
   nsString address;
 
   switch (aCallState) {
-    case nsITelephonyProvider::CALL_STATE_HELD:
+    case nsITelephonyService::CALL_STATE_HELD:
       switch (prevCallState) {
-        case nsITelephonyProvider::CALL_STATE_CONNECTED: {
-          uint32_t numActive = GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_CONNECTED);
-          uint32_t numHeld = GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_HELD);
+        case nsITelephonyService::CALL_STATE_CONNECTED: {
+          uint32_t numActive = GetNumberOfCalls(nsITelephonyService::CALL_STATE_CONNECTED);
+          uint32_t numHeld = GetNumberOfCalls(nsITelephonyService::CALL_STATE_HELD);
           uint32_t numConCalls = GetNumberOfConCalls();
 
           /**
            * An active call becomes a held call.
            *
            * If this call is not a conference call,
            * - callheld state = ONHOLD_NOACTIVE if no active call remains;
            * - callheld state = ONHOLD_ACTIVE otherwise.
@@ -1484,42 +1484,42 @@ BluetoothHfpManager::HandleCallStateChan
             if (numActive + numHeld == 1) {
               // A single active call is put on hold.
               sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_NOACTIVE;
             } else {
               // An active call is placed on hold or active/held calls swapped.
               sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
             }
             SendCommand(RESPONSE_CIEV, CINDType::CALLHELD);
-          } else if (GetNumberOfConCalls(nsITelephonyProvider::CALL_STATE_HELD)
+          } else if (GetNumberOfConCalls(nsITelephonyService::CALL_STATE_HELD)
                      == numConCalls) {
             if (numActive + numHeld == numConCalls) {
               // An active conference call is put on hold.
               sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_NOACTIVE;
             } else {
               // Active calls are placed on hold or active/held calls swapped.
               sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
             }
             SendCommand(RESPONSE_CIEV, CINDType::CALLHELD);
           }
           break;
         }
-        case nsITelephonyProvider::CALL_STATE_DISCONNECTED:
+        case nsITelephonyService::CALL_STATE_DISCONNECTED:
           // The call state changed from DISCONNECTED to HELD. It could happen
           // when user held a call before Bluetooth got connected.
-          if (FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED)) {
+          if (FindFirstCall(nsITelephonyService::CALL_STATE_CONNECTED)) {
             // callheld = ONHOLD_ACTIVE if an active call already exists.
             sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
             SendCommand(RESPONSE_CIEV, CINDType::CALLHELD);
           }
           break;
       }
       break;
-    case nsITelephonyProvider::CALL_STATE_INCOMING:
-      if (FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED)) {
+    case nsITelephonyService::CALL_STATE_INCOMING:
+      if (FindFirstCall(nsITelephonyService::CALL_STATE_CONNECTED)) {
         SendCCWA(aNumber, mCurrentCallArray[aCallIndex].mType);
         UpdateCIND(CINDType::CALLSETUP, CallSetupState::INCOMING, aSend);
       } else {
         // Start sending RING indicator to HF
         sStopSendingRingFlag = false;
         UpdateCIND(CINDType::CALLSETUP, CallSetupState::INCOMING, aSend);
 
         if (mBSIR) {
@@ -1534,114 +1534,114 @@ BluetoothHfpManager::HandleCallStateChan
 
         MessageLoop::current()->PostDelayedTask(
           FROM_HERE,
           new SendRingIndicatorTask(number,
                                     mCurrentCallArray[aCallIndex].mType),
           sRingInterval);
       }
       break;
-    case nsITelephonyProvider::CALL_STATE_DIALING:
+    case nsITelephonyService::CALL_STATE_DIALING:
       if (!mDialingRequestProcessed) {
         SendLine("OK");
         mDialingRequestProcessed = true;
       }
 
       UpdateCIND(CINDType::CALLSETUP, CallSetupState::OUTGOING, aSend);
       ConnectSco();
       break;
-    case nsITelephonyProvider::CALL_STATE_ALERTING:
+    case nsITelephonyService::CALL_STATE_ALERTING:
       UpdateCIND(CINDType::CALLSETUP, CallSetupState::OUTGOING_ALERTING, aSend);
 
       // If there's an ongoing call when the headset is just connected, we have
       // to open a sco socket here.
       ConnectSco();
       break;
-    case nsITelephonyProvider::CALL_STATE_CONNECTED:
+    case nsITelephonyService::CALL_STATE_CONNECTED:
       /**
        * A call becomes active because:
        * - user answers an incoming call,
        * - user dials a outgoing call and it is answered, or
        * - SLC is connected when a call is active.
        */
       switch (prevCallState) {
-        case nsITelephonyProvider::CALL_STATE_INCOMING:
-        case nsITelephonyProvider::CALL_STATE_DISCONNECTED:
+        case nsITelephonyService::CALL_STATE_INCOMING:
+        case nsITelephonyService::CALL_STATE_DISCONNECTED:
           // Incoming call, no break
           sStopSendingRingFlag = true;
           ConnectSco();
           // NO BREAK HERE. continue to next statement
-        case nsITelephonyProvider::CALL_STATE_DIALING:
-        case nsITelephonyProvider::CALL_STATE_ALERTING:
+        case nsITelephonyService::CALL_STATE_DIALING:
+        case nsITelephonyService::CALL_STATE_ALERTING:
           // Outgoing call
           UpdateCIND(CINDType::CALL, CallState::IN_PROGRESS, aSend);
           UpdateCIND(CINDType::CALLSETUP, CallSetupState::NO_CALLSETUP, aSend);
 
-          if (FindFirstCall(nsITelephonyProvider::CALL_STATE_HELD)) {
+          if (FindFirstCall(nsITelephonyService::CALL_STATE_HELD)) {
             // callheld state = ONHOLD_ACTIVE if a held call already exists.
             UpdateCIND(CINDType::CALLHELD, CallHeldState::ONHOLD_ACTIVE, aSend);
           }
           break;
-        case nsITelephonyProvider::CALL_STATE_CONNECTED:
+        case nsITelephonyService::CALL_STATE_CONNECTED:
           // User wants to add a held call to the conversation.
           // The original connected call becomes a conference call here.
           if (aIsConference) {
             UpdateCIND(CINDType::CALLHELD, CallHeldState::NO_CALLHELD, aSend);
           }
           break;
-        case nsITelephonyProvider::CALL_STATE_HELD:
-          if (!FindFirstCall(nsITelephonyProvider::CALL_STATE_HELD)) {
+        case nsITelephonyService::CALL_STATE_HELD:
+          if (!FindFirstCall(nsITelephonyService::CALL_STATE_HELD)) {
             if (aIsConference && !prevCallIsConference) {
               // The held call was merged and becomes a conference call.
               UpdateCIND(CINDType::CALLHELD, CallHeldState::NO_CALLHELD, aSend);
             } else if (sCINDItems[CINDType::CALLHELD].value ==
                        CallHeldState::ONHOLD_NOACTIVE) {
               // The held call(s) become connected call(s).
               UpdateCIND(CINDType::CALLHELD, CallHeldState::NO_CALLHELD, aSend);
             }
           }
           break;
 
         default:
           BT_WARNING("Not handling state changed");
       }
       break;
-    case nsITelephonyProvider::CALL_STATE_DISCONNECTED:
+    case nsITelephonyService::CALL_STATE_DISCONNECTED:
       switch (prevCallState) {
-        case nsITelephonyProvider::CALL_STATE_INCOMING:
+        case nsITelephonyService::CALL_STATE_INCOMING:
           // Incoming call, no break
           sStopSendingRingFlag = true;
-        case nsITelephonyProvider::CALL_STATE_DIALING:
-        case nsITelephonyProvider::CALL_STATE_ALERTING:
+        case nsITelephonyService::CALL_STATE_DIALING:
+        case nsITelephonyService::CALL_STATE_ALERTING:
           // Outgoing call
           UpdateCIND(CINDType::CALLSETUP, CallSetupState::NO_CALLSETUP, aSend);
           break;
-        case nsITelephonyProvider::CALL_STATE_CONNECTED:
+        case nsITelephonyService::CALL_STATE_CONNECTED:
           // No call is ongoing
           if (sCINDItems[CINDType::CALLHELD].value ==
               CallHeldState::NO_CALLHELD) {
             UpdateCIND(CINDType::CALL, CallState::NO_CALL, aSend);
           }
           break;
         default:
           BT_WARNING("Not handling state changed");
       }
 
       // Handle held calls separately
-      if (!FindFirstCall(nsITelephonyProvider::CALL_STATE_HELD)) {
+      if (!FindFirstCall(nsITelephonyService::CALL_STATE_HELD)) {
         UpdateCIND(CINDType::CALLHELD, CallHeldState::NO_CALLHELD, aSend);
-      } else if (!FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED)) {
+      } else if (!FindFirstCall(nsITelephonyService::CALL_STATE_CONNECTED)) {
         UpdateCIND(CINDType::CALLHELD, CallHeldState::ONHOLD_NOACTIVE, aSend);
       } else {
         UpdateCIND(CINDType::CALLHELD, CallHeldState::ONHOLD_ACTIVE, aSend);
       }
 
       // -1 is necessary because call 0 is an invalid (padding) call object.
       if (mCurrentCallArray.Length() - 1 ==
-          GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_DISCONNECTED)) {
+          GetNumberOfCalls(nsITelephonyService::CALL_STATE_DISCONNECTED)) {
         // In order to let user hear busy tone via connected Bluetooth headset,
         // we postpone the timing of dropping SCO.
         if (!(aError.EqualsLiteral("BusyError"))) {
           DisconnectSco();
         } else {
           // Close Sco later since Dialer is still playing busy tone via HF.
           MessageLoop::current()->PostDelayedTask(FROM_HERE,
                                                   new CloseScoTask(),
@@ -1694,17 +1694,17 @@ BluetoothHfpManager::UpdateSecondNumber(
 
 void
 BluetoothHfpManager::AnswerWaitingCall()
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mPhoneType == PhoneType::CDMA);
 
   // Pick up second call. First call is held now.
-  mCdmaSecondCall.mState = nsITelephonyProvider::CALL_STATE_CONNECTED;
+  mCdmaSecondCall.mState = nsITelephonyService::CALL_STATE_CONNECTED;
   UpdateCIND(CINDType::CALLSETUP, CallSetupState::NO_CALLSETUP, true);
 
   sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
   SendCommand(RESPONSE_CIEV, CINDType::CALLHELD);
 }
 
 void
 BluetoothHfpManager::IgnoreWaitingCall()
@@ -1719,18 +1719,18 @@ BluetoothHfpManager::IgnoreWaitingCall()
 void
 BluetoothHfpManager::ToggleCalls()
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mPhoneType == PhoneType::CDMA);
 
   // Toggle acitve and held calls
   mCdmaSecondCall.mState = (mCdmaSecondCall.IsActive()) ?
-                             nsITelephonyProvider::CALL_STATE_HELD :
-                             nsITelephonyProvider::CALL_STATE_CONNECTED;
+                             nsITelephonyService::CALL_STATE_HELD :
+                             nsITelephonyService::CALL_STATE_CONNECTED;
 }
 #endif // MOZ_B2G_RIL
 
 void
 BluetoothHfpManager::OnSocketConnectSuccess(BluetoothSocket* aSocket)
 {
   MOZ_ASSERT(aSocket);
 #ifdef MOZ_B2G_RIL
--- a/dom/bluetooth2/BluetoothRilListener.cpp
+++ b/dom/bluetooth2/BluetoothRilListener.cpp
@@ -224,17 +224,17 @@ TelephonyListener::NotifyError(uint32_t 
 
   if (aCallIndex > 0) {
     // In order to not miss any related call state transition.
     // It's possible that 3G network signal lost for unknown reason.
     // If a call is released abnormally, NotifyError() will be called,
     // instead of CallStateChanged(). We need to reset the call array state
     // via setting CALL_STATE_DISCONNECTED
     hfp->HandleCallStateChanged(aCallIndex,
-                                nsITelephonyProvider::CALL_STATE_DISCONNECTED,
+                                nsITelephonyService::CALL_STATE_DISCONNECTED,
                                 aError, EmptyString(), false, false, true);
     BT_WARNING("Reset the call state due to call transition ends abnormally");
   }
 
   BT_WARNING(NS_ConvertUTF16toUTF8(aError).get());
   return NS_OK;
 }
 
@@ -278,18 +278,18 @@ TelephonyListener::NotifyCdmaCallWaiting
   hfp->UpdateSecondNumber(aNumber);
 
   return NS_OK;
 }
 
 bool
 TelephonyListener::Listen(bool aStart)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, false);
 
   nsresult rv;
   if (aStart) {
     rv = provider->RegisterListener(this);
   } else {
     rv = provider->UnregisterListener(this);
   }
@@ -389,18 +389,18 @@ BluetoothRilListener::ServiceChanged(uin
 
   BT_LOGR("%d client %d. new mClientId %d", aRegistered, aClientId,
           (mClientId < mMobileConnListeners.Length()) ? mClientId : -1);
 }
 
 void
 BluetoothRilListener::EnumerateCalls()
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE_VOID(provider);
 
   nsCOMPtr<nsITelephonyListener> listener(
     do_QueryObject(mTelephonyListener));
 
   provider->EnumerateCalls(listener);
 }
 
--- a/dom/bluetooth2/BluetoothRilListener.h
+++ b/dom/bluetooth2/BluetoothRilListener.h
@@ -8,17 +8,17 @@
 #define mozilla_dom_bluetooth_bluetoothrillistener_h__
 
 #include "BluetoothCommon.h"
 
 #include "nsAutoPtr.h"
 
 #include "nsIIccProvider.h"
 #include "nsIMobileConnectionProvider.h"
-#include "nsITelephonyProvider.h"
+#include "nsITelephonyService.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothRilListener;
 
 class IccListener : public nsIIccListener
 {
 public:
--- a/dom/bluetooth2/bluedroid/hfp/BluetoothHfpManager.cpp
+++ b/dom/bluetooth2/bluedroid/hfp/BluetoothHfpManager.cpp
@@ -18,17 +18,17 @@
 #include "nsIAudioManager.h"
 #include "nsIDOMIccInfo.h"
 #include "nsIIccProvider.h"
 #include "nsIMobileConnectionInfo.h"
 #include "nsIMobileConnectionProvider.h"
 #include "nsIMobileNetworkInfo.h"
 #include "nsIObserverService.h"
 #include "nsISettingsService.h"
-#include "nsITelephonyProvider.h"
+#include "nsITelephonyService.h"
 #include "nsRadioInterfaceLayer.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
 
 #define MOZSETTINGS_CHANGED_ID               "mozsettings-changed"
 #define AUDIO_VOLUME_BT_SCO_ID               "audio.volume.bt_sco"
 
 /**
@@ -331,26 +331,26 @@ Call::Set(const nsAString& aNumber, cons
   if (aNumber.Length() && aNumber[0] == '+') {
     mType = BTHF_CALL_ADDRTYPE_INTERNATIONAL;
   }
 }
 
 void
 Call::Reset()
 {
-  mState = nsITelephonyProvider::CALL_STATE_DISCONNECTED;
+  mState = nsITelephonyService::CALL_STATE_DISCONNECTED;
   mDirection = BTHF_CALL_DIRECTION_OUTGOING;
   mNumber.Truncate();
   mType = BTHF_CALL_ADDRTYPE_UNKNOWN;
 }
 
 bool
 Call::IsActive()
 {
-  return (mState == nsITelephonyProvider::CALL_STATE_CONNECTED);
+  return (mState == nsITelephonyService::CALL_STATE_CONNECTED);
 }
 
 /**
  *  BluetoothHfpManager
  */
 BluetoothHfpManager::BluetoothHfpManager() : mPhoneType(PhoneType::NONE)
 {
   Reset();
@@ -669,18 +669,18 @@ BluetoothHfpManager::ProcessAtCnum()
   SendResponse(BTHF_AT_RESPONSE_OK);
 }
 
 void
 BluetoothHfpManager::ProcessAtCind()
 {
   NS_ENSURE_TRUE_VOID(sBluetoothHfpInterface);
 
-  int numActive = GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_CONNECTED);
-  int numHeld = GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_HELD);
+  int numActive = GetNumberOfCalls(nsITelephonyService::CALL_STATE_CONNECTED);
+  int numHeld = GetNumberOfCalls(nsITelephonyService::CALL_STATE_HELD);
 
   bt_status_t status = sBluetoothHfpInterface->cind_response(
                           mService,
                           numActive,
                           numHeld,
                           ConvertToBthfCallState(GetCallSetupState()),
                           mSignal,
                           mRoam,
@@ -725,20 +725,20 @@ BluetoothHfpManager::ProcessUnknownAt(ch
   NS_ENSURE_TRUE_VOID(BT_STATUS_SUCCESS ==
     sBluetoothHfpInterface->at_response(BTHF_AT_RESPONSE_ERROR, 0));
 }
 
 void
 BluetoothHfpManager::ProcessKeyPressed()
 {
   bool hasActiveCall =
-    (FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED) > 0);
+    (FindFirstCall(nsITelephonyService::CALL_STATE_CONNECTED) > 0);
 
   // Refer to AOSP HeadsetStateMachine.processKeyPressed
-  if (FindFirstCall(nsITelephonyProvider::CALL_STATE_INCOMING)
+  if (FindFirstCall(nsITelephonyService::CALL_STATE_INCOMING)
       && !hasActiveCall) {
     /**
      * Bluetooth HSP spec 4.2.2
      * There is an incoming call, notify Dialer to pick up the phone call
      * and SCO will be established after we get the CallStateChanged event
      * indicating the call is answered successfully.
      */
     ProcessAnswerCall();
@@ -970,28 +970,28 @@ BluetoothHfpManager::HandleShutdown()
   DisconnectSco();
   sBluetoothHfpManager = nullptr;
 }
 
 void
 BluetoothHfpManager::SendCLCC(Call& aCall, int aIndex)
 {
   NS_ENSURE_TRUE_VOID(aCall.mState !=
-                        nsITelephonyProvider::CALL_STATE_DISCONNECTED);
+                        nsITelephonyService::CALL_STATE_DISCONNECTED);
   NS_ENSURE_TRUE_VOID(sBluetoothHfpInterface);
 
   bthf_call_state_t callState = ConvertToBthfCallState(aCall.mState);
 
   if (mPhoneType == PhoneType::CDMA && aIndex == 1 && aCall.IsActive()) {
     callState = (mCdmaSecondCall.IsActive()) ? BTHF_CALL_STATE_HELD :
                                                BTHF_CALL_STATE_ACTIVE;
   }
 
   if (callState == BTHF_CALL_STATE_INCOMING &&
-      FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED)) {
+      FindFirstCall(nsITelephonyService::CALL_STATE_CONNECTED)) {
     callState = BTHF_CALL_STATE_WAITING;
   }
 
   bt_status_t status = sBluetoothHfpInterface->clcc_response(
                           aIndex,
                           aCall.mDirection,
                           callState,
                           BTHF_CALL_TYPE_VOICE,
@@ -1017,18 +1017,18 @@ BluetoothHfpManager::SendResponse(bthf_a
     sBluetoothHfpInterface->at_response(aResponseCode, 0));
 }
 
 void
 BluetoothHfpManager::UpdatePhoneCIND(uint32_t aCallIndex)
 {
   NS_ENSURE_TRUE_VOID(sBluetoothHfpInterface);
 
-  int numActive = GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_CONNECTED);
-  int numHeld = GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_HELD);
+  int numActive = GetNumberOfCalls(nsITelephonyService::CALL_STATE_CONNECTED);
+  int numHeld = GetNumberOfCalls(nsITelephonyService::CALL_STATE_HELD);
   bthf_call_state_t callSetupState =
     ConvertToBthfCallState(GetCallSetupState());
   nsAutoCString number =
     NS_ConvertUTF16toUTF8(mCurrentCallArray[aCallIndex].mNumber);
   bthf_call_addrtype_t type = mCurrentCallArray[aCallIndex].mType;
 
   BT_LOGR("[%d] state %d => BTHF: active[%d] held[%d] setupstate[%d]",
           aCallIndex, mCurrentCallArray[aCallIndex].mState,
@@ -1083,43 +1083,43 @@ BluetoothHfpManager::GetNumberOfCalls(ui
 
 uint16_t
 BluetoothHfpManager::GetCallSetupState()
 {
   uint32_t callLength = mCurrentCallArray.Length();
 
   for (uint32_t i = 1; i < callLength; ++i) {
     switch (mCurrentCallArray[i].mState) {
-      case nsITelephonyProvider::CALL_STATE_INCOMING:
-      case nsITelephonyProvider::CALL_STATE_DIALING:
-      case nsITelephonyProvider::CALL_STATE_ALERTING:
+      case nsITelephonyService::CALL_STATE_INCOMING:
+      case nsITelephonyService::CALL_STATE_DIALING:
+      case nsITelephonyService::CALL_STATE_ALERTING:
         return mCurrentCallArray[i].mState;
       default:
         break;
     }
   }
 
-  return nsITelephonyProvider::CALL_STATE_DISCONNECTED;
+  return nsITelephonyService::CALL_STATE_DISCONNECTED;
 }
 
 bthf_call_state_t
 BluetoothHfpManager::ConvertToBthfCallState(int aCallState)
 {
   bthf_call_state_t state;
 
   // Refer to AOSP BluetoothPhoneService.convertCallState
-  if (aCallState == nsITelephonyProvider::CALL_STATE_INCOMING) {
+  if (aCallState == nsITelephonyService::CALL_STATE_INCOMING) {
     state = BTHF_CALL_STATE_INCOMING;
-  } else if (aCallState == nsITelephonyProvider::CALL_STATE_DIALING) {
+  } else if (aCallState == nsITelephonyService::CALL_STATE_DIALING) {
     state = BTHF_CALL_STATE_DIALING;
-  } else if (aCallState == nsITelephonyProvider::CALL_STATE_ALERTING) {
+  } else if (aCallState == nsITelephonyService::CALL_STATE_ALERTING) {
     state = BTHF_CALL_STATE_ALERTING;
-  } else if (aCallState == nsITelephonyProvider::CALL_STATE_CONNECTED) {
+  } else if (aCallState == nsITelephonyService::CALL_STATE_CONNECTED) {
     state = BTHF_CALL_STATE_ACTIVE;
-  } else if (aCallState == nsITelephonyProvider::CALL_STATE_HELD) {
+  } else if (aCallState == nsITelephonyService::CALL_STATE_HELD) {
     state = BTHF_CALL_STATE_HELD;
   } else { // disconnected
     state = BTHF_CALL_STATE_IDLE;
   }
 
   return state;
 }
 
@@ -1132,21 +1132,21 @@ BluetoothHfpManager::IsTransitionState(u
    * - the call becomes held, and numHeld > 1 or an incoming call exists
    *
    * TODO:
    * 1) handle CHLD=1 transition state
    * 2) handle conference call cases
    */
   if (!aIsConference) {
     switch (aCallState) {
-      case nsITelephonyProvider::CALL_STATE_CONNECTED:
+      case nsITelephonyService::CALL_STATE_CONNECTED:
         return (GetNumberOfCalls(aCallState) > 1);
-      case nsITelephonyProvider::CALL_STATE_HELD:
+      case nsITelephonyService::CALL_STATE_HELD:
         return (GetNumberOfCalls(aCallState) > 1 ||
-                FindFirstCall(nsITelephonyProvider::CALL_STATE_INCOMING));
+                FindFirstCall(nsITelephonyService::CALL_STATE_INCOMING));
       default:
         break;
     }
   }
 
   return false;
 }
 
@@ -1183,27 +1183,27 @@ BluetoothHfpManager::HandleCallStateChan
 
   // Notify bluedroid of phone state change if this
   // call state change is not during transition state
   if (!IsTransitionState(aCallState, aIsConference)) {
     UpdatePhoneCIND(aCallIndex);
   }
 
   switch (aCallState) {
-    case nsITelephonyProvider::CALL_STATE_DIALING:
+    case nsITelephonyService::CALL_STATE_DIALING:
       // We've send Dialer a dialing request and this is the response.
       if (!mDialingRequestProcessed) {
         SendResponse(BTHF_AT_RESPONSE_OK);
         mDialingRequestProcessed = true;
       }
       break;
-    case nsITelephonyProvider::CALL_STATE_DISCONNECTED:
+    case nsITelephonyService::CALL_STATE_DISCONNECTED:
       // -1 is necessary because call 0 is an invalid (padding) call object.
       if (mCurrentCallArray.Length() - 1 ==
-          GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_DISCONNECTED)) {
+          GetNumberOfCalls(nsITelephonyService::CALL_STATE_DISCONNECTED)) {
         // In order to let user hear busy tone via connected Bluetooth headset,
         // we postpone the timing of dropping SCO.
         if (aError.Equals(NS_LITERAL_STRING("BusyError"))) {
           // FIXME: UpdatePhoneCIND later since it causes SCO close but
           // Dialer is still playing busy tone via HF.
           BT_HF_DISPATCH_MAIN(MainThreadTaskCmd::POST_TASK_CLOSE_SCO);
         }
 
@@ -1248,17 +1248,17 @@ BluetoothHfpManager::UpdateSecondNumber(
 
 void
 BluetoothHfpManager::AnswerWaitingCall()
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mPhoneType == PhoneType::CDMA);
 
   // Pick up second call. First call is held now.
-  mCdmaSecondCall.mState = nsITelephonyProvider::CALL_STATE_CONNECTED;
+  mCdmaSecondCall.mState = nsITelephonyService::CALL_STATE_CONNECTED;
   // FIXME: check CDMA + bluedroid
   //UpdateCIND(CINDType::CALLSETUP, CallSetupState::NO_CALLSETUP, true);
 
   //sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
   //SendCommand("+CIEV: ", CINDType::CALLHELD);
 }
 
 void
@@ -1275,18 +1275,18 @@ BluetoothHfpManager::IgnoreWaitingCall()
 void
 BluetoothHfpManager::ToggleCalls()
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mPhoneType == PhoneType::CDMA);
 
   // Toggle acitve and held calls
   mCdmaSecondCall.mState = (mCdmaSecondCall.IsActive()) ?
-                             nsITelephonyProvider::CALL_STATE_HELD :
-                             nsITelephonyProvider::CALL_STATE_CONNECTED;
+                             nsITelephonyService::CALL_STATE_HELD :
+                             nsITelephonyService::CALL_STATE_CONNECTED;
 }
 
 bool
 BluetoothHfpManager::ConnectSco()
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   NS_ENSURE_TRUE(!sInShutdown, false);
--- a/dom/bluetooth2/bluez/BluetoothHfpManager.cpp
+++ b/dom/bluetooth2/bluez/BluetoothHfpManager.cpp
@@ -25,17 +25,17 @@
 #include "nsServiceManagerUtils.h"
 
 #ifdef MOZ_B2G_RIL
 #include "nsIDOMIccInfo.h"
 #include "nsIIccProvider.h"
 #include "nsIMobileConnectionInfo.h"
 #include "nsIMobileConnectionProvider.h"
 #include "nsIMobileNetworkInfo.h"
-#include "nsITelephonyProvider.h"
+#include "nsITelephonyService.h"
 #include "nsRadioInterfaceLayer.h"
 #endif
 
 /**
  * BRSF bitmask of AG supported features. See 4.34.1 "Bluetooth Defined AT
  * Capabilities" in Bluetooth hands-free profile 1.6
  */
 #define BRSF_BIT_THREE_WAY_CALLING         1
@@ -328,27 +328,27 @@ IsMandatoryIndicator(const CINDType aTyp
 Call::Call()
 {
   Reset();
 }
 
 void
 Call::Reset()
 {
-  mState = nsITelephonyProvider::CALL_STATE_DISCONNECTED;
+  mState = nsITelephonyService::CALL_STATE_DISCONNECTED;
   mDirection = false;
   mIsConference = false;
   mNumber.Truncate();
   mType = TOA_UNKNOWN;
 }
 
 bool
 Call::IsActive()
 {
-  return (mState == nsITelephonyProvider::CALL_STATE_CONNECTED);
+  return (mState == nsITelephonyService::CALL_STATE_CONNECTED);
 }
 #endif // MOZ_B2G_RIL
 
 /**
  *  BluetoothHfpManager
  */
 BluetoothHfpManager::BluetoothHfpManager()
 {
@@ -1200,45 +1200,45 @@ BluetoothHfpManager::SendCCWA(const nsAS
     ccwaMsg.AppendInt(aType);
     SendLine(ccwaMsg.get());
   }
 }
 
 bool
 BluetoothHfpManager::SendCLCC(const Call& aCall, int aIndex)
 {
-  if (aCall.mState == nsITelephonyProvider::CALL_STATE_DISCONNECTED) {
+  if (aCall.mState == nsITelephonyService::CALL_STATE_DISCONNECTED) {
     return true;
   }
 
   nsAutoCString message(RESPONSE_CLCC);
   message.AppendInt(aIndex);
   message.Append(',');
   message.AppendInt(aCall.mDirection);
   message.Append(',');
 
   int status = 0;
   switch (aCall.mState) {
-    case nsITelephonyProvider::CALL_STATE_CONNECTED:
+    case nsITelephonyService::CALL_STATE_CONNECTED:
       if (mPhoneType == PhoneType::CDMA && aIndex == 1) {
         status = (mCdmaSecondCall.IsActive()) ? 1 : 0;
       }
       message.AppendInt(status);
       break;
-    case nsITelephonyProvider::CALL_STATE_HELD:
+    case nsITelephonyService::CALL_STATE_HELD:
       message.AppendInt(1);
       break;
-    case nsITelephonyProvider::CALL_STATE_DIALING:
+    case nsITelephonyService::CALL_STATE_DIALING:
       message.AppendInt(2);
       break;
-    case nsITelephonyProvider::CALL_STATE_ALERTING:
+    case nsITelephonyService::CALL_STATE_ALERTING:
       message.AppendInt(3);
       break;
-    case nsITelephonyProvider::CALL_STATE_INCOMING:
-      if (!FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED)) {
+    case nsITelephonyService::CALL_STATE_INCOMING:
+      if (!FindFirstCall(nsITelephonyService::CALL_STATE_CONNECTED)) {
         message.AppendInt(4);
       } else {
         message.AppendInt(5);
       }
       break;
     default:
       BT_WARNING("Not handling call status for CLCC");
       break;
@@ -1452,21 +1452,21 @@ BluetoothHfpManager::HandleCallStateChan
     mCurrentCallArray[aCallIndex].mType = TOA_INTERNATIONAL;
   }
   mCurrentCallArray[aCallIndex].mNumber = aNumber;
 
   nsRefPtr<nsRunnable> sendRingTask;
   nsString address;
 
   switch (aCallState) {
-    case nsITelephonyProvider::CALL_STATE_HELD:
+    case nsITelephonyService::CALL_STATE_HELD:
       switch (prevCallState) {
-        case nsITelephonyProvider::CALL_STATE_CONNECTED: {
-          uint32_t numActive = GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_CONNECTED);
-          uint32_t numHeld = GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_HELD);
+        case nsITelephonyService::CALL_STATE_CONNECTED: {
+          uint32_t numActive = GetNumberOfCalls(nsITelephonyService::CALL_STATE_CONNECTED);
+          uint32_t numHeld = GetNumberOfCalls(nsITelephonyService::CALL_STATE_HELD);
           uint32_t numConCalls = GetNumberOfConCalls();
 
           /**
            * An active call becomes a held call.
            *
            * If this call is not a conference call,
            * - callheld state = ONHOLD_NOACTIVE if no active call remains;
            * - callheld state = ONHOLD_ACTIVE otherwise.
@@ -1484,42 +1484,42 @@ BluetoothHfpManager::HandleCallStateChan
             if (numActive + numHeld == 1) {
               // A single active call is put on hold.
               sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_NOACTIVE;
             } else {
               // An active call is placed on hold or active/held calls swapped.
               sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
             }
             SendCommand(RESPONSE_CIEV, CINDType::CALLHELD);
-          } else if (GetNumberOfConCalls(nsITelephonyProvider::CALL_STATE_HELD)
+          } else if (GetNumberOfConCalls(nsITelephonyService::CALL_STATE_HELD)
                      == numConCalls) {
             if (numActive + numHeld == numConCalls) {
               // An active conference call is put on hold.
               sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_NOACTIVE;
             } else {
               // Active calls are placed on hold or active/held calls swapped.
               sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
             }
             SendCommand(RESPONSE_CIEV, CINDType::CALLHELD);
           }
           break;
         }
-        case nsITelephonyProvider::CALL_STATE_DISCONNECTED:
+        case nsITelephonyService::CALL_STATE_DISCONNECTED:
           // The call state changed from DISCONNECTED to HELD. It could happen
           // when user held a call before Bluetooth got connected.
-          if (FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED)) {
+          if (FindFirstCall(nsITelephonyService::CALL_STATE_CONNECTED)) {
             // callheld = ONHOLD_ACTIVE if an active call already exists.
             sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
             SendCommand(RESPONSE_CIEV, CINDType::CALLHELD);
           }
           break;
       }
       break;
-    case nsITelephonyProvider::CALL_STATE_INCOMING:
-      if (FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED)) {
+    case nsITelephonyService::CALL_STATE_INCOMING:
+      if (FindFirstCall(nsITelephonyService::CALL_STATE_CONNECTED)) {
         SendCCWA(aNumber, mCurrentCallArray[aCallIndex].mType);
         UpdateCIND(CINDType::CALLSETUP, CallSetupState::INCOMING, aSend);
       } else {
         // Start sending RING indicator to HF
         sStopSendingRingFlag = false;
         UpdateCIND(CINDType::CALLSETUP, CallSetupState::INCOMING, aSend);
 
         if (mBSIR) {
@@ -1534,114 +1534,114 @@ BluetoothHfpManager::HandleCallStateChan
 
         MessageLoop::current()->PostDelayedTask(
           FROM_HERE,
           new SendRingIndicatorTask(number,
                                     mCurrentCallArray[aCallIndex].mType),
           sRingInterval);
       }
       break;
-    case nsITelephonyProvider::CALL_STATE_DIALING:
+    case nsITelephonyService::CALL_STATE_DIALING:
       if (!mDialingRequestProcessed) {
         SendLine("OK");
         mDialingRequestProcessed = true;
       }
 
       UpdateCIND(CINDType::CALLSETUP, CallSetupState::OUTGOING, aSend);
       ConnectSco();
       break;
-    case nsITelephonyProvider::CALL_STATE_ALERTING:
+    case nsITelephonyService::CALL_STATE_ALERTING:
       UpdateCIND(CINDType::CALLSETUP, CallSetupState::OUTGOING_ALERTING, aSend);
 
       // If there's an ongoing call when the headset is just connected, we have
       // to open a sco socket here.
       ConnectSco();
       break;
-    case nsITelephonyProvider::CALL_STATE_CONNECTED:
+    case nsITelephonyService::CALL_STATE_CONNECTED:
       /**
        * A call becomes active because:
        * - user answers an incoming call,
        * - user dials a outgoing call and it is answered, or
        * - SLC is connected when a call is active.
        */
       switch (prevCallState) {
-        case nsITelephonyProvider::CALL_STATE_INCOMING:
-        case nsITelephonyProvider::CALL_STATE_DISCONNECTED:
+        case nsITelephonyService::CALL_STATE_INCOMING:
+        case nsITelephonyService::CALL_STATE_DISCONNECTED:
           // Incoming call, no break
           sStopSendingRingFlag = true;
           ConnectSco();
           // NO BREAK HERE. continue to next statement
-        case nsITelephonyProvider::CALL_STATE_DIALING:
-        case nsITelephonyProvider::CALL_STATE_ALERTING:
+        case nsITelephonyService::CALL_STATE_DIALING:
+        case nsITelephonyService::CALL_STATE_ALERTING:
           // Outgoing call
           UpdateCIND(CINDType::CALL, CallState::IN_PROGRESS, aSend);
           UpdateCIND(CINDType::CALLSETUP, CallSetupState::NO_CALLSETUP, aSend);
 
-          if (FindFirstCall(nsITelephonyProvider::CALL_STATE_HELD)) {
+          if (FindFirstCall(nsITelephonyService::CALL_STATE_HELD)) {
             // callheld state = ONHOLD_ACTIVE if a held call already exists.
             UpdateCIND(CINDType::CALLHELD, CallHeldState::ONHOLD_ACTIVE, aSend);
           }
           break;
-        case nsITelephonyProvider::CALL_STATE_CONNECTED:
+        case nsITelephonyService::CALL_STATE_CONNECTED:
           // User wants to add a held call to the conversation.
           // The original connected call becomes a conference call here.
           if (aIsConference) {
             UpdateCIND(CINDType::CALLHELD, CallHeldState::NO_CALLHELD, aSend);
           }
           break;
-        case nsITelephonyProvider::CALL_STATE_HELD:
-          if (!FindFirstCall(nsITelephonyProvider::CALL_STATE_HELD)) {
+        case nsITelephonyService::CALL_STATE_HELD:
+          if (!FindFirstCall(nsITelephonyService::CALL_STATE_HELD)) {
             if (aIsConference && !prevCallIsConference) {
               // The held call was merged and becomes a conference call.
               UpdateCIND(CINDType::CALLHELD, CallHeldState::NO_CALLHELD, aSend);
             } else if (sCINDItems[CINDType::CALLHELD].value ==
                        CallHeldState::ONHOLD_NOACTIVE) {
               // The held call(s) become connected call(s).
               UpdateCIND(CINDType::CALLHELD, CallHeldState::NO_CALLHELD, aSend);
             }
           }
           break;
 
         default:
           BT_WARNING("Not handling state changed");
       }
       break;
-    case nsITelephonyProvider::CALL_STATE_DISCONNECTED:
+    case nsITelephonyService::CALL_STATE_DISCONNECTED:
       switch (prevCallState) {
-        case nsITelephonyProvider::CALL_STATE_INCOMING:
+        case nsITelephonyService::CALL_STATE_INCOMING:
           // Incoming call, no break
           sStopSendingRingFlag = true;
-        case nsITelephonyProvider::CALL_STATE_DIALING:
-        case nsITelephonyProvider::CALL_STATE_ALERTING:
+        case nsITelephonyService::CALL_STATE_DIALING:
+        case nsITelephonyService::CALL_STATE_ALERTING:
           // Outgoing call
           UpdateCIND(CINDType::CALLSETUP, CallSetupState::NO_CALLSETUP, aSend);
           break;
-        case nsITelephonyProvider::CALL_STATE_CONNECTED:
+        case nsITelephonyService::CALL_STATE_CONNECTED:
           // No call is ongoing
           if (sCINDItems[CINDType::CALLHELD].value ==
               CallHeldState::NO_CALLHELD) {
             UpdateCIND(CINDType::CALL, CallState::NO_CALL, aSend);
           }
           break;
         default:
           BT_WARNING("Not handling state changed");
       }
 
       // Handle held calls separately
-      if (!FindFirstCall(nsITelephonyProvider::CALL_STATE_HELD)) {
+      if (!FindFirstCall(nsITelephonyService::CALL_STATE_HELD)) {
         UpdateCIND(CINDType::CALLHELD, CallHeldState::NO_CALLHELD, aSend);
-      } else if (!FindFirstCall(nsITelephonyProvider::CALL_STATE_CONNECTED)) {
+      } else if (!FindFirstCall(nsITelephonyService::CALL_STATE_CONNECTED)) {
         UpdateCIND(CINDType::CALLHELD, CallHeldState::ONHOLD_NOACTIVE, aSend);
       } else {
         UpdateCIND(CINDType::CALLHELD, CallHeldState::ONHOLD_ACTIVE, aSend);
       }
 
       // -1 is necessary because call 0 is an invalid (padding) call object.
       if (mCurrentCallArray.Length() - 1 ==
-          GetNumberOfCalls(nsITelephonyProvider::CALL_STATE_DISCONNECTED)) {
+          GetNumberOfCalls(nsITelephonyService::CALL_STATE_DISCONNECTED)) {
         // In order to let user hear busy tone via connected Bluetooth headset,
         // we postpone the timing of dropping SCO.
         if (!(aError.Equals(NS_LITERAL_STRING("BusyError")))) {
           DisconnectSco();
         } else {
           // Close Sco later since Dialer is still playing busy tone via HF.
           MessageLoop::current()->PostDelayedTask(FROM_HERE,
                                                   new CloseScoTask(),
@@ -1694,17 +1694,17 @@ BluetoothHfpManager::UpdateSecondNumber(
 
 void
 BluetoothHfpManager::AnswerWaitingCall()
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mPhoneType == PhoneType::CDMA);
 
   // Pick up second call. First call is held now.
-  mCdmaSecondCall.mState = nsITelephonyProvider::CALL_STATE_CONNECTED;
+  mCdmaSecondCall.mState = nsITelephonyService::CALL_STATE_CONNECTED;
   UpdateCIND(CINDType::CALLSETUP, CallSetupState::NO_CALLSETUP, true);
 
   sCINDItems[CINDType::CALLHELD].value = CallHeldState::ONHOLD_ACTIVE;
   SendCommand(RESPONSE_CIEV, CINDType::CALLHELD);
 }
 
 void
 BluetoothHfpManager::IgnoreWaitingCall()
@@ -1719,18 +1719,18 @@ BluetoothHfpManager::IgnoreWaitingCall()
 void
 BluetoothHfpManager::ToggleCalls()
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(mPhoneType == PhoneType::CDMA);
 
   // Toggle acitve and held calls
   mCdmaSecondCall.mState = (mCdmaSecondCall.IsActive()) ?
-                             nsITelephonyProvider::CALL_STATE_HELD :
-                             nsITelephonyProvider::CALL_STATE_CONNECTED;
+                             nsITelephonyService::CALL_STATE_HELD :
+                             nsITelephonyService::CALL_STATE_CONNECTED;
 }
 #endif // MOZ_B2G_RIL
 
 void
 BluetoothHfpManager::OnSocketConnectSuccess(BluetoothSocket* aSocket)
 {
   MOZ_ASSERT(aSocket);
 #ifdef MOZ_B2G_RIL
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -206,19 +206,19 @@ XPCOMUtils.defineLazyServiceGetter(this,
 XPCOMUtils.defineLazyServiceGetter(this, "gTimeService",
                                    "@mozilla.org/time/timeservice;1",
                                    "nsITimeService");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gSystemWorkerManager",
                                    "@mozilla.org/telephony/system-worker-manager;1",
                                    "nsISystemWorkerManager");
 
-XPCOMUtils.defineLazyServiceGetter(this, "gTelephonyProvider",
-                                   "@mozilla.org/telephony/telephonyprovider;1",
-                                   "nsIGonkTelephonyProvider");
+XPCOMUtils.defineLazyServiceGetter(this, "gTelephonyService",
+                                   "@mozilla.org/telephony/telephonyservice;1",
+                                   "nsIGonkTelephonyService");
 
 XPCOMUtils.defineLazyGetter(this, "WAP", function() {
   let wap = {};
   Cu.import("resource://gre/modules/WapPushManager.js", wap);
   return wap;
 });
 
 XPCOMUtils.defineLazyGetter(this, "PhoneNumberUtils", function() {
@@ -2058,32 +2058,32 @@ RadioInterface.prototype = {
     }
     return null;
   },
 
   handleUnsolicitedWorkerMessage: function(message) {
     let connHandler = gDataConnectionManager.getConnectionHandler(this.clientId);
     switch (message.rilMessageType) {
       case "callRing":
-        gTelephonyProvider.notifyCallRing();
+        gTelephonyService.notifyCallRing();
         break;
       case "callStateChange":
-        gTelephonyProvider.notifyCallStateChanged(this.clientId, message.call);
+        gTelephonyService.notifyCallStateChanged(this.clientId, message.call);
         break;
       case "callDisconnected":
-        gTelephonyProvider.notifyCallDisconnected(this.clientId, message.call);
+        gTelephonyService.notifyCallDisconnected(this.clientId, message.call);
         break;
       case "conferenceCallStateChanged":
-        gTelephonyProvider.notifyConferenceCallStateChanged(message.state);
+        gTelephonyService.notifyConferenceCallStateChanged(message.state);
         break;
       case "cdmaCallWaiting":
-        gTelephonyProvider.notifyCdmaCallWaiting(this.clientId, message.number);
+        gTelephonyService.notifyCdmaCallWaiting(this.clientId, message.number);
         break;
       case "suppSvcNotification":
-        gTelephonyProvider.notifySupplementaryService(this.clientId,
+        gTelephonyService.notifySupplementaryService(this.clientId,
                                                       message.callIndex,
                                                       message.notification);
         break;
       case "datacallerror":
         connHandler.handleDataCallError(message);
         break;
       case "datacallstatechange":
         let addresses = [];
--- a/dom/telephony/Telephony.cpp
+++ b/dom/telephony/Telephony.cpp
@@ -141,18 +141,18 @@ Telephony::WrapObject(JSContext* aCx)
 }
 
 // static
 already_AddRefed<Telephony>
 Telephony::Create(nsPIDOMWindow* aOwner, ErrorResult& aRv)
 {
   NS_ASSERTION(aOwner, "Null owner!");
 
-  nsCOMPtr<nsITelephonyProvider> ril =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> ril =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   if (!ril) {
     aRv.Throw(NS_ERROR_UNEXPECTED);
     return nullptr;
   }
 
   nsCOMPtr<nsIScriptGlobalObject> sgo = do_QueryInterface(aOwner);
   if (!sgo) {
     aRv.Throw(NS_ERROR_UNEXPECTED);
@@ -199,19 +199,19 @@ bool
 Telephony::IsValidServiceId(uint32_t aServiceId)
 {
   return aServiceId < GetNumServices();
 }
 
 // static
 bool
 Telephony::IsActiveState(uint16_t aCallState) {
-  return aCallState == nsITelephonyProvider::CALL_STATE_DIALING ||
-      aCallState == nsITelephonyProvider::CALL_STATE_ALERTING ||
-      aCallState == nsITelephonyProvider::CALL_STATE_CONNECTED;
+  return aCallState == nsITelephonyService::CALL_STATE_DIALING ||
+      aCallState == nsITelephonyService::CALL_STATE_ALERTING ||
+      aCallState == nsITelephonyService::CALL_STATE_CONNECTED;
 }
 
 uint32_t
 Telephony::ProvidedOrDefaultServiceId(const Optional<uint32_t>& aServiceId)
 {
   if (aServiceId.WasPassed()) {
     return aServiceId.Value();
   } else {
@@ -221,18 +221,18 @@ Telephony::ProvidedOrDefaultServiceId(co
   }
 }
 
 bool
 Telephony::HasDialingCall()
 {
   for (uint32_t i = 0; i < mCalls.Length(); i++) {
     const nsRefPtr<TelephonyCall>& call = mCalls[i];
-    if (call->CallState() > nsITelephonyProvider::CALL_STATE_UNKNOWN &&
-        call->CallState() < nsITelephonyProvider::CALL_STATE_CONNECTED) {
+    if (call->CallState() > nsITelephonyService::CALL_STATE_UNKNOWN &&
+        call->CallState() < nsITelephonyService::CALL_STATE_CONNECTED) {
       return true;
     }
   }
 
   return false;
 }
 
 bool
@@ -277,17 +277,17 @@ Telephony::DialInternal(uint32_t aServic
 }
 
 already_AddRefed<TelephonyCall>
 Telephony::CreateNewDialingCall(uint32_t aServiceId, const nsAString& aNumber,
                                 uint32_t aCallIndex)
 {
   nsRefPtr<TelephonyCall> call =
     TelephonyCall::Create(this, aServiceId, aNumber,
-                          nsITelephonyProvider::CALL_STATE_DIALING, aCallIndex);
+                          nsITelephonyService::CALL_STATE_DIALING, aCallIndex);
   NS_ASSERTION(call, "This should never fail!");
 
   NS_ASSERTION(mCalls.Contains(call), "Should have auto-added new call!");
 
   return call.forget();
 }
 
 nsresult
@@ -444,17 +444,17 @@ Telephony::SetSpeakerEnabled(bool aEnabl
   aRv = mProvider->SetSpeakerEnabled(aEnabled);
 }
 
 void
 Telephony::GetActive(Nullable<OwningTelephonyCallOrTelephonyCallGroup>& aValue)
 {
   if (mActiveCall) {
     aValue.SetValue().SetAsTelephonyCall() = mActiveCall;
-  } else if (mGroup->CallState() == nsITelephonyProvider::CALL_STATE_CONNECTED) {
+  } else if (mGroup->CallState() == nsITelephonyService::CALL_STATE_CONNECTED) {
     aValue.SetValue().SetAsTelephonyCallGroup() = mGroup;
   } else {
     aValue.SetNull();
   }
 }
 
 already_AddRefed<CallsList>
 Telephony::Calls() const
@@ -525,32 +525,32 @@ Telephony::CallStateChanged(uint32_t aSe
       AddCall(modifiedCall);
     }
 
     return NS_OK;
   }
 
   // Do nothing since we didn't know anything about it before now and it's
   // ended already.
-  if (aCallState == nsITelephonyProvider::CALL_STATE_DISCONNECTED) {
+  if (aCallState == nsITelephonyService::CALL_STATE_DISCONNECTED) {
     return NS_OK;
   }
 
   // Didn't find this call in mCalls or mGroup. Create a new call.
   nsRefPtr<TelephonyCall> call =
       TelephonyCall::Create(this, aServiceId, aNumber, aCallState, aCallIndex,
                             aIsEmergency, aIsConference, aIsSwitchable,
                             aIsMergeable);
   NS_ASSERTION(call, "This should never fail!");
 
   NS_ASSERTION(aIsConference ? mGroup->CallsArray().Contains(call) :
                                mCalls.Contains(call),
                "Should have auto-added new call!");
 
-  if (aCallState == nsITelephonyProvider::CALL_STATE_INCOMING) {
+  if (aCallState == nsITelephonyService::CALL_STATE_INCOMING) {
     nsresult rv = DispatchCallEvent(NS_LITERAL_STRING("incoming"), call);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
@@ -615,20 +615,20 @@ Telephony::SupplementaryServiceNotificat
 {
   nsRefPtr<TelephonyCall> associatedCall;
   if (!mCalls.IsEmpty()) {
     associatedCall = GetCall(aServiceId, aCallIndex);
   }
 
   nsresult rv;
   switch (aNotification) {
-    case nsITelephonyProvider::NOTIFICATION_REMOTE_HELD:
+    case nsITelephonyService::NOTIFICATION_REMOTE_HELD:
       rv = DispatchCallEvent(NS_LITERAL_STRING("remoteheld"), associatedCall);
       break;
-    case nsITelephonyProvider::NOTIFICATION_REMOTE_RESUMED:
+    case nsITelephonyService::NOTIFICATION_REMOTE_RESUMED:
       rv = DispatchCallEvent(NS_LITERAL_STRING("remoteresumed"), associatedCall);
       break;
     default:
       NS_ERROR("Got a bad notification!");
       return NS_ERROR_UNEXPECTED;
   }
 
   NS_ENSURE_SUCCESS(rv, rv);
--- a/dom/telephony/Telephony.h
+++ b/dom/telephony/Telephony.h
@@ -6,17 +6,17 @@
 
 #ifndef mozilla_dom_telephony_telephony_h__
 #define mozilla_dom_telephony_telephony_h__
 
 #include "mozilla/dom/BindingDeclarations.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/telephony/TelephonyCommon.h"
 
-#include "nsITelephonyProvider.h"
+#include "nsITelephonyService.h"
 
 // Need to include TelephonyCall.h because we have inline methods that
 // assume they see the definition of TelephonyCall.
 #include "TelephonyCall.h"
 
 class nsPIDOMWindow;
 
 namespace mozilla {
@@ -24,29 +24,29 @@ namespace dom {
 
 class OwningTelephonyCallOrTelephonyCallGroup;
 
 class Telephony MOZ_FINAL : public DOMEventTargetHelper
 {
   /**
    * Class Telephony doesn't actually inherit nsITelephonyListener.
    * Instead, it owns an nsITelephonyListener derived instance mListener
-   * and passes it to nsITelephonyProvider. The onreceived events are first
+   * and passes it to nsITelephonyService. The onreceived events are first
    * delivered to mListener and then forwarded to its owner, Telephony. See
    * also bug 775997 comment #51.
    */
   class Listener;
 
   class Callback;
   friend class Callback;
 
   class EnumerationAck;
   friend class EnumerationAck;
 
-  nsCOMPtr<nsITelephonyProvider> mProvider;
+  nsCOMPtr<nsITelephonyService> mProvider;
   nsRefPtr<Listener> mListener;
 
   TelephonyCall* mActiveCall;
   nsTArray<nsRefPtr<TelephonyCall> > mCalls;
   nsRefPtr<CallsList> mCallsList;
 
   nsRefPtr<TelephonyCallGroup> mGroup;
 
@@ -125,17 +125,17 @@ public:
   RemoveCall(TelephonyCall* aCall)
   {
     NS_ASSERTION(mCalls.Contains(aCall), "Didn't know about this one!");
     mCalls.RemoveElement(aCall);
     UpdateActiveCall(aCall, false);
     NotifyCallsChanged(aCall);
   }
 
-  nsITelephonyProvider*
+  nsITelephonyService*
   Provider() const
   {
     return mProvider;
   }
 
   const nsTArray<nsRefPtr<TelephonyCall> >&
   CallsArray() const
   {
--- a/dom/telephony/TelephonyCall.cpp
+++ b/dom/telephony/TelephonyCall.cpp
@@ -41,17 +41,17 @@ TelephonyCall::Create(Telephony* aTeleph
 
   call->ChangeStateInternal(aCallState, false);
 
   return call.forget();
 }
 
 TelephonyCall::TelephonyCall(nsPIDOMWindow* aOwner)
   : DOMEventTargetHelper(aOwner),
-    mCallState(nsITelephonyProvider::CALL_STATE_UNKNOWN),
+    mCallState(nsITelephonyService::CALL_STATE_UNKNOWN),
     mLive(false)
 {
 }
 
 TelephonyCall::~TelephonyCall()
 {
 }
 
@@ -63,54 +63,54 @@ TelephonyCall::WrapObject(JSContext* aCx
 
 void
 TelephonyCall::ChangeStateInternal(uint16_t aCallState, bool aFireEvents)
 {
   nsRefPtr<TelephonyCall> kungFuDeathGrip(this);
 
   nsString stateString;
   switch (aCallState) {
-    case nsITelephonyProvider::CALL_STATE_DIALING:
+    case nsITelephonyService::CALL_STATE_DIALING:
       stateString.AssignLiteral("dialing");
       break;
-    case nsITelephonyProvider::CALL_STATE_ALERTING:
+    case nsITelephonyService::CALL_STATE_ALERTING:
       stateString.AssignLiteral("alerting");
       break;
-    case nsITelephonyProvider::CALL_STATE_CONNECTING:
+    case nsITelephonyService::CALL_STATE_CONNECTING:
       stateString.AssignLiteral("connecting");
       break;
-    case nsITelephonyProvider::CALL_STATE_CONNECTED:
+    case nsITelephonyService::CALL_STATE_CONNECTED:
       stateString.AssignLiteral("connected");
       break;
-    case nsITelephonyProvider::CALL_STATE_HOLDING:
+    case nsITelephonyService::CALL_STATE_HOLDING:
       stateString.AssignLiteral("holding");
       break;
-    case nsITelephonyProvider::CALL_STATE_HELD:
+    case nsITelephonyService::CALL_STATE_HELD:
       stateString.AssignLiteral("held");
       break;
-    case nsITelephonyProvider::CALL_STATE_RESUMING:
+    case nsITelephonyService::CALL_STATE_RESUMING:
       stateString.AssignLiteral("resuming");
       break;
-    case nsITelephonyProvider::CALL_STATE_DISCONNECTING:
+    case nsITelephonyService::CALL_STATE_DISCONNECTING:
       stateString.AssignLiteral("disconnecting");
       break;
-    case nsITelephonyProvider::CALL_STATE_DISCONNECTED:
+    case nsITelephonyService::CALL_STATE_DISCONNECTED:
       stateString.AssignLiteral("disconnected");
       break;
-    case nsITelephonyProvider::CALL_STATE_INCOMING:
+    case nsITelephonyService::CALL_STATE_INCOMING:
       stateString.AssignLiteral("incoming");
       break;
     default:
       NS_NOTREACHED("Unknown state!");
   }
 
   mState = stateString;
   mCallState = aCallState;
 
-  if (aCallState == nsITelephonyProvider::CALL_STATE_DISCONNECTED) {
+  if (aCallState == nsITelephonyService::CALL_STATE_DISCONNECTED) {
     NS_ASSERTION(mLive, "Should be live!");
     mLive = false;
     if (mGroup) {
       mGroup->RemoveCall(this);
     } else {
       mTelephony->RemoveCall(this);
     }
   } else if (!mLive) {
@@ -154,17 +154,17 @@ void
 TelephonyCall::NotifyError(const nsAString& aError)
 {
   // Set the error string
   NS_ASSERTION(!mError, "Already have an error?");
 
   mError = new DOMError(GetOwner(), aError);
 
   // Do the state transitions
-  ChangeStateInternal(nsITelephonyProvider::CALL_STATE_DISCONNECTED, true);
+  ChangeStateInternal(nsITelephonyService::CALL_STATE_DISCONNECTED, true);
 
   nsresult rv = DispatchCallEvent(NS_LITERAL_STRING("error"), this);
   if (NS_FAILED(rv)) {
     NS_WARNING("Failed to dispatch error event!");
   }
 }
 
 void
@@ -204,54 +204,54 @@ TelephonyCall::GetGroup() const
 {
   nsRefPtr<TelephonyCallGroup> group = mGroup;
   return group.forget();
 }
 
 void
 TelephonyCall::Answer(ErrorResult& aRv)
 {
-  if (mCallState != nsITelephonyProvider::CALL_STATE_INCOMING) {
+  if (mCallState != nsITelephonyService::CALL_STATE_INCOMING) {
     NS_WARNING("Answer on non-incoming call ignored!");
     return;
   }
 
   nsresult rv = mTelephony->Provider()->AnswerCall(mServiceId, mCallIndex);
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
     return;
   }
 
-  ChangeStateInternal(nsITelephonyProvider::CALL_STATE_CONNECTING, true);
+  ChangeStateInternal(nsITelephonyService::CALL_STATE_CONNECTING, true);
 }
 
 void
 TelephonyCall::HangUp(ErrorResult& aRv)
 {
-  if (mCallState == nsITelephonyProvider::CALL_STATE_DISCONNECTING ||
-      mCallState == nsITelephonyProvider::CALL_STATE_DISCONNECTED) {
+  if (mCallState == nsITelephonyService::CALL_STATE_DISCONNECTING ||
+      mCallState == nsITelephonyService::CALL_STATE_DISCONNECTED) {
     NS_WARNING("HangUp on previously disconnected call ignored!");
     return;
   }
 
-  nsresult rv = mCallState == nsITelephonyProvider::CALL_STATE_INCOMING ?
+  nsresult rv = mCallState == nsITelephonyService::CALL_STATE_INCOMING ?
                 mTelephony->Provider()->RejectCall(mServiceId, mCallIndex) :
                 mTelephony->Provider()->HangUp(mServiceId, mCallIndex);
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
     return;
   }
 
-  ChangeStateInternal(nsITelephonyProvider::CALL_STATE_DISCONNECTING, true);
+  ChangeStateInternal(nsITelephonyService::CALL_STATE_DISCONNECTING, true);
 }
 
 void
 TelephonyCall::Hold(ErrorResult& aRv)
 {
-  if (mCallState != nsITelephonyProvider::CALL_STATE_CONNECTED) {
+  if (mCallState != nsITelephonyService::CALL_STATE_CONNECTED) {
     NS_WARNING("Hold non-connected call ignored!");
     return;
   }
 
   if (mGroup) {
     NS_WARNING("Hold a call in conference ignored!");
     return;
   }
@@ -269,23 +269,23 @@ TelephonyCall::Hold(ErrorResult& aRv)
 
   if (!mSecondNumber.IsEmpty()) {
     // No state transition when we switch two numbers within one TelephonyCall
     // object. Otherwise, the state here will be inconsistent with the backend
     // RIL and will never be right.
     return;
   }
 
-  ChangeStateInternal(nsITelephonyProvider::CALL_STATE_HOLDING, true);
+  ChangeStateInternal(nsITelephonyService::CALL_STATE_HOLDING, true);
 }
 
 void
 TelephonyCall::Resume(ErrorResult& aRv)
 {
-  if (mCallState != nsITelephonyProvider::CALL_STATE_HELD) {
+  if (mCallState != nsITelephonyService::CALL_STATE_HELD) {
     NS_WARNING("Resume non-held call ignored!");
     return;
   }
 
   if (mGroup) {
     NS_WARNING("Resume a call in conference ignored!");
     return;
   }
@@ -296,10 +296,10 @@ TelephonyCall::Resume(ErrorResult& aRv)
   }
 
   nsresult rv = mTelephony->Provider()->ResumeCall(mServiceId, mCallIndex);
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
     return;
   }
 
-  ChangeStateInternal(nsITelephonyProvider::CALL_STATE_RESUMING, true);
+  ChangeStateInternal(nsITelephonyService::CALL_STATE_RESUMING, true);
 }
--- a/dom/telephony/TelephonyCallGroup.cpp
+++ b/dom/telephony/TelephonyCallGroup.cpp
@@ -12,17 +12,17 @@
 #include "mozilla/dom/CallGroupErrorEvent.h"
 #include "Telephony.h"
 
 using namespace mozilla::dom;
 using mozilla::ErrorResult;
 
 TelephonyCallGroup::TelephonyCallGroup(nsPIDOMWindow* aOwner)
   : DOMEventTargetHelper(aOwner)
-  , mCallState(nsITelephonyProvider::CALL_STATE_UNKNOWN)
+  , mCallState(nsITelephonyService::CALL_STATE_UNKNOWN)
 {
 }
 
 TelephonyCallGroup::~TelephonyCallGroup()
 {
 }
 
 // static
@@ -83,28 +83,28 @@ void
 TelephonyCallGroup::ChangeState(uint16_t aCallState)
 {
   if (mCallState == aCallState) {
     return;
   }
 
   nsString stateString;
   switch (aCallState) {
-    case nsITelephonyProvider::CALL_STATE_UNKNOWN:
+    case nsITelephonyService::CALL_STATE_UNKNOWN:
       break;
-    case nsITelephonyProvider::CALL_STATE_CONNECTED:
+    case nsITelephonyService::CALL_STATE_CONNECTED:
       stateString.AssignLiteral("connected");
       break;
-    case nsITelephonyProvider::CALL_STATE_HOLDING:
+    case nsITelephonyService::CALL_STATE_HOLDING:
       stateString.AssignLiteral("holding");
       break;
-    case nsITelephonyProvider::CALL_STATE_HELD:
+    case nsITelephonyService::CALL_STATE_HELD:
       stateString.AssignLiteral("held");
       break;
-    case nsITelephonyProvider::CALL_STATE_RESUMING:
+    case nsITelephonyService::CALL_STATE_RESUMING:
       stateString.AssignLiteral("resuming");
       break;
     default:
       NS_NOTREACHED("Unknown state!");
   }
 
   mState = stateString;
   mCallState = aCallState;
@@ -152,36 +152,36 @@ TelephonyCallGroup::CanConference(const 
 {
   if (!aCall.Mergeable()) {
     return false;
   }
 
   if (!aSecondCall) {
     MOZ_ASSERT(!mCalls.IsEmpty());
 
-    return (mCallState == nsITelephonyProvider::CALL_STATE_CONNECTED &&
-            aCall.CallState() == nsITelephonyProvider::CALL_STATE_HELD) ||
-           (mCallState == nsITelephonyProvider::CALL_STATE_HELD &&
-            aCall.CallState() == nsITelephonyProvider::CALL_STATE_CONNECTED);
+    return (mCallState == nsITelephonyService::CALL_STATE_CONNECTED &&
+            aCall.CallState() == nsITelephonyService::CALL_STATE_HELD) ||
+           (mCallState == nsITelephonyService::CALL_STATE_HELD &&
+            aCall.CallState() == nsITelephonyService::CALL_STATE_CONNECTED);
   }
 
-  MOZ_ASSERT(mCallState == nsITelephonyProvider::CALL_STATE_UNKNOWN);
+  MOZ_ASSERT(mCallState == nsITelephonyService::CALL_STATE_UNKNOWN);
 
   if (aCall.ServiceId() != aSecondCall->ServiceId()) {
     return false;
   }
 
   if (!aSecondCall->Mergeable()) {
     return false;
   }
 
-  return (aCall.CallState() == nsITelephonyProvider::CALL_STATE_CONNECTED &&
-          aSecondCall->CallState() == nsITelephonyProvider::CALL_STATE_HELD) ||
-         (aCall.CallState() == nsITelephonyProvider::CALL_STATE_HELD &&
-          aSecondCall->CallState() == nsITelephonyProvider::CALL_STATE_CONNECTED);
+  return (aCall.CallState() == nsITelephonyService::CALL_STATE_CONNECTED &&
+          aSecondCall->CallState() == nsITelephonyService::CALL_STATE_HELD) ||
+         (aCall.CallState() == nsITelephonyService::CALL_STATE_HELD &&
+          aSecondCall->CallState() == nsITelephonyService::CALL_STATE_CONNECTED);
 }
 
 already_AddRefed<TelephonyCall>
 TelephonyCallGroup::GetCall(uint32_t aServiceId, uint32_t aCallIndex)
 {
   nsRefPtr<TelephonyCall> call;
 
   for (uint32_t index = 0; index < mCalls.Length(); index++) {
@@ -249,17 +249,17 @@ TelephonyCallGroup::Add(TelephonyCall& a
   }
 
   aRv = mTelephony->Provider()->ConferenceCall(aCall.ServiceId());
 }
 
 void
 TelephonyCallGroup::Remove(TelephonyCall& aCall, ErrorResult& aRv)
 {
-  if (mCallState != nsITelephonyProvider::CALL_STATE_CONNECTED) {
+  if (mCallState != nsITelephonyService::CALL_STATE_CONNECTED) {
     NS_WARNING("Remove call from a non-connected call group. Ignore!");
     return;
   }
 
   uint32_t serviceId = aCall.ServiceId();
   uint32_t callIndex = aCall.CallIndex();
 
   nsRefPtr<TelephonyCall> call;
@@ -270,42 +270,42 @@ TelephonyCallGroup::Remove(TelephonyCall
   } else {
     NS_WARNING("Didn't have this call. Ignore!");
   }
 }
 
 void
 TelephonyCallGroup::Hold(ErrorResult& aRv)
 {
-  if (mCallState != nsITelephonyProvider::CALL_STATE_CONNECTED) {
+  if (mCallState != nsITelephonyService::CALL_STATE_CONNECTED) {
     NS_WARNING("Hold non-connected call ignored!");
     return;
   }
 
   MOZ_ASSERT(!mCalls.IsEmpty());
 
   nsresult rv = mTelephony->Provider()->HoldConference(mCalls[0]->ServiceId());
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
     return;
   }
 
-  ChangeState(nsITelephonyProvider::CALL_STATE_HOLDING);
+  ChangeState(nsITelephonyService::CALL_STATE_HOLDING);
 }
 
 void
 TelephonyCallGroup::Resume(ErrorResult& aRv)
 {
-  if (mCallState != nsITelephonyProvider::CALL_STATE_HELD) {
+  if (mCallState != nsITelephonyService::CALL_STATE_HELD) {
     NS_WARNING("Resume non-held call ignored!");
     return;
   }
 
   MOZ_ASSERT(!mCalls.IsEmpty());
 
   nsresult rv = mTelephony->Provider()->ResumeConference(mCalls[0]->ServiceId());
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
     return;
   }
 
-  ChangeState(nsITelephonyProvider::CALL_STATE_RESUMING);
+  ChangeState(nsITelephonyService::CALL_STATE_RESUMING);
 }
--- a/dom/telephony/TelephonyFactory.cpp
+++ b/dom/telephony/TelephonyFactory.cpp
@@ -1,30 +1,30 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/telephony/TelephonyFactory.h"
 #if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL)
-#include "nsIGonkTelephonyProvider.h"
+#include "nsIGonkTelephonyService.h"
 #endif
 #include "nsServiceManagerUtils.h"
 #include "nsXULAppAPI.h"
-#include "ipc/TelephonyIPCProvider.h"
+#include "ipc/TelephonyIPCService.h"
 
 USING_TELEPHONY_NAMESPACE
 
-/* static */ already_AddRefed<nsITelephonyProvider>
-TelephonyFactory::CreateTelephonyProvider()
+/* static */ already_AddRefed<nsITelephonyService>
+TelephonyFactory::CreateTelephonyService()
 {
-  nsCOMPtr<nsITelephonyProvider> provider;
+  nsCOMPtr<nsITelephonyService> provider;
 
   if (XRE_GetProcessType() == GeckoProcessType_Content) {
-    provider = new TelephonyIPCProvider();
+    provider = new TelephonyIPCService();
 #if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL)
   } else {
-    provider = do_CreateInstance(GONK_TELEPHONY_PROVIDER_CONTRACTID);
+    provider = do_CreateInstance(GONK_TELEPHONY_SERVICE_CONTRACTID);
 #endif
   }
 
   return provider.forget();
 }
--- a/dom/telephony/TelephonyFactory.h
+++ b/dom/telephony/TelephonyFactory.h
@@ -4,21 +4,21 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_telephony_TelephonyFactory_h
 #define mozilla_dom_telephony_TelephonyFactory_h
 
 #include "nsCOMPtr.h"
 #include "mozilla/dom/telephony/TelephonyCommon.h"
 
-class nsITelephonyProvider;
+class nsITelephonyService;
 
 BEGIN_TELEPHONY_NAMESPACE
 
 class TelephonyFactory
 {
 public:
-  static already_AddRefed<nsITelephonyProvider> CreateTelephonyProvider();
+  static already_AddRefed<nsITelephonyService> CreateTelephonyService();
 };
 
 END_TELEPHONY_NAMESPACE
 
 #endif // mozilla_dom_telephony_TelephonyFactory_h
rename from dom/telephony/gonk/TelephonyProvider.js
rename to dom/telephony/gonk/TelephonyService.js
--- a/dom/telephony/gonk/TelephonyProvider.js
+++ b/dom/telephony/gonk/TelephonyService.js
@@ -9,43 +9,43 @@ const {classes: Cc, interfaces: Ci, util
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/Promise.jsm");
 
 var RIL = {};
 Cu.import("resource://gre/modules/ril_consts.js", RIL);
 
-const GONK_TELEPHONYPROVIDER_CONTRACTID =
-  "@mozilla.org/telephony/gonktelephonyprovider;1";
-const GONK_TELEPHONYPROVIDER_CID =
+const GONK_TELEPHONYSERVICE_CONTRACTID =
+  "@mozilla.org/telephony/gonktelephonyservice;1";
+const GONK_TELEPHONYSERVICE_CID =
   Components.ID("{67d26434-d063-4d28-9f48-5b3189788155}");
 
 const NS_XPCOM_SHUTDOWN_OBSERVER_ID   = "xpcom-shutdown";
 
 const NS_PREFBRANCH_PREFCHANGE_TOPIC_ID = "nsPref:changed";
 
 const kPrefRilNumRadioInterfaces = "ril.numRadioInterfaces";
 const kPrefRilDebuggingEnabled = "ril.debugging.enabled";
 const kPrefDefaultServiceId = "dom.telephony.defaultServiceId";
 
 const nsIAudioManager = Ci.nsIAudioManager;
-const nsITelephonyProvider = Ci.nsITelephonyProvider;
+const nsITelephonyService = Ci.nsITelephonyService;
 
 const CALL_WAKELOCK_TIMEOUT = 5000;
 
 // Index of the CDMA second call which isn't held in RIL but only in TelephoyProvider.
 const CDMA_SECOND_CALL_INDEX = 2;
 
 const DIAL_ERROR_INVALID_STATE_ERROR = "InvalidStateError";
 const DIAL_ERROR_OTHER_CONNECTION_IN_USE = "OtherConnectionInUse";
 
 let DEBUG;
 function debug(s) {
-  dump("TelephonyProvider: " + s + "\n");
+  dump("TelephonyService: " + s + "\n");
 }
 
 XPCOMUtils.defineLazyGetter(this, "gAudioManager", function getAudioManager() {
   try {
     return Cc["@mozilla.org/telephony/audiomanager;1"]
              .getService(nsIAudioManager);
   } catch (ex) {
     //TODO on the phone this should not fall back as silently.
@@ -110,42 +110,42 @@ SingleCall.prototype = {
 
 function ConferenceCall(state){
   this.state = state;
 }
 ConferenceCall.prototype = {
   state: null
 };
 
-function TelephonyProvider() {
+function TelephonyService() {
   this._numClients = gRadioInterfaceLayer.numRadioInterfaces;
   this._listeners = [];
   this._currentCalls = {};
   this._updateDebugFlag();
   this.defaultServiceId = this._getDefaultServiceId();
 
   Services.prefs.addObserver(kPrefRilDebuggingEnabled, this, false);
   Services.prefs.addObserver(kPrefDefaultServiceId, this, false);
 
   Services.obs.addObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
 
   for (let i = 0; i < this._numClients; ++i) {
     this._enumerateCallsForClient(i);
   }
 }
-TelephonyProvider.prototype = {
-  classID: GONK_TELEPHONYPROVIDER_CID,
-  classInfo: XPCOMUtils.generateCI({classID: GONK_TELEPHONYPROVIDER_CID,
-                                    contractID: GONK_TELEPHONYPROVIDER_CONTRACTID,
-                                    classDescription: "TelephonyProvider",
-                                    interfaces: [Ci.nsITelephonyProvider,
-                                                 Ci.nsIGonkTelephonyProvider],
+TelephonyService.prototype = {
+  classID: GONK_TELEPHONYSERVICE_CID,
+  classInfo: XPCOMUtils.generateCI({classID: GONK_TELEPHONYSERVICE_CID,
+                                    contractID: GONK_TELEPHONYSERVICE_CONTRACTID,
+                                    classDescription: "TelephonyService",
+                                    interfaces: [Ci.nsITelephonyService,
+                                                 Ci.nsIGonkTelephonyService],
                                     flags: Ci.nsIClassInfo.SINGLETON}),
-  QueryInterface: XPCOMUtils.generateQI([Ci.nsITelephonyProvider,
-                                         Ci.nsIGonkTelephonyProvider,
+  QueryInterface: XPCOMUtils.generateQI([Ci.nsITelephonyService,
+                                         Ci.nsIGonkTelephonyService,
                                          Ci.nsIObserver]),
 
   // The following attributes/functions are used for acquiring/releasing the
   // CPU wake lock when the RIL handles the incoming call. Note that we need
   // a timer to bound the lock's life cycle to avoid exhausting the battery.
   _callRingWakeLock: null,
   _callRingWakeLockTimer: null,
 
@@ -206,24 +206,24 @@ TelephonyProvider.prototype = {
            this._activeCall.callIndex === aCall.callIndex;
   },
 
   /**
    * Track the active call and update the audio system as its state changes.
    */
   _activeCall: null,
   _updateActiveCall: function(aCall, aConferenceState) {
-    if (aConferenceState === nsITelephonyProvider.CALL_STATE_CONNECTED) {
+    if (aConferenceState === nsITelephonyService.CALL_STATE_CONNECTED) {
       this._activeCall = new ConferenceCall(aConferenceState);
       this._updateCallAudioState(aCall);
       return;
     }
 
-    if (aConferenceState === nsITelephonyProvider.CALL_STATE_UNKNOWN ||
-        aConferenceState === nsITelephonyProvider.CALL_STATE_HELD) {
+    if (aConferenceState === nsITelephonyService.CALL_STATE_UNKNOWN ||
+        aConferenceState === nsITelephonyService.CALL_STATE_HELD) {
       if (this._activeCall instanceof ConferenceCall) {
         this._activeCall = null;
         this._updateCallAudioState(aCall);
       }
       return;
     }
 
     if (!aCall) {
@@ -233,42 +233,42 @@ TelephonyProvider.prototype = {
     if (aCall.isConference) {
       if (this._matchActiveSingleCall(aCall)) {
         this._activeCall = null;
       }
       return;
     }
 
     switch (aCall.state) {
-      case nsITelephonyProvider.CALL_STATE_DIALING: // Fall through...
-      case nsITelephonyProvider.CALL_STATE_ALERTING:
-      case nsITelephonyProvider.CALL_STATE_CONNECTED:
+      case nsITelephonyService.CALL_STATE_DIALING: // Fall through...
+      case nsITelephonyService.CALL_STATE_ALERTING:
+      case nsITelephonyService.CALL_STATE_CONNECTED:
         this._activeCall = new SingleCall(aCall);
         this._updateCallAudioState(aCall);
         break;
 
-      case nsITelephonyProvider.CALL_STATE_INCOMING:
+      case nsITelephonyService.CALL_STATE_INCOMING:
         this._updateCallAudioState(aCall);
         break;
 
-      case nsITelephonyProvider.CALL_STATE_HELD: // Fall through...
-      case nsITelephonyProvider.CALL_STATE_DISCONNECTED:
+      case nsITelephonyService.CALL_STATE_HELD: // Fall through...
+      case nsITelephonyService.CALL_STATE_DISCONNECTED:
         if (this._matchActiveSingleCall(aCall)) {
           // Previously active call is not active now.
           this._activeCall = null;
           this._updateCallAudioState(aCall);
         }
         break;
     }
   },
 
   _updateCallAudioState: function(aCall) {
     let active = (this._activeCall !== null);
     let incoming = (aCall &&
-                    aCall.state === nsITelephonyProvider.CALL_STATE_INCOMING);
+                    aCall.state === nsITelephonyService.CALL_STATE_INCOMING);
 
     if (active) {
       gAudioManager.phoneState = nsIAudioManager.PHONE_STATE_IN_CALL;
       if (this.speakerEnabled) {
         gAudioManager.setForceForUse(nsIAudioManager.USE_COMMUNICATION,
                                      nsIAudioManager.FORCE_SPEAKER);
       }
       if (DEBUG) {
@@ -290,39 +290,39 @@ TelephonyProvider.prototype = {
               gAudioManager.phoneState);
       }
     }
   },
 
   _convertRILCallState: function(aState) {
     switch (aState) {
       case RIL.CALL_STATE_UNKNOWN:
-        return nsITelephonyProvider.CALL_STATE_UNKNOWN;
+        return nsITelephonyService.CALL_STATE_UNKNOWN;
       case RIL.CALL_STATE_ACTIVE:
-        return nsITelephonyProvider.CALL_STATE_CONNECTED;
+        return nsITelephonyService.CALL_STATE_CONNECTED;
       case RIL.CALL_STATE_HOLDING:
-        return nsITelephonyProvider.CALL_STATE_HELD;
+        return nsITelephonyService.CALL_STATE_HELD;
       case RIL.CALL_STATE_DIALING:
-        return nsITelephonyProvider.CALL_STATE_DIALING;
+        return nsITelephonyService.CALL_STATE_DIALING;
       case RIL.CALL_STATE_ALERTING:
-        return nsITelephonyProvider.CALL_STATE_ALERTING;
+        return nsITelephonyService.CALL_STATE_ALERTING;
       case RIL.CALL_STATE_INCOMING:
       case RIL.CALL_STATE_WAITING:
-        return nsITelephonyProvider.CALL_STATE_INCOMING;
+        return nsITelephonyService.CALL_STATE_INCOMING;
       default:
         throw new Error("Unknown rilCallState: " + aState);
     }
   },
 
   _convertRILSuppSvcNotification: function(aNotification) {
     switch (aNotification) {
       case RIL.GECKO_SUPP_SVC_NOTIFICATION_REMOTE_HELD:
-        return nsITelephonyProvider.NOTIFICATION_REMOTE_HELD;
+        return nsITelephonyService.NOTIFICATION_REMOTE_HELD;
       case RIL.GECKO_SUPP_SVC_NOTIFICATION_REMOTE_RESUMED:
-        return nsITelephonyProvider.NOTIFICATION_REMOTE_RESUMED;
+        return nsITelephonyService.NOTIFICATION_REMOTE_RESUMED;
       default:
         if (DEBUG) {
           debug("Unknown rilSuppSvcNotification: " + aNotification);
         }
         return;
     }
   },
 
@@ -362,17 +362,17 @@ TelephonyProvider.prototype = {
         this._currentCalls[aClientId][call.callIndex] = call;
       }
 
       return false;
     }).bind(this));
   },
 
   /**
-   * nsITelephonyProvider interface.
+   * nsITelephonyService interface.
    */
 
   defaultServiceId: 0,
 
   registerListener: function(aListener) {
     if (this._listeners.indexOf(aListener) >= 0) {
       throw Cr.NS_ERROR_UNEXPECTED;
     }
@@ -708,26 +708,26 @@ TelephonyProvider.prototype = {
     gAudioManager.setForceForUse(nsIAudioManager.USE_COMMUNICATION, force);
 
     if (!this._activeCall) {
       gAudioManager.phoneState = nsIAudioManager.PHONE_STATE_NORMAL;
     }
   },
 
   /**
-   * nsIGonkTelephonyProvider interface.
+   * nsIGonkTelephonyService interface.
    */
 
   /**
    * Handle call disconnects by updating our current state and the audio system.
    */
   notifyCallDisconnected: function(aClientId, aCall) {
     if (DEBUG) debug("handleCallDisconnected: " + JSON.stringify(aCall));
 
-    aCall.state = nsITelephonyProvider.CALL_STATE_DISCONNECTED;
+    aCall.state = nsITelephonyService.CALL_STATE_DISCONNECTED;
     let duration = ("started" in aCall && typeof aCall.started == "number") ?
       new Date().getTime() - aCall.started : 0;
     let data = {
       number: aCall.number,
       serviceId: aClientId,
       emergency: aCall.isEmergency,
       duration: duration,
       direction: aCall.isOutgoing ? "outgoing" : "incoming"
@@ -805,17 +805,17 @@ TelephonyProvider.prototype = {
    */
   notifyCallStateChanged: function(aClientId, aCall, aSkipStateConversion) {
     if (DEBUG) debug("handleCallStateChange: " + JSON.stringify(aCall));
 
     if (!aSkipStateConversion) {
       aCall.state = this._convertRILCallState(aCall.state);
     }
 
-    if (aCall.state == nsITelephonyProvider.CALL_STATE_DIALING) {
+    if (aCall.state == nsITelephonyService.CALL_STATE_DIALING) {
       gSystemMessenger.broadcastMessage("telephony-new-call", {});
     }
 
     aCall.clientId = aClientId;
     this._updateActiveCall(aCall, null);
 
     let call = this._currentCalls[aClientId][aCall.callIndex];
     if (call) {
@@ -894,9 +894,9 @@ TelephonyProvider.prototype = {
         this._releaseCallRingWakeLock();
 
         Services.obs.removeObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID);
         break;
     }
   }
 };
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TelephonyProvider]);
+this.NSGetFactory = XPCOMUtils.generateNSGetFactory([TelephonyService]);
rename from dom/telephony/gonk/TelephonyProvider.manifest
rename to dom/telephony/gonk/TelephonyService.manifest
--- a/dom/telephony/gonk/TelephonyProvider.manifest
+++ b/dom/telephony/gonk/TelephonyService.manifest
@@ -1,2 +1,2 @@
-component {67d26434-d063-4d28-9f48-5b3189788155} TelephonyProvider.js
-contract @mozilla.org/telephony/gonktelephonyprovider;1 {67d26434-d063-4d28-9f48-5b3189788155}
+component {67d26434-d063-4d28-9f48-5b3189788155} TelephonyService.js
+contract @mozilla.org/telephony/gonktelephonyservice;1 {67d26434-d063-4d28-9f48-5b3189788155}
--- a/dom/telephony/ipc/TelephonyChild.cpp
+++ b/dom/telephony/ipc/TelephonyChild.cpp
@@ -1,23 +1,23 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "TelephonyChild.h"
-#include "TelephonyIPCProvider.h"
+#include "TelephonyIPCService.h"
 
 USING_TELEPHONY_NAMESPACE
 
 /*******************************************************************************
  * TelephonyChild
  ******************************************************************************/
 
-TelephonyChild::TelephonyChild(TelephonyIPCProvider* aProvider)
+TelephonyChild::TelephonyChild(TelephonyIPCService* aProvider)
   : mProvider(aProvider)
 {
   MOZ_ASSERT(aProvider);
 }
 
 TelephonyChild::~TelephonyChild()
 {
 }
--- a/dom/telephony/ipc/TelephonyChild.h
+++ b/dom/telephony/ipc/TelephonyChild.h
@@ -4,26 +4,26 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_telephony_TelephonyChild_h
 #define mozilla_dom_telephony_TelephonyChild_h
 
 #include "mozilla/dom/telephony/TelephonyCommon.h"
 #include "mozilla/dom/telephony/PTelephonyChild.h"
 #include "mozilla/dom/telephony/PTelephonyRequestChild.h"
-#include "nsITelephonyProvider.h"
+#include "nsITelephonyService.h"
 
 BEGIN_TELEPHONY_NAMESPACE
 
-class TelephonyIPCProvider;
+class TelephonyIPCService;
 
 class TelephonyChild : public PTelephonyChild
 {
 public:
-  TelephonyChild(TelephonyIPCProvider* aProvider);
+  TelephonyChild(TelephonyIPCService* aProvider);
 
 protected:
   virtual ~TelephonyChild();
 
   virtual void
   ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
 
   virtual PTelephonyRequestChild*
@@ -52,17 +52,17 @@ protected:
                             const nsString& aMessage) MOZ_OVERRIDE;
 
   virtual bool
   RecvNotifySupplementaryService(const uint32_t& aClientId,
                                  const int32_t& aCallIndex,
                                  const uint16_t& aNotification) MOZ_OVERRIDE;
 
 private:
-  nsRefPtr<TelephonyIPCProvider> mProvider;
+  nsRefPtr<TelephonyIPCService> mProvider;
 };
 
 class TelephonyRequestChild : public PTelephonyRequestChild
 {
 public:
   TelephonyRequestChild(nsITelephonyListener* aListener,
                         nsITelephonyCallback* aCallback);
 
rename from dom/telephony/ipc/TelephonyIPCProvider.cpp
rename to dom/telephony/ipc/TelephonyIPCService.cpp
--- a/dom/telephony/ipc/TelephonyIPCProvider.cpp
+++ b/dom/telephony/ipc/TelephonyIPCService.cpp
@@ -1,14 +1,14 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "TelephonyIPCProvider.h"
+#include "TelephonyIPCService.h"
 
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/telephony/TelephonyChild.h"
 #include "mozilla/Preferences.h"
 
 USING_TELEPHONY_NAMESPACE
 using namespace mozilla::dom;
 
@@ -31,332 +31,332 @@ getDefaultServiceId()
     id = 0;
   }
 
   return id;
 }
 
 } // Anonymous namespace
 
-NS_IMPL_ISUPPORTS(TelephonyIPCProvider,
-                  nsITelephonyProvider,
+NS_IMPL_ISUPPORTS(TelephonyIPCService,
+                  nsITelephonyService,
                   nsITelephonyListener,
                   nsIObserver)
 
-TelephonyIPCProvider::TelephonyIPCProvider()
+TelephonyIPCService::TelephonyIPCService()
 {
   // Deallocated in ContentChild::DeallocPTelephonyChild().
   mPTelephonyChild = new TelephonyChild(this);
   ContentChild::GetSingleton()->SendPTelephonyConstructor(mPTelephonyChild);
 
   Preferences::AddStrongObservers(this, kObservedPrefs);
   mDefaultServiceId = getDefaultServiceId();
 }
 
-TelephonyIPCProvider::~TelephonyIPCProvider()
+TelephonyIPCService::~TelephonyIPCService()
 {
   if (mPTelephonyChild) {
     mPTelephonyChild->Send__delete__(mPTelephonyChild);
     mPTelephonyChild = nullptr;
   }
 }
 
 void
-TelephonyIPCProvider::NoteActorDestroyed()
+TelephonyIPCService::NoteActorDestroyed()
 {
   MOZ_ASSERT(mPTelephonyChild);
 
   mPTelephonyChild = nullptr;
 }
 
 /*
  * Implementation of nsIObserver.
  */
 
 NS_IMETHODIMP
-TelephonyIPCProvider::Observe(nsISupports* aSubject,
+TelephonyIPCService::Observe(nsISupports* aSubject,
                               const char* aTopic,
                               const char16_t* aData)
 {
   if (!strcmp(aTopic, NS_PREFBRANCH_PREFCHANGE_TOPIC_ID)) {
     nsDependentString data(aData);
     if (data.EqualsLiteral(kPrefDefaultServiceId)) {
       mDefaultServiceId = getDefaultServiceId();
     }
     return NS_OK;
   }
 
-  MOZ_ASSERT(false, "TelephonyIPCProvider got unexpected topic!");
+  MOZ_ASSERT(false, "TelephonyIPCService got unexpected topic!");
   return NS_ERROR_UNEXPECTED;
 }
 
 /*
- * Implementation of nsITelephonyProvider.
+ * Implementation of nsITelephonyService.
  */
 
 NS_IMETHODIMP
-TelephonyIPCProvider::GetDefaultServiceId(uint32_t* aServiceId)
+TelephonyIPCService::GetDefaultServiceId(uint32_t* aServiceId)
 {
   *aServiceId = mDefaultServiceId;
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::RegisterListener(nsITelephonyListener *aListener)
+TelephonyIPCService::RegisterListener(nsITelephonyListener *aListener)
 {
   MOZ_ASSERT(!mListeners.Contains(aListener));
 
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   // nsTArray doesn't fail.
   mListeners.AppendElement(aListener);
 
   if (mListeners.Length() == 1) {
     mPTelephonyChild->SendRegisterListener();
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::UnregisterListener(nsITelephonyListener *aListener)
+TelephonyIPCService::UnregisterListener(nsITelephonyListener *aListener)
 {
   MOZ_ASSERT(mListeners.Contains(aListener));
 
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   // We always have the element here, so it can't fail.
   mListeners.RemoveElement(aListener);
 
   if (!mListeners.Length()) {
     mPTelephonyChild->SendUnregisterListener();
   }
   return NS_OK;
 }
 
 nsresult
-TelephonyIPCProvider::SendRequest(nsITelephonyListener *aListener,
+TelephonyIPCService::SendRequest(nsITelephonyListener *aListener,
                                   nsITelephonyCallback *aCallback,
                                   const IPCTelephonyRequest& aRequest)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   // Life time of newly allocated TelephonyRequestChild instance is managed by
   // IPDL itself.
   TelephonyRequestChild* actor = new TelephonyRequestChild(aListener, aCallback);
   mPTelephonyChild->SendPTelephonyRequestConstructor(actor, aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::EnumerateCalls(nsITelephonyListener *aListener)
+TelephonyIPCService::EnumerateCalls(nsITelephonyListener *aListener)
 {
   return SendRequest(aListener, nullptr, EnumerateCallsRequest());
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::Dial(uint32_t aClientId, const nsAString& aNumber,
+TelephonyIPCService::Dial(uint32_t aClientId, const nsAString& aNumber,
                            bool aIsEmergency, nsITelephonyCallback *aCallback)
 {
   return SendRequest(nullptr, aCallback,
                      DialRequest(aClientId, nsString(aNumber), aIsEmergency));
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::HangUp(uint32_t aClientId, uint32_t aCallIndex)
+TelephonyIPCService::HangUp(uint32_t aClientId, uint32_t aCallIndex)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   mPTelephonyChild->SendHangUpCall(aClientId, aCallIndex);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::AnswerCall(uint32_t aClientId, uint32_t aCallIndex)
+TelephonyIPCService::AnswerCall(uint32_t aClientId, uint32_t aCallIndex)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   mPTelephonyChild->SendAnswerCall(aClientId, aCallIndex);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::RejectCall(uint32_t aClientId, uint32_t aCallIndex)
+TelephonyIPCService::RejectCall(uint32_t aClientId, uint32_t aCallIndex)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   mPTelephonyChild->SendRejectCall(aClientId, aCallIndex);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::HoldCall(uint32_t aClientId, uint32_t aCallIndex)
+TelephonyIPCService::HoldCall(uint32_t aClientId, uint32_t aCallIndex)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   mPTelephonyChild->SendHoldCall(aClientId, aCallIndex);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::ResumeCall(uint32_t aClientId, uint32_t aCallIndex)
+TelephonyIPCService::ResumeCall(uint32_t aClientId, uint32_t aCallIndex)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   mPTelephonyChild->SendResumeCall(aClientId, aCallIndex);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::ConferenceCall(uint32_t aClientId)
+TelephonyIPCService::ConferenceCall(uint32_t aClientId)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   mPTelephonyChild->SendConferenceCall(aClientId);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::SeparateCall(uint32_t aClientId, uint32_t aCallIndex)
+TelephonyIPCService::SeparateCall(uint32_t aClientId, uint32_t aCallIndex)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   mPTelephonyChild->SendSeparateCall(aClientId, aCallIndex);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::HoldConference(uint32_t aClientId)
+TelephonyIPCService::HoldConference(uint32_t aClientId)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   mPTelephonyChild->SendHoldConference(aClientId);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::ResumeConference(uint32_t aClientId)
+TelephonyIPCService::ResumeConference(uint32_t aClientId)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   mPTelephonyChild->SendResumeConference(aClientId);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::StartTone(uint32_t aClientId, const nsAString& aDtmfChar)
+TelephonyIPCService::StartTone(uint32_t aClientId, const nsAString& aDtmfChar)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   mPTelephonyChild->SendStartTone(aClientId, nsString(aDtmfChar));
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::StopTone(uint32_t aClientId)
+TelephonyIPCService::StopTone(uint32_t aClientId)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   mPTelephonyChild->SendStopTone(aClientId);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::GetMicrophoneMuted(bool* aMuted)
+TelephonyIPCService::GetMicrophoneMuted(bool* aMuted)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   mPTelephonyChild->SendGetMicrophoneMuted(aMuted);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::SetMicrophoneMuted(bool aMuted)
+TelephonyIPCService::SetMicrophoneMuted(bool aMuted)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   mPTelephonyChild->SendSetMicrophoneMuted(aMuted);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::GetSpeakerEnabled(bool* aEnabled)
+TelephonyIPCService::GetSpeakerEnabled(bool* aEnabled)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   mPTelephonyChild->SendGetSpeakerEnabled(aEnabled);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::SetSpeakerEnabled(bool aEnabled)
+TelephonyIPCService::SetSpeakerEnabled(bool aEnabled)
 {
   if (!mPTelephonyChild) {
-    NS_WARNING("TelephonyProvider used after shutdown has begun!");
+    NS_WARNING("TelephonyService used after shutdown has begun!");
     return NS_ERROR_FAILURE;
   }
 
   mPTelephonyChild->SendSetSpeakerEnabled(aEnabled);
   return NS_OK;
 }
 
 // nsITelephonyListener
 
 NS_IMETHODIMP
-TelephonyIPCProvider::CallStateChanged(uint32_t aClientId,
+TelephonyIPCService::CallStateChanged(uint32_t aClientId,
                                        uint32_t aCallIndex,
                                        uint16_t aCallState,
                                        const nsAString& aNumber,
                                        bool aIsOutgoing,
                                        bool aIsEmergency,
                                        bool aIsConference,
                                        bool aIsSwitchable,
                                        bool aIsMergeable)
@@ -365,76 +365,76 @@ TelephonyIPCProvider::CallStateChanged(u
     mListeners[i]->CallStateChanged(aClientId, aCallIndex, aCallState, aNumber,
                                     aIsOutgoing, aIsEmergency, aIsConference,
                                     aIsSwitchable, aIsMergeable);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::ConferenceCallStateChanged(uint16_t aCallState)
+TelephonyIPCService::ConferenceCallStateChanged(uint16_t aCallState)
 {
   for (uint32_t i = 0; i < mListeners.Length(); i++) {
     mListeners[i]->ConferenceCallStateChanged(aCallState);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::EnumerateCallStateComplete()
+TelephonyIPCService::EnumerateCallStateComplete()
 {
   MOZ_CRASH("Not a EnumerateCalls request!");
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::EnumerateCallState(uint32_t aClientId,
+TelephonyIPCService::EnumerateCallState(uint32_t aClientId,
                                          uint32_t aCallIndex,
                                          uint16_t aCallState,
                                          const nsAString& aNumber,
                                          bool aIsOutgoing,
                                          bool aIsEmergency,
                                          bool aIsConference,
                                          bool aIsSwitchable,
                                          bool aIsMergeable)
 {
   MOZ_CRASH("Not a EnumerateCalls request!");
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::NotifyCdmaCallWaiting(uint32_t aClientId,
+TelephonyIPCService::NotifyCdmaCallWaiting(uint32_t aClientId,
                                             const nsAString& aNumber)
 {
   for (uint32_t i = 0; i < mListeners.Length(); i++) {
     mListeners[i]->NotifyCdmaCallWaiting(aClientId, aNumber);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::NotifyConferenceError(const nsAString& aName,
+TelephonyIPCService::NotifyConferenceError(const nsAString& aName,
                                             const nsAString& aMessage)
 {
   for (uint32_t i = 0; i < mListeners.Length(); i++) {
     mListeners[i]->NotifyConferenceError(aName, aMessage);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::NotifyError(uint32_t aClientId, int32_t aCallIndex,
+TelephonyIPCService::NotifyError(uint32_t aClientId, int32_t aCallIndex,
                                   const nsAString& aError)
 {
   for (uint32_t i = 0; i < mListeners.Length(); i++) {
     mListeners[i]->NotifyError(aClientId, aCallIndex, aError);
   }
   return NS_OK;
 }
 
 NS_IMETHODIMP
-TelephonyIPCProvider::SupplementaryServiceNotification(uint32_t aClientId,
+TelephonyIPCService::SupplementaryServiceNotification(uint32_t aClientId,
                                                        int32_t aCallIndex,
                                                        uint16_t aNotification)
 {
   for (uint32_t i = 0; i < mListeners.Length(); i++) {
     mListeners[i]->SupplementaryServiceNotification(aClientId, aCallIndex,
                                                     aNotification);
   }
   return NS_OK;
rename from dom/telephony/ipc/TelephonyIPCProvider.h
rename to dom/telephony/ipc/TelephonyIPCService.h
--- a/dom/telephony/ipc/TelephonyIPCProvider.h
+++ b/dom/telephony/ipc/TelephonyIPCService.h
@@ -1,47 +1,47 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#ifndef mozilla_dom_telephony_TelephonyIPCProvider_h
-#define mozilla_dom_telephony_TelephonyIPCProvider_h
+#ifndef mozilla_dom_telephony_TelephonyIPCService_h
+#define mozilla_dom_telephony_TelephonyIPCService_h
 
 #include "mozilla/dom/telephony/TelephonyCommon.h"
 #include "mozilla/Attributes.h"
 #include "nsIObserver.h"
-#include "nsITelephonyProvider.h"
+#include "nsITelephonyService.h"
 
 BEGIN_TELEPHONY_NAMESPACE
 
 struct IPCTelephonyRequest;
 class PTelephonyChild;
 
-class TelephonyIPCProvider MOZ_FINAL : public nsITelephonyProvider
+class TelephonyIPCService MOZ_FINAL : public nsITelephonyService
                                      , public nsITelephonyListener
                                      , public nsIObserver
 {
 public:
   NS_DECL_ISUPPORTS
-  NS_DECL_NSITELEPHONYPROVIDER
+  NS_DECL_NSITELEPHONYSERVICE
   NS_DECL_NSITELEPHONYLISTENER
   NS_DECL_NSIOBSERVER
 
-  TelephonyIPCProvider();
+  TelephonyIPCService();
 
   void NoteActorDestroyed();
 
 private:
-  ~TelephonyIPCProvider();
+  ~TelephonyIPCService();
 
   nsTArray<nsCOMPtr<nsITelephonyListener> > mListeners;
   PTelephonyChild* mPTelephonyChild;
   uint32_t mDefaultServiceId;
 
   nsresult SendRequest(nsITelephonyListener *aListener,
                        nsITelephonyCallback *aCallback,
                        const IPCTelephonyRequest& aRequest);
 };
 
 END_TELEPHONY_NAMESPACE
 
-#endif // mozilla_dom_telephony_TelephonyIPCProvider_h
+#endif // mozilla_dom_telephony_TelephonyIPCService_h
--- a/dom/telephony/ipc/TelephonyParent.cpp
+++ b/dom/telephony/ipc/TelephonyParent.cpp
@@ -75,206 +75,206 @@ TelephonyParent::Recv__delete__()
   return true; // Unregister listener in TelephonyParent::ActorDestroy().
 }
 
 bool
 TelephonyParent::RecvRegisterListener()
 {
   NS_ENSURE_TRUE(!mRegistered, true);
 
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   mRegistered = NS_SUCCEEDED(provider->RegisterListener(this));
   return true;
 }
 
 bool
 TelephonyParent::RecvUnregisterListener()
 {
   NS_ENSURE_TRUE(mRegistered, true);
 
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   mRegistered = !NS_SUCCEEDED(provider->UnregisterListener(this));
   return true;
 }
 
 bool
 TelephonyParent::RecvHangUpCall(const uint32_t& aClientId,
                                 const uint32_t& aCallIndex)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   provider->HangUp(aClientId, aCallIndex);
   return true;
 }
 
 bool
 TelephonyParent::RecvAnswerCall(const uint32_t& aClientId,
                                 const uint32_t& aCallIndex)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   provider->AnswerCall(aClientId, aCallIndex);
   return true;
 }
 
 bool
 TelephonyParent::RecvRejectCall(const uint32_t& aClientId,
                                 const uint32_t& aCallIndex)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   provider->RejectCall(aClientId, aCallIndex);
   return true;
 }
 
 bool
 TelephonyParent::RecvHoldCall(const uint32_t& aClientId,
                               const uint32_t& aCallIndex)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   provider->HoldCall(aClientId, aCallIndex);
   return true;
 }
 
 bool
 TelephonyParent::RecvResumeCall(const uint32_t& aClientId,
                                 const uint32_t& aCallIndex)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   provider->ResumeCall(aClientId, aCallIndex);
   return true;
 }
 
 bool
 TelephonyParent::RecvConferenceCall(const uint32_t& aClientId)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   provider->ConferenceCall(aClientId);
   return true;
 }
 
 bool
 TelephonyParent::RecvSeparateCall(const uint32_t& aClientId,
                                   const uint32_t& aCallIndex)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   provider->SeparateCall(aClientId, aCallIndex);
   return true;
 }
 
 bool
 TelephonyParent::RecvHoldConference(const uint32_t& aClientId)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   provider->HoldConference(aClientId);
   return true;
 }
 
 bool
 TelephonyParent::RecvResumeConference(const uint32_t& aClientId)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   provider->ResumeConference(aClientId);
   return true;
 }
 
 bool
 TelephonyParent::RecvStartTone(const uint32_t& aClientId, const nsString& aTone)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   provider->StartTone(aClientId, aTone);
   return true;
 }
 
 bool
 TelephonyParent::RecvStopTone(const uint32_t& aClientId)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   provider->StopTone(aClientId);
   return true;
 }
 
 bool
 TelephonyParent::RecvGetMicrophoneMuted(bool* aMuted)
 {
   *aMuted = false;
 
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   provider->GetMicrophoneMuted(aMuted);
   return true;
 }
 
 bool
 TelephonyParent::RecvSetMicrophoneMuted(const bool& aMuted)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   provider->SetMicrophoneMuted(aMuted);
   return true;
 }
 
 bool
 TelephonyParent::RecvGetSpeakerEnabled(bool* aEnabled)
 {
   *aEnabled = false;
 
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   provider->GetSpeakerEnabled(aEnabled);
   return true;
 }
 
 bool
 TelephonyParent::RecvSetSpeakerEnabled(const bool& aEnabled)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   NS_ENSURE_TRUE(provider, true);
 
   provider->SetSpeakerEnabled(aEnabled);
   return true;
 }
 
 // nsITelephonyListener
 
@@ -390,34 +390,34 @@ TelephonyRequestParent::ActorDestroy(Act
   mActorDestroyed = true;
 }
 
 bool
 TelephonyRequestParent::DoRequest(const EnumerateCallsRequest& aRequest)
 {
   nsresult rv = NS_ERROR_FAILURE;
 
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   if (provider) {
     rv = provider->EnumerateCalls(this);
   }
 
   if (NS_FAILED(rv)) {
     return NS_SUCCEEDED(EnumerateCallStateComplete());
   }
 
   return true;
 }
 
 bool
 TelephonyRequestParent::DoRequest(const DialRequest& aRequest)
 {
-  nsCOMPtr<nsITelephonyProvider> provider =
-    do_GetService(TELEPHONY_PROVIDER_CONTRACTID);
+  nsCOMPtr<nsITelephonyService> provider =
+    do_GetService(TELEPHONY_SERVICE_CONTRACTID);
   if (provider) {
     provider->Dial(aRequest.clientId(), aRequest.number(),
                    aRequest.isEmergency(), this);
   } else {
     return NS_SUCCEEDED(NotifyDialError(NS_LITERAL_STRING("InvalidStateError")));
   }
 
   return true;
--- a/dom/telephony/ipc/TelephonyParent.h
+++ b/dom/telephony/ipc/TelephonyParent.h
@@ -4,17 +4,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_telephony_TelephonyParent_h
 #define mozilla_dom_telephony_TelephonyParent_h
 
 #include "mozilla/dom/telephony/TelephonyCommon.h"
 #include "mozilla/dom/telephony/PTelephonyParent.h"
 #include "mozilla/dom/telephony/PTelephonyRequestParent.h"
-#include "nsITelephonyProvider.h"
+#include "nsITelephonyService.h"
 
 BEGIN_TELEPHONY_NAMESPACE
 
 class TelephonyParent : public PTelephonyParent
                       , public nsITelephonyListener
 {
 public:
   NS_DECL_ISUPPORTS
--- a/dom/telephony/moz.build
+++ b/dom/telephony/moz.build
@@ -1,16 +1,16 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 XPIDL_SOURCES += [
-    'nsITelephonyProvider.idl',
+    'nsITelephonyService.idl',
 ]
 
 XPIDL_MODULE = 'dom_telephony'
 
 EXPORTS.mozilla.dom += [
     'CallEvent.h',
     'CallsList.h',
     'Telephony.h',
@@ -24,35 +24,35 @@ EXPORTS.mozilla.dom.telephony += [
     'TelephonyCommon.h',
     'TelephonyFactory.h',
 ]
 
 UNIFIED_SOURCES += [
     'CallEvent.cpp',
     'CallsList.cpp',
     'ipc/TelephonyChild.cpp',
-    'ipc/TelephonyIPCProvider.cpp',
+    'ipc/TelephonyIPCService.cpp',
     'ipc/TelephonyParent.cpp',
     'Telephony.cpp',
     'TelephonyCall.cpp',
     'TelephonyCallGroup.cpp',
     'TelephonyFactory.cpp',
 ]
 
 IPDL_SOURCES += [
     'ipc/PTelephony.ipdl',
     'ipc/PTelephonyRequest.ipdl',
     'ipc/TelephonyTypes.ipdlh'
 ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['MOZ_B2G_RIL']:
     XPIDL_SOURCES += [
-        'nsIGonkTelephonyProvider.idl',
+        'nsIGonkTelephonyService.idl',
     ]
     EXTRA_COMPONENTS += [
-        'gonk/TelephonyProvider.js',
-        'gonk/TelephonyProvider.manifest',
+        'gonk/TelephonyService.js',
+        'gonk/TelephonyService.manifest',
     ]
 
 FAIL_ON_WARNINGS = True
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'gklayout'
rename from dom/telephony/nsIGonkTelephonyProvider.idl
rename to dom/telephony/nsIGonkTelephonyService.idl
--- a/dom/telephony/nsIGonkTelephonyProvider.idl
+++ b/dom/telephony/nsIGonkTelephonyService.idl
@@ -1,22 +1,22 @@
 /* -*- Mode: idl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "nsITelephonyProvider.idl"
+#include "nsITelephonyService.idl"
 
 %{C++
-#define GONK_TELEPHONY_PROVIDER_CONTRACTID \
-        "@mozilla.org/telephony/gonktelephonyprovider;1"
+#define GONK_TELEPHONY_SERVICE_CONTRACTID \
+        "@mozilla.org/telephony/gonktelephonyservice;1"
 %}
 
-[scriptable, uuid(9d884482-90fc-4050-a4b1-1a370afe7a35)]
-interface nsIGonkTelephonyProvider : nsITelephonyProvider
+[scriptable, uuid(2ff3dcbb-ae63-443e-9c5d-76811f2f9b42)]
+interface nsIGonkTelephonyService : nsITelephonyService
 {
   void notifyCallDisconnected(in unsigned long clientId, in jsval call);
 
   void notifyCallRing();
 
   void notifyCallStateChanged(in unsigned long clientId, in jsval call,
                               [optional] in boolean skipStateConversion);
 
rename from dom/telephony/nsITelephonyProvider.idl
rename to dom/telephony/nsITelephonyService.idl
--- a/dom/telephony/nsITelephonyProvider.idl
+++ b/dom/telephony/nsITelephonyService.idl
@@ -10,29 +10,29 @@ interface nsITelephonyListener : nsISupp
   /**
    * Notified when a telephony call changes state.
    *
    * @param clientId
             Indicate the RIL client, 0 ~ (number of client - 1).
    * @param callIndex
    *        Call identifier assigned by the RIL.
    * @param callState
-   *        One of the nsITelephonyProvider::CALL_STATE_* values.
+   *        One of the nsITelephonyService::CALL_STATE_* values.
    * @param number
    *        Number of the other party.
    * @param isOutgoing
    *        Indicates whether this call is outgoing or incoming.
    * @param isEmergency
    *        Indicates whether this call is an emergency call.
    * @param isConference
    *        Indicates whether this call is a conference call.
    * @param isSwitchable
    *        Indicates whether this call can be switched between states of
-   *        nsITelephonyProvider::CALL_STATE_CONNECTED and
-   *        nsITelephonyProvider::CALL_STATE_HELD.
+   *        nsITelephonyService::CALL_STATE_CONNECTED and
+   *        nsITelephonyService::CALL_STATE_HELD.
    * @param isMergeable
    *        Indicates whether this call be be added into a conference.
    */
   void callStateChanged(in unsigned long clientId,
                         in unsigned long callIndex,
                         in unsigned short callState,
                         in AString number,
                         in boolean isOutgoing,
@@ -41,49 +41,49 @@ interface nsITelephonyListener : nsISupp
                         in boolean isSwitchable,
                         in boolean isMergeable);
 
   /**
    * Called when participants of a conference call have been updated, and the
    * conference call state changes.
    *
    * @param callState
-   *        Possible values are: nsITelephonyProvider::CALL_STATE_UNKNOWN,
-   *        nsITelephonyProvider::CALL_STATE_HELD,
-   *        nsITelephonyProvider::CALL_STATE_CONNECTED.
+   *        Possible values are: nsITelephonyService::CALL_STATE_UNKNOWN,
+   *        nsITelephonyService::CALL_STATE_HELD,
+   *        nsITelephonyService::CALL_STATE_CONNECTED.
    */
   void conferenceCallStateChanged(in unsigned short callState);
 
   /**
-   * Called when enumeration asked by nsITelephonyProvider::enumerateCalls
+   * Called when enumeration asked by nsITelephonyService::enumerateCalls
    * is completed.
    */
   void enumerateCallStateComplete();
 
   /**
-   * Called when nsITelephonyProvider is asked to enumerate the current
-   * telephony call state (nsITelephonyProvider::enumerateCalls). This is
+   * Called when nsITelephonyService is asked to enumerate the current
+   * telephony call state (nsITelephonyService::enumerateCalls). This is
    * called once per call that is currently managed by the RIL.
    *
    * @param clientId
             Indicate the RIL client, 0 ~ (number of client - 1).
    * @param callIndex
    *        Call identifier assigned by the RIL.
    * @param callState
-   *        One of the nsITelephonyProvider::CALL_STATE_* values.
+   *        One of the nsITelephonyService::CALL_STATE_* values.
    * @param number
    *        Number of the other party.
    * @param isOutgoing
    *        Indicates whether this call is outgoing or incoming.
    * @param isConference
    *        Indicates whether this call is a conference call.
    * @param isSwitchable
    *        Indicates whether this call can be switched between states of
-   *        nsITelephonyProvider::CALL_STATE_CONNECTED and
-   *        nsITelephonyProvider::CALL_STATE_HELD.
+   *        nsITelephonyService::CALL_STATE_CONNECTED and
+   *        nsITelephonyService::CALL_STATE_HELD.
    * @param isMergeable
    *        Indicates whether this call be be added into a conference.
    */
   void enumerateCallState(in unsigned long clientId,
                           in unsigned long callIndex,
                           in unsigned short callState,
                           in AString number,
                           in boolean isOutgoing,
@@ -95,17 +95,17 @@ interface nsITelephonyListener : nsISupp
   /**
    * Notify when RIL receives supplementary service notification.
    *
    * @param clientId
             Indicate the RIL client, 0 ~ (number of client - 1).
    * @param callIndex
    *        Call identifier assigned by the RIL. -1 if not specified
    * @param notification
-   *        One of the nsITelephonyProvider::NOTIFICATION_* values.
+   *        One of the nsITelephonyService::NOTIFICATION_* values.
    */
   void supplementaryServiceNotification(in unsigned long clientId,
                                         in long callIndex,
                                         in unsigned short notification);
 
   /**
    * Called when RIL error occurs.
    *
@@ -154,28 +154,28 @@ interface nsITelephonyCallback : nsISupp
 
   /**
    * Called when a dial request succeeds.
    */
   void notifyDialSuccess(in unsigned long callIndex);
 };
 
 %{C++
-#define TELEPHONY_PROVIDER_CID \
+#define TELEPHONY_SERVICE_CID \
   { 0x9cf8aa52, 0x7c1c, 0x4cde, { 0x97, 0x4e, 0xed, 0x2a, 0xa0, 0xe7, 0x35, 0xfa } }
-#define TELEPHONY_PROVIDER_CONTRACTID \
-  "@mozilla.org/telephony/telephonyprovider;1"
+#define TELEPHONY_SERVICE_CONTRACTID \
+  "@mozilla.org/telephony/telephonyservice;1"
 %}
 
 /**
  * XPCOM component (in the content process) that provides the telephony
  * information.
  */
-[scriptable, uuid(b16ca98f-994f-4ae1-8c2d-e7b18e08d1f3)]
-interface nsITelephonyProvider : nsISupports
+[scriptable, uuid(4ff3ecb7-b024-4752-9dd6-c3623c6e6b8a)]
+interface nsITelephonyService : nsISupports
 {
   const unsigned short CALL_STATE_UNKNOWN = 0;
   const unsigned short CALL_STATE_DIALING = 1;
   const unsigned short CALL_STATE_ALERTING = 2;
   const unsigned short CALL_STATE_CONNECTING = 3;
   const unsigned short CALL_STATE_CONNECTED = 4;
   const unsigned short CALL_STATE_HOLDING = 5;
   const unsigned short CALL_STATE_HELD = 6;
--- a/dom/telephony/test/marionette/test_dsds_default_service_id.js
+++ b/dom/telephony/test/marionette/test_dsds_default_service_id.js
@@ -1,18 +1,18 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 MARIONETTE_TIMEOUT = 60000;
 MARIONETTE_CONTEXT = "chrome";
 
 Cu.import("resource://gre/modules/Promise.jsm");
 
-const TELEPHONY_PROVIDER_CONTRACTID =
-  "@mozilla.org/telephony/telephonyprovider;1";
+const TELEPHONY_SERVICE_CONTRACTID =
+  "@mozilla.org/telephony/telephonyservice;1";
 
 const PREF_RIL_NUM_RADIO_INTERFACES = "ril.numRadioInterfaces";
 const PREF_DEFAULT_SERVICE_ID = "dom.telephony.defaultServiceId";
 
 function setPrefAndVerify(prefKey, setVal, service, attrName, expectedVal, deferred) {
   log("  Set '" + prefKey + "' to " + setVal);
   Services.prefs.setIntPref(prefKey, setVal);
   let prefVal = Services.prefs.getIntPref(prefKey);
@@ -117,11 +117,11 @@ function verify(contractId, ifaceName, a
 
       deferred.resolve(numRil);
     });
 
   return deferred.promise;
 }
 
 getNumRadioInterfaces()
-  .then(verify.bind(null, TELEPHONY_PROVIDER_CONTRACTID, "nsITelephonyProvider",
+  .then(verify.bind(null, TELEPHONY_SERVICE_CONTRACTID, "nsITelephonyService",
                     "defaultServiceId", PREF_DEFAULT_SERVICE_ID))
   .then(finish);
--- a/layout/build/nsLayoutModule.cpp
+++ b/layout/build/nsLayoutModule.cpp
@@ -231,17 +231,17 @@ static void Shutdown();
 #include "AudioChannelService.h"
 
 #include "mozilla/dom/power/PowerManagerService.h"
 #include "mozilla/dom/alarm/AlarmHalService.h"
 #include "mozilla/dom/time/TimeService.h"
 #include "StreamingProtocolService.h"
 
 #include "mozilla/dom/telephony/TelephonyFactory.h"
-#include "nsITelephonyProvider.h"
+#include "nsITelephonyService.h"
 
 #ifdef MOZ_WIDGET_GONK
 #include "GonkGPSGeolocationProvider.h"
 #endif
 #include "MediaManager.h"
 
 #include "GMPService.h"
 
@@ -353,18 +353,18 @@ NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR
                                          GonkGPSGeolocationProvider::GetSingleton)
 // Since the nsVolumeService constructor calls into nsIPowerManagerService,
 // we need it to be constructed sometime after nsIPowerManagerService.
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsVolumeService,
                                          nsVolumeService::GetSingleton)
 #endif
 NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsIMediaManagerService,
                                          MediaManager::GetInstance)
-NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsITelephonyProvider,
-                                         TelephonyFactory::CreateTelephonyProvider)
+NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsITelephonyService,
+                                         TelephonyFactory::CreateTelephonyService)
 
 //-----------------------------------------------------------------------------
 
 static bool gInitialized = false;
 
 // Perform our one-time intialization for this module
 
 // static
@@ -787,17 +787,17 @@ NS_DEFINE_NAMED_CID(NS_GAMEPAD_TEST_CID)
 #ifdef MOZ_WEBSPEECH
 NS_DEFINE_NAMED_CID(NS_FAKE_SPEECH_RECOGNITION_SERVICE_CID);
 NS_DEFINE_NAMED_CID(NS_SYNTHVOICEREGISTRY_CID);
 #endif
 
 #ifdef ACCESSIBILITY
 NS_DEFINE_NAMED_CID(NS_ACCESSIBILITY_SERVICE_CID);
 #endif
-NS_DEFINE_NAMED_CID(TELEPHONY_PROVIDER_CID);
+NS_DEFINE_NAMED_CID(TELEPHONY_SERVICE_CID);
 
 NS_DEFINE_NAMED_CID(GECKO_MEDIA_PLUGIN_SERVICE_CID);
 
 static nsresult
 CreateWindowCommandTableConstructor(nsISupports *aOuter,
                                     REFNSIID aIID, void **aResult)
 {
   nsresult rv;
@@ -1074,17 +1074,17 @@ static const mozilla::Module::CIDEntry k
 #endif
   { &kNS_MEDIAMANAGERSERVICE_CID, false, nullptr, nsIMediaManagerServiceConstructor },
 #ifdef MOZ_GAMEPAD
   { &kNS_GAMEPAD_TEST_CID, false, nullptr, GamepadServiceTestConstructor },
 #endif
 #ifdef ACCESSIBILITY
   { &kNS_ACCESSIBILITY_SERVICE_CID, false, nullptr, CreateA11yService },
 #endif
-  { &kTELEPHONY_PROVIDER_CID, false, nullptr, nsITelephonyProviderConstructor },
+  { &kTELEPHONY_SERVICE_CID, false, nullptr, nsITelephonyServiceConstructor },
   { nullptr }
 };
 
 static const mozilla::Module::ContractIDEntry kLayoutContracts[] = {
   XPCONNECT_CONTRACTS
   { "@mozilla.org/layout/xul-boxobject;1", &kNS_BOXOBJECT_CID },
 #ifdef MOZ_XUL
   { "@mozilla.org/layout/xul-boxobject-listbox;1", &kNS_LISTBOXOBJECT_CID },
@@ -1230,17 +1230,17 @@ static const mozilla::Module::ContractID
 #ifdef MOZ_GAMEPAD
   { NS_GAMEPAD_TEST_CONTRACTID, &kNS_GAMEPAD_TEST_CID },
 #endif
   { MEDIAMANAGERSERVICE_CONTRACTID, &kNS_MEDIAMANAGERSERVICE_CID },
 #ifdef ACCESSIBILITY
   { "@mozilla.org/accessibilityService;1", &kNS_ACCESSIBILITY_SERVICE_CID },
   { "@mozilla.org/accessibleRetrieval;1", &kNS_ACCESSIBILITY_SERVICE_CID },
 #endif
-  { TELEPHONY_PROVIDER_CONTRACTID, &kTELEPHONY_PROVIDER_CID },
+  { TELEPHONY_SERVICE_CONTRACTID, &kTELEPHONY_SERVICE_CID },
   { "@mozilla.org/gecko-media-plugin-service;1",  &kGECKO_MEDIA_PLUGIN_SERVICE_CID },
   { nullptr }
 };
 
 static const mozilla::Module::CategoryEntry kLayoutCategories[] = {
   XPCONNECT_CATEGORIES
   { "content-policy", NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID, NS_DATADOCUMENTCONTENTPOLICY_CONTRACTID },
   { "content-policy", NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID, NS_NODATAPROTOCOLCONTENTPOLICY_CONTRACTID },