Bug 820292 - [MMI/USSD] System message on incoming USSD; r=philikon
authorFernando Jiménez <ferjmoreno@gmail.com>
Sun, 16 Dec 2012 13:25:02 +0100
changeset 121763 a80379c23cffa90223bc6f2305479a4bba936310
parent 121762 5dd106eee315a6ace40ddaa930d740d42344d686
child 121764 5ef3d98bc229120f1bb126e32817a62daf52639d
push idunknown
push userunknown
push dateunknown
reviewersphilikon
bugs820292
milestone20.0a1
Bug 820292 - [MMI/USSD] System message on incoming USSD; r=philikon
dom/messages/SystemMessagePermissionsChecker.jsm
dom/system/gonk/RadioInterfaceLayer.js
--- a/dom/messages/SystemMessagePermissionsChecker.jsm
+++ b/dom/messages/SystemMessagePermissionsChecker.jsm
@@ -73,16 +73,19 @@ this.SystemMessagePermissionsTable = {
   "notification": {
     "desktop-notification": []
   },
   "sms-received": {
     "sms": []
   },
   "telephony-new-call": {
     "telephony": []
+  },
+  "ussd-received": {
+    "mobileconnection": []
   }
 };
 
 this.SystemMessagePermissionsChecker = {
   /**
    * Return all the needed permission names for the given system message.
    * @param string aSysMsgName
    *        The system messsage name.
--- a/dom/system/gonk/RadioInterfaceLayer.js
+++ b/dom/system/gonk/RadioInterfaceLayer.js
@@ -1600,16 +1600,17 @@ RadioInterfaceLayer.prototype = {
   },
 
   handleICCCardLockResult: function handleICCCardLockResult(message) {
     this._sendRequestResults("RIL:CardLockResult", message);
   },
 
   handleUSSDReceived: function handleUSSDReceived(ussd) {
     debug("handleUSSDReceived " + JSON.stringify(ussd));
+    gSystemMessenger.broadcastMessage("ussd-received", ussd);
     this._sendTargetMessage("mobileconnection", "RIL:USSDReceived", ussd);
   },
 
   handleSendMMI: function handleSendMMI(message) {
     debug("handleSendMMI " + JSON.stringify(message));
     let messageType = message.success ? "RIL:SendMMI:Return:OK" :
                                         "RIL:SendMMI:Return:KO";
     this._sendRequestResults(messageType, message);