Backed out changeset 959ee37e80d5 (bug 1072808)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 25 Nov 2014 10:45:38 +0100
changeset 233585 f967b360479a4f58ca646c768ea99fae8cb4929e
parent 233584 d120afea97156270994d51f2346d8c36985aa19f
child 233586 a1b0871d0014fc86d030865d2a57480a7bea4954
push id7326
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:58:42 +0000
treeherdermozilla-aurora@d3a3b2a0f2f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1072808
milestone36.0a1
backs out959ee37e80d5aff91a4ee091e5e8732117848a1e
Backed out changeset 959ee37e80d5 (bug 1072808)
dom/mobileconnection/gonk/MobileConnectionService.js
dom/mobileconnection/gonk/nsIMobileConnectionMessenger.idl
dom/mobileconnection/moz.build
dom/system/gonk/RILSystemMessenger.jsm
dom/system/gonk/RILSystemMessengerHelper.js
dom/system/gonk/tests/test_ril_system_messenger.js
dom/telephony/gonk/TelephonyService.js
--- a/dom/mobileconnection/gonk/MobileConnectionService.js
+++ b/dom/mobileconnection/gonk/MobileConnectionService.js
@@ -45,19 +45,19 @@ const NS_XPCOM_SHUTDOWN_OBSERVER_ID     
 const NS_PREFBRANCH_PREFCHANGE_TOPIC_ID  = "nsPref:changed";
 const NS_NETWORK_ACTIVE_CHANGED_TOPIC_ID = "network-active-changed";
 
 const kPrefRilDebuggingEnabled = "ril.debugging.enabled";
 
 const INT32_MAX = 2147483647;
 const UNKNOWN_RSSI = 99;
 
-XPCOMUtils.defineLazyServiceGetter(this, "gMobileConnectionMessenger",
-                                   "@mozilla.org/ril/system-messenger-helper;1",
-                                   "nsIMobileConnectionMessenger");
+XPCOMUtils.defineLazyServiceGetter(this, "gSystemMessenger",
+                                   "@mozilla.org/system-message-internal;1",
+                                   "nsISystemMessagesInternal");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gNetworkManager",
                                    "@mozilla.org/network/manager;1",
                                    "nsINetworkManager");
 
 XPCOMUtils.defineLazyServiceGetter(this, "gRadioInterfaceLayer",
                                    "@mozilla.org/ril;1",
                                    "nsIRadioInterfaceLayer");
@@ -1148,16 +1148,21 @@ MobileConnectionService.prototype = {
 
   _updateDebugFlag: function() {
     try {
       DEBUG = RIL.DEBUG_RIL ||
               Services.prefs.getBoolPref(kPrefRilDebuggingEnabled);
     } catch (e) {}
   },
 
+  _broadcastCdmaInfoRecordSystemMessage: function(aMessage) {
+    // TODO: Bug 1072808, Broadcast System Message with proxy.
+    gSystemMessenger.broadcastMessage("cdma-info-rec-received", aMessage);
+  },
+
   /**
    * nsIMobileConnectionService interface.
    */
   get numItems() {
     return this._providers.length;
   },
 
   getItemByServiceId: function(aServiceId) {
@@ -1191,18 +1196,16 @@ MobileConnectionService.prototype = {
   },
 
   notifyUssdReceived: function(aClientId, aMessage, aSessionEnded) {
     if (DEBUG) {
       debug("notifyUssdReceived for " + aClientId + ": " +
             aMessage + " (sessionEnded : " + aSessionEnded + ")");
     }
 
-    gMobileConnectionMessenger.notifyUssdReceived(aClientId, aMessage, aSessionEnded);
-
     this.getItemByServiceId(aClientId)
         .deliverListenerEvent("notifyUssdReceived", [aMessage, aSessionEnded]);
   },
 
   notifyDataError: function(aClientId, aMessage) {
     if (DEBUG) {
       debug("notifyDataError for " + aClientId + ": " + aMessage);
     }
@@ -1360,66 +1363,118 @@ MobileConnectionService.prototype = {
     }
 
     let provider = this.getItemByServiceId(aClientId);
     provider.notifyCFStateChanged(aAction, aReason, aNumber, aTimeSeconds,
                                   aServiceClass);
   },
 
   notifyCdmaInfoRecDisplay: function(aClientId, aDisplay) {
-    gMobileConnectionMessenger.notifyCdmaInfoRecDisplay(aClientId, aDisplay);
+    this._broadcastCdmaInfoRecordSystemMessage({
+      clientId: aClientId,
+      display: aDisplay
+    });
   },
 
   notifyCdmaInfoRecCalledPartyNumber: function(aClientId, aType, aPlan, aNumber,
                                                aPi, aSi) {
-    gMobileConnectionMessenger
-      .notifyCdmaInfoRecCalledPartyNumber(aClientId, aType, aPlan, aNumber,
-                                          aPi, aSi);
+    this._broadcastCdmaInfoRecordSystemMessage({
+      clientId: aClientId,
+      calledNumber: {
+        type: aType,
+        plan: aPlan,
+        number: aNumber,
+        pi: aPi,
+        si: aSi
+      }
+    });
   },
 
   notifyCdmaInfoRecCallingPartyNumber: function(aClientId, aType, aPlan, aNumber,
                                                 aPi, aSi) {
-    gMobileConnectionMessenger
-      .notifyCdmaInfoRecCallingPartyNumber(aClientId, aType, aPlan, aNumber,
-                                           aPi, aSi);
+    this._broadcastCdmaInfoRecordSystemMessage({
+      clientId: aClientId,
+      callingNumber: {
+        type: aType,
+        plan: aPlan,
+        number: aNumber,
+        pi: aPi,
+        si: aSi
+      }
+    });
   },
 
   notifyCdmaInfoRecConnectedPartyNumber: function(aClientId, aType, aPlan, aNumber,
                                                   aPi, aSi) {
-    gMobileConnectionMessenger
-      .notifyCdmaInfoRecConnectedPartyNumber(aClientId, aType, aPlan, aNumber,
-                                             aPi, aSi);
+    this._broadcastCdmaInfoRecordSystemMessage({
+      clientId: aClientId,
+      connectedNumber: {
+        type: aType,
+        plan: aPlan,
+        number: aNumber,
+        pi: aPi,
+        si: aSi
+      }
+    });
   },
 
   notifyCdmaInfoRecSignal: function(aClientId, aType, aAlertPitch, aSignal){
-    gMobileConnectionMessenger
-      .notifyCdmaInfoRecSignal(aClientId, aType, aAlertPitch, aSignal);
+    this._broadcastCdmaInfoRecordSystemMessage({
+      clientId: aClientId,
+      signal: {
+        type: aType,
+        alertPitch: aAlertPitch,
+        signal: aSignal
+      }
+    });
   },
 
   notifyCdmaInfoRecRedirectingNumber: function(aClientId, aType, aPlan, aNumber,
                                                aPi, aSi, aReason) {
-    gMobileConnectionMessenger
-      .notifyCdmaInfoRecRedirectingNumber(aClientId, aType, aPlan, aNumber,
-                                          aPi, aSi, aReason);
+    this._broadcastCdmaInfoRecordSystemMessage({
+      clientId: aClientId,
+      redirect: {
+        type: aType,
+        plan: aPlan,
+        number: aNumber,
+        pi: aPi,
+        si: aSi,
+        reason: aReason
+      }
+    });
   },
 
   notifyCdmaInfoRecLineControl: function(aClientId, aPolarityIncluded, aToggle,
                                          aReverse, aPowerDenial) {
-    gMobileConnectionMessenger
-      .notifyCdmaInfoRecLineControl(aClientId, aPolarityIncluded, aToggle,
-                                    aReverse, aPowerDenial);
+    this._broadcastCdmaInfoRecordSystemMessage({
+      clientId: aClientId,
+      lineControl: {
+        polarityIncluded: aPolarityIncluded,
+        toggle: aToggle,
+        reverse: aReverse,
+        powerDenial: aPowerDenial
+      }
+    });
   },
 
   notifyCdmaInfoRecClir: function(aClientId, aCause) {
-    gMobileConnectionMessenger.notifyCdmaInfoRecClir(aClientId, aCause);
+    this._broadcastCdmaInfoRecordSystemMessage({
+      clientId: aClientId,
+      clirCause: aCause
+    });
   },
 
-  notifyCdmaInfoRecAudioControl: function(aClientId, aUpLink, aDownLink) {
-    gMobileConnectionMessenger
-      .notifyCdmaInfoRecAudioControl(aClientId, aUpLink, aDownLink);
+  notifyCdmaInfoRecAudioControl: function(aClientId, aUplink, aDownLink) {
+    this._broadcastCdmaInfoRecordSystemMessage({
+      clientId: aClientId,
+      audioControl: {
+        upLink: aUplink,
+        downLink: aDownLink
+      }
+    });
   },
 
   /**
    * nsIObserver interface.
    */
   observe: function(aSubject, aTopic, aData) {
     switch (aTopic) {
       case NS_NETWORK_ACTIVE_CHANGED_TOPIC_ID:
deleted file mode 100644
--- a/dom/mobileconnection/gonk/nsIMobileConnectionMessenger.idl
+++ /dev/null
@@ -1,213 +0,0 @@
-/* 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 "nsISupports.idl"
-
-[scriptable, uuid(fd2fa95c-5b54-11e4-bc6b-6f3bffb681cd)]
-interface nsIMobileConnectionMessenger : nsISupports
-{
-  /**
-   * 'ussd-received' system message
-   *
-   * @param aServiceId
-   *        The ID of Service where this info is notified from.
-   * @param aMessage
-   *        USSD Message to be displayed.
-   * @param aSessionEnded
-   *        True if USSD session is ended.
-   */
-  void notifyUssdReceived(in unsigned long aServiceId,
-                          in DOMString aMessage,
-                          in boolean aSessionEnded);
-
-  /**
-   * 'cdma-info-rec-received' system message with Display Info
-   *
-   * @param aServiceId
-   *        The ID of Service where this info is notified from.
-   * @param aDisplay
-   *        The text to be displayed.
-   */
-  void notifyCdmaInfoRecDisplay(in unsigned long aServiceId,
-                                in DOMString aDisplay);
-
-  /**
-   * 'cdma-info-rec-received' system message with Called Party Number Info
-   *
-   * @param aServiceId
-   *        The ID of Service where this info is notified from.
-   * @param aTtype
-   *        The type of number. (3-bit binary)
-   *        See Table 2.7.1.3.2.4-2 in 3GPP2 C.S0005-F.
-   * @param aPlan
-   *        The numbering plan. (4-bit binary)
-   *        See Table 2.7.1.3.2.4-3 in 3GPP2 C.S0005-F.
-   * @param aNumber
-   *        The string presentation of the number.
-   * @param aPi (2-bit binary)
-   *        The Presentation indicator of the number.
-   *        See Table 2.7.4.4-1 in 3GPP2 C.S0005-F.
-   * @param aSi (2-bit binary)
-   *        The Screening Indicator of the number.
-   *        See Table 2.7.4.4-2 in 3GPP2 C.S0005-F.
-   */
-  void notifyCdmaInfoRecCalledPartyNumber(in unsigned long aServiceId,
-                                          in unsigned short aType,
-                                          in unsigned short aPlan,
-                                          in DOMString aNumber,
-                                          in unsigned short aPi,
-                                          in unsigned short aSi);
-
-  /**
-   * 'cdma-info-rec-received' system message with Calling Party Number Info
-   *
-   * @param aServiceId
-   *        The ID of Service where this info is notified from.
-   * @param aTtype
-   *        The type of number. (3-bit binary)
-   *        See Table 2.7.1.3.2.4-2 in 3GPP2 C.S0005-F.
-   * @param aPlan
-   *        The numbering plan. (4-bit binary)
-   *        See Table 2.7.1.3.2.4-3 in 3GPP2 C.S0005-F.
-   * @param aNumber
-   *        The string presentation of the number.
-   * @param aPi (2-bit binary)
-   *        The Presentation indicator of the number.
-   *        See Table 2.7.4.4-1 in 3GPP2 C.S0005-F.
-   * @param aSi (2-bit binary)
-   *        The Screening Indicator of the number.
-   *        See Table 2.7.4.4-2 in 3GPP2 C.S0005-F.
-   */
-  void notifyCdmaInfoRecCallingPartyNumber(in unsigned long aServiceId,
-                                           in unsigned short aType,
-                                           in unsigned short aPlan,
-                                           in DOMString aNumber,
-                                           in unsigned short aPi,
-                                           in unsigned short aSi);
-
-  /**
-   * 'cdma-info-rec-received' system message with Connected Party Number Info
-   *
-   * @param aServiceId
-   *        The ID of Service where this info is notified from.
-   * @param aTtype
-   *        The type of number. (3-bit binary)
-   *        See Table 2.7.1.3.2.4-2 in 3GPP2 C.S0005-F.
-   * @param aPlan
-   *        The numbering plan. (4-bit binary)
-   *        See Table 2.7.1.3.2.4-3 in 3GPP2 C.S0005-F.
-   * @param aNumber
-   *        The string presentation of the number.
-   * @param aPi (2-bit binary)
-   *        The Presentation indicator of the number.
-   *        See Table 2.7.4.4-1 in 3GPP2 C.S0005-F.
-   * @param aSi (2-bit binary)
-   *        The Screening Indicator of the number.
-   *        See Table 2.7.4.4-2 in 3GPP2 C.S0005-F.
-   */
-  void notifyCdmaInfoRecConnectedPartyNumber(in unsigned long aServiceId,
-                                             in unsigned short aType,
-                                             in unsigned short aPlan,
-                                             in DOMString aNumber,
-                                             in unsigned short aPi,
-                                             in unsigned short aSi);
-
-  /**
-   * 'cdma-info-rec-received' system message with Signal Info
-   *
-   * @param aServiceId
-   *        The ID of Service where this info is notified from.
-   * @param aType
-   *        The signal type. (2-bit binary)
-   *        See Table 3.7.5.5-1 in 3GPP2 C.S0005-F.
-   * @param aAlertPitch
-   *        The pitch of the alerting signal. (2-bit binary)
-   *        See Table 3.7.5.5-2 in 3GPP2 C.S0005-F.
-   * @param aSignal
-   *        The signal code. (6-bit binary)
-   *        See Table 3.7.5.5-3, 3.7.5.5-4, 3.7.5.5-5 in 3GPP2 C.S0005-F.
-   */
-  void notifyCdmaInfoRecSignal(in unsigned long aServiceId,
-                               in unsigned short aType,
-                               in unsigned short aAlertPitch,
-                               in unsigned short aSignal);
-
-  /**
-   * 'cdma-info-rec-received' system message with Redirecting Number Info
-   *
-   * @param aServiceId
-   *        The ID of Service where this info is notified from.
-   * @param aTtype
-   *        The type of number. (3-bit binary)
-   *        See Table 2.7.1.3.2.4-2 in 3GPP2 C.S0005-F.
-   * @param aPlan
-   *        The numbering plan. (4-bit binary)
-   *        See Table 2.7.1.3.2.4-3 in 3GPP2 C.S0005-F.
-   * @param aNumber
-   *        The string presentation of the number.
-   * @param aPi (2-bit binary)
-   *        The Presentation indicator of the number.
-   *        See Table 2.7.4.4-1 in 3GPP2 C.S0005-F.
-   * @param aSi (2-bit binary)
-   *        The Screening Indicator of the number.
-   *        See Table 2.7.4.4-2 in 3GPP2 C.S0005-F.
-   * @param aReason (4-bit binary)
-   *        The redirection reason.
-   *        See Table 3.7.5.11-1 in 3GPP2 C.S0005-F.
-   */
-  void notifyCdmaInfoRecRedirectingNumber(in unsigned long aServiceId,
-                                          in unsigned short aType,
-                                          in unsigned short aPlan,
-                                          in DOMString aNumber,
-                                          in unsigned short aPi,
-                                          in unsigned short aSi,
-                                          in unsigned short aReason);
-
-  /**
-   * 'cdma-info-rec-received' system message with Line Control Info
-   *
-   * @param aServiceId
-   *        The ID of Service where this info is notified from.
-   * @param aPolarityIncluded (1-bit)
-   *        Polarity parameter included.
-   * @param aToggle (1-bit)
-   *        Toggle mode.
-   * @param aReverse (1-bit)
-   *        Reverse polarity.
-   * @param aPowerDenial (8-bit)
-   *        Power denial timeout.
-   */
-  void notifyCdmaInfoRecLineControl(in unsigned long aServiceId,
-                                    in unsigned short aPolarityIncluded,
-                                    in unsigned short aToggle,
-                                    in unsigned short aReverse,
-                                    in unsigned short aPowerDenial);
-
-  /**
-   * 'cdma-info-rec-received' system message with CLIR Info
-   *
-   * @param aServiceId
-   *        The ID of Service where this info is notified from.
-   * @param aCause
-   *        Reason code. (8-bit binary)
-   *        See Table A 1.1-1 in T53.
-   *
-   * See 'ANNEX 1 Country-Specific Record Type for Japan' in T53.
-   * http://www.arib.or.jp/english/html/overview/doc/T53v6_5_pdf/5_ANNEX_v6_5.pdf
-   */
-  void notifyCdmaInfoRecClir(in unsigned long aServiceId,
-                             in unsigned short aCause);
-
-  /**
-   * 'cdma-info-rec-received' system message with Audio Control Info
-   *
-   * @param aServiceId
-   *        The ID of Service where this info is notified from.
-   * @param aUpLink
-   * @param aDownLink
-   */
-  void notifyCdmaInfoRecAudioControl(in unsigned long aServiceId,
-                                     in short aUpLink,
-                                     in short aDownLink);
-};
--- a/dom/mobileconnection/moz.build
+++ b/dom/mobileconnection/moz.build
@@ -57,17 +57,16 @@ IPDL_SOURCES += [
     'ipc/PMobileConnection.ipdl',
     'ipc/PMobileConnectionRequest.ipdl',
     'ipc/PMobileConnectionTypes.ipdlh',
 ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['MOZ_B2G_RIL']:
     XPIDL_SOURCES += [
         'gonk/nsIGonkMobileConnectionService.idl',
-        'gonk/nsIMobileConnectionMessenger.idl',
     ]
     EXTRA_COMPONENTS += [
         'gonk/MobileConnectionService.js',
         'gonk/MobileConnectionService.manifest',
     ]
 
 FAIL_ON_WARNINGS = True
 
--- a/dom/system/gonk/RILSystemMessenger.jsm
+++ b/dom/system/gonk/RILSystemMessenger.jsm
@@ -150,161 +150,14 @@ RILSystemMessenger.prototype = {
     }
 
     if (aCdmaServiceCategory !=
         Ci.nsICellBroadcastService.CDMA_SERVICE_CATEGORY_INVALID) {
       data.cdmaServiceCategory = aCdmaServiceCategory;
     }
 
     this.broadcastMessage("cellbroadcast-received", data);
-  },
-
-  /**
-   * Wrapper to send 'ussd-received' system message.
-   */
-  notifyUssdReceived: function(aServiceId, aMessage, aSessionEnded) {
-    this.broadcastMessage("ussd-received", {
-      serviceId: aServiceId,
-      message: aMessage,
-      sessionEnded: aSessionEnded
-    });
-  },
-
-  /**
-   * Wrapper to send 'cdma-info-rec-received' system message with Display Info.
-   */
-  notifyCdmaInfoRecDisplay: function(aServiceId, aDisplay) {
-    this.broadcastMessage("cdma-info-rec-received", {
-      clientId: aServiceId,
-      display: aDisplay
-    });
-  },
-
-  /**
-   * Wrapper to send 'cdma-info-rec-received' system message with Called Party
-   * Number Info.
-   */
-  notifyCdmaInfoRecCalledPartyNumber: function(aServiceId, aType, aPlan,
-                                               aNumber, aPi, aSi) {
-    this.broadcastMessage("cdma-info-rec-received", {
-      clientId: aServiceId,
-      calledNumber: {
-        type: aType,
-        plan: aPlan,
-        number: aNumber,
-        pi: aPi,
-        si: aSi
-      }
-    });
-  },
-
-  /**
-   * Wrapper to send 'cdma-info-rec-received' system message with Calling Party
-   * Number Info.
-   */
-  notifyCdmaInfoRecCallingPartyNumber: function(aServiceId, aType, aPlan,
-                                                aNumber, aPi, aSi) {
-    this.broadcastMessage("cdma-info-rec-received", {
-      clientId: aServiceId,
-      callingNumber: {
-        type: aType,
-        plan: aPlan,
-        number: aNumber,
-        pi: aPi,
-        si: aSi
-      }
-    });
-  },
-
-  /**
-   * Wrapper to send 'cdma-info-rec-received' system message with Connected Party
-   * Number Info.
-   */
-  notifyCdmaInfoRecConnectedPartyNumber: function(aServiceId, aType, aPlan,
-                                                  aNumber, aPi, aSi) {
-    this.broadcastMessage("cdma-info-rec-received", {
-      clientId: aServiceId,
-      connectedNumber: {
-        type: aType,
-        plan: aPlan,
-        number: aNumber,
-        pi: aPi,
-        si: aSi
-      }
-    });
-  },
-
-  /**
-   * Wrapper to send 'cdma-info-rec-received' system message with Signal Info.
-   */
-  notifyCdmaInfoRecSignal: function(aServiceId, aType, aAlertPitch, aSignal) {
-    this.broadcastMessage("cdma-info-rec-received", {
-      clientId: aServiceId,
-      signal: {
-        type: aType,
-        alertPitch: aAlertPitch,
-        signal: aSignal
-      }
-    });
-  },
-
-  /**
-   * Wrapper to send 'cdma-info-rec-received' system message with Redirecting
-   * Number Info.
-   */
-  notifyCdmaInfoRecRedirectingNumber: function(aServiceId, aType, aPlan,
-                                               aNumber, aPi, aSi, aReason) {
-    this.broadcastMessage("cdma-info-rec-received", {
-      clientId: aServiceId,
-      redirect: {
-        type: aType,
-        plan: aPlan,
-        number: aNumber,
-        pi: aPi,
-        si: aSi,
-        reason: aReason
-      }
-    });
-  },
-
-  /**
-   * Wrapper to send 'cdma-info-rec-received' system message with Line Control Info.
-   */
-  notifyCdmaInfoRecLineControl: function(aServiceId, aPolarityIncluded,
-                                         aToggle, aReverse, aPowerDenial) {
-    this.broadcastMessage("cdma-info-rec-received", {
-      clientId: aServiceId,
-      lineControl: {
-        polarityIncluded: aPolarityIncluded,
-        toggle: aToggle,
-        reverse: aReverse,
-        powerDenial: aPowerDenial
-      }
-    });
-  },
-
-  /**
-   * Wrapper to send 'cdma-info-rec-received' system message with CLIR Info.
-   */
-  notifyCdmaInfoRecClir: function(aServiceId, aCause) {
-    this.broadcastMessage("cdma-info-rec-received", {
-      clientId: aServiceId,
-      clirCause: aCause
-    });
-  },
-
-  /**
-   * Wrapper to send 'cdma-info-rec-received' system message with Audio Control Info.
-   */
-  notifyCdmaInfoRecAudioControl: function(aServiceId, aUpLink, aDownLink) {
-    this.broadcastMessage("cdma-info-rec-received", {
-      clientId: aServiceId,
-      audioControl: {
-        upLink: aUpLink,
-        downLink: aDownLink
-      }
-    });
   }
 };
 
 this.EXPORTED_SYMBOLS = [
   'RILSystemMessenger'
 ];
--- a/dom/system/gonk/RILSystemMessengerHelper.js
+++ b/dom/system/gonk/RILSystemMessengerHelper.js
@@ -46,18 +46,17 @@ function RILSystemMessengerHelper() {
     gSystemMessenger.broadcastMessage(aType, aMessage);
   };
 }
 RILSystemMessengerHelper.prototype = {
 
   classID: RILSYSTEMMESSENGERHELPER_CID,
   QueryInterface: XPCOMUtils.generateQI([Ci.nsITelephonyMessenger,
                                          Ci.nsISmsMessenger,
-                                         Ci.nsICellbroadcastMessenger,
-                                         Ci.nsIMobileConnectionMessenger]),
+                                         Ci.nsICellbroadcastMessenger]),
 
   /**
    * RILSystemMessenger instance.
    */
   messenger: null,
 
   /**
    * nsITelephonyMessenger API
@@ -89,65 +88,12 @@ RILSystemMessengerHelper.prototype = {
   notifyCbMessageReceived: function(aServiceId, aGsmGeographicalScope, aMessageCode,
                                     aMessageId, aLanguage, aBody, aMessageClass,
                                     aTimestamp, aCdmaServiceCategory, aHasEtwsInfo,
                                     aEtwsWarningType, aEtwsEmergencyUserAlert, aEtwsPopup) {
     this.messenger.notifyCbMessageReceived(aServiceId, aGsmGeographicalScope, aMessageCode,
                                            aMessageId, aLanguage, aBody, aMessageClass,
                                            aTimestamp, aCdmaServiceCategory, aHasEtwsInfo,
                                            aEtwsWarningType, aEtwsEmergencyUserAlert, aEtwsPopup);
-  },
-
-  /**
-   * nsIMobileConnectionMessenger API
-   */
-  notifyUssdReceived: function(aServiceId, aMessage, aSessionEnded) {
-    this.messenger.notifyUssdReceived(aServiceId, aMessage, aSessionEnded);
-  },
-
-  notifyCdmaInfoRecDisplay: function(aServiceId, aDisplay) {
-    this.messenger.notifyCdmaInfoRecDisplay(aServiceId, aDisplay);
-  },
-
-  notifyCdmaInfoRecCalledPartyNumber: function(aServiceId, aType, aPlan,
-                                               aNumber, aPi, aSi) {
-    this.messenger.notifyCdmaInfoRecCalledPartyNumber(aServiceId, aType, aPlan,
-                                                      aNumber, aPi, aSi);
-  },
-
-  notifyCdmaInfoRecCallingPartyNumber: function(aServiceId, aType, aPlan,
-                                                aNumber, aPi, aSi) {
-    this.messenger.notifyCdmaInfoRecCallingPartyNumber(aServiceId, aType, aPlan,
-                                                       aNumber, aPi, aSi);
-  },
-
-  notifyCdmaInfoRecConnectedPartyNumber: function(aServiceId, aType, aPlan,
-                                                  aNumber, aPi, aSi) {
-    this.messenger.notifyCdmaInfoRecConnectedPartyNumber(aServiceId, aType, aPlan,
-                                                         aNumber, aPi, aSi);
-  },
-
-  notifyCdmaInfoRecSignal: function(aServiceId, aType, aAlertPitch, aSignal) {
-    this.messenger.notifyCdmaInfoRecSignal(aServiceId, aType, aAlertPitch, aSignal);
-  },
-
-  notifyCdmaInfoRecRedirectingNumber: function(aServiceId, aType, aPlan,
-                                               aNumber, aPi, aSi, aReason) {
-    this.messenger.notifyCdmaInfoRecRedirectingNumber(aServiceId, aType, aPlan,
-                                                      aNumber, aPi, aSi, aReason);
-  },
-
-  notifyCdmaInfoRecLineControl: function(aServiceId, aPolarityIncluded,
-                                         aToggle, aReverse, aPowerDenial) {
-    this.messenger.notifyCdmaInfoRecLineControl(aServiceId, aPolarityIncluded,
-                                                aToggle, aReverse, aPowerDenial);
-  },
-
-  notifyCdmaInfoRecClir: function(aServiceId, aCause) {
-    this.messenger.notifyCdmaInfoRecClir(aServiceId, aCause);
-  },
-
-  notifyCdmaInfoRecAudioControl: function(aServiceId, aUpLink, aDownLink) {
-    this.messenger.notifyCdmaInfoRecAudioControl(aServiceId, aUpLink, aDownLink);
   }
 };
 
-this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RILSystemMessengerHelper]);
+this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RILSystemMessengerHelper]);
\ No newline at end of file
--- a/dom/system/gonk/tests/test_ril_system_messenger.js
+++ b/dom/system/gonk/tests/test_ril_system_messenger.js
@@ -49,23 +49,19 @@ function run_test() {
                            .getService(Ci.nsITelephonyMessenger);
 
   let smsMessenger = Cc["@mozilla.org/ril/system-messenger-helper;1"]
                      .getService(Ci.nsISmsMessenger);
 
   let cellbroadcastMessenger = Cc["@mozilla.org/ril/system-messenger-helper;1"]
                                .getService(Ci.nsICellbroadcastMessenger);
 
-  let mobileConnectionMessenger = Cc["@mozilla.org/ril/system-messenger-helper;1"]
-                                  .getService(Ci.nsIMobileConnectionMessenger);
-
   ok(telephonyMessenger !== null, "Get TelephonyMessenger.");
   ok(smsMessenger != null, "Get SmsMessenger.");
   ok(cellbroadcastMessenger != null, "Get CellbroadcastMessenger.");
-  ok(mobileConnectionMessenger != null, "Get MobileConnectionMessenger.");
 
   run_next_test();
 }
 
 /**
  * Verify RILSystemMessenger.notifyNewCall()
  */
 add_test(function test_telephony_messenger_notify_new_call() {
@@ -372,142 +368,8 @@ add_test(function test_cellbroadcast_mes
       messageClass: "normal",
       timestamp: timestamp,
       cdmaServiceCategory: 512,
       etws: null
   });
 
   run_next_test();
 });
-
-/**
- * Verify RILSystemMessenger.notifyUssdReceived()
- */
-add_test(function test_mobileconnection_notify_ussd_received() {
-  let messenger = newRILSystemMessenger();
-
-  messenger.notifyUssdReceived(0, "USSD Message", false);
-
-  equal_received_system_message("ussd-received", {
-    serviceId: 0,
-    message: "USSD Message",
-    sessionEnded: false
-  });
-
-  messenger.notifyUssdReceived(1, "USSD Message", true);
-
-  equal_received_system_message("ussd-received", {
-    serviceId: 1,
-    message: "USSD Message",
-    sessionEnded: true
-  });
-
-  run_next_test();
-});
-
-/**
- * Verify RILSystemMessenger.notifyCdmaInfoRecXXX()
- */
-add_test(function test_mobileconnection_notify_cdma_info() {
-  let messenger = newRILSystemMessenger();
-
-  messenger.notifyCdmaInfoRecDisplay(0, "CDMA Display Info");
-
-  equal_received_system_message("cdma-info-rec-received", {
-    clientId: 0,
-    display: "CDMA Display Info"
-  });
-
-  messenger.notifyCdmaInfoRecCalledPartyNumber(1, 1, 2, "+0987654321", 3, 4);
-
-  equal_received_system_message("cdma-info-rec-received", {
-    clientId: 1,
-    calledNumber: {
-      type: 1,
-      plan: 2,
-      number: "+0987654321",
-      pi: 3,
-      si: 4
-    }
-  });
-
-  messenger.notifyCdmaInfoRecCallingPartyNumber(0, 5, 6, "+1234567890", 7, 8);
-
-  equal_received_system_message("cdma-info-rec-received", {
-    clientId: 0,
-    callingNumber: {
-      type: 5,
-      plan: 6,
-      number: "+1234567890",
-      pi: 7,
-      si: 8
-    }
-  });
-
-  messenger.notifyCdmaInfoRecConnectedPartyNumber(1, 4, 3, "+56473839201", 2, 1);
-
-  equal_received_system_message("cdma-info-rec-received", {
-    clientId: 1,
-    connectedNumber: {
-      type: 4,
-      plan: 3,
-      number: "+56473839201",
-      pi: 2,
-      si: 1
-    }
-  });
-
-  messenger.notifyCdmaInfoRecSignal(0, 1, 2, 3);
-
-  equal_received_system_message("cdma-info-rec-received", {
-    clientId: 0,
-      signal: {
-        type: 1,
-        alertPitch: 2,
-        signal: 3
-      }
-  });
-
-  messenger.notifyCdmaInfoRecRedirectingNumber(1, 8, 7, "+1029384756", 6, 5, 4);
-
-  equal_received_system_message("cdma-info-rec-received", {
-    clientId: 1,
-    redirect: {
-      type: 8,
-      plan: 7,
-      number: "+1029384756",
-      pi: 6,
-      si: 5,
-      reason: 4
-    }
-  });
-
-  messenger.notifyCdmaInfoRecLineControl(0, 1, 0, 1, 255);
-
-  equal_received_system_message("cdma-info-rec-received", {
-    clientId: 0,
-    lineControl: {
-      polarityIncluded: 1,
-      toggle: 0,
-      reverse: 1,
-      powerDenial: 255
-    }
-  });
-
-  messenger.notifyCdmaInfoRecClir(1, 256);
-
-  equal_received_system_message("cdma-info-rec-received", {
-    clientId: 1,
-    clirCause: 256
-  });
-
-  messenger.notifyCdmaInfoRecAudioControl(0, 255, -1);
-
-  equal_received_system_message("cdma-info-rec-received", {
-    clientId: 0,
-    audioControl: {
-      upLink: 255,
-      downLink: -1
-    }
-  });
-
-  run_next_test();
-});
--- a/dom/telephony/gonk/TelephonyService.js
+++ b/dom/telephony/gonk/TelephonyService.js
@@ -1267,16 +1267,24 @@ TelephonyService.prototype = {
   },
 
   notifyUssdReceived: function(aClientId, aMessage, aSessionEnded) {
     if (DEBUG) {
       debug("notifyUssdReceived for " + aClientId + ": " +
             aMessage + " (sessionEnded : " + aSessionEnded + ")");
     }
 
+    let info = {
+      serviceId: aClientId,
+      message: aMessage,
+      sessionEnded: aSessionEnded
+    };
+
+    gSystemMessenger.broadcastMessage("ussd-received", info);
+
     gGonkMobileConnectionService.notifyUssdReceived(aClientId, aMessage,
                                                     aSessionEnded);
   },
 
   dialMMI: function(aClientId, aMmiString, aCallback) {
     let mmi = this._parseMMI(aMmiString, this._hasCalls(aClientId));
     this._dialMMI(aClientId, mmi, aCallback, false);
   },