Bug 915604 - Hide RIL DOM APIs from regular Web pages. r=khuey, a=koi+
authorVicamo Yang <vyang@mozilla.com>
Sun, 27 Oct 2013 17:24:47 -0400
changeset 155953 60c2427efbca008b96e06c83f6082fd95c0a4213
parent 155952 20930d72a35f84ef7feb9408771111eced7d0e8c
child 155954 1a9770998e8488142b8c3d7eecc8391ca43dd20e
push id4514
push userryanvm@gmail.com
push dateSun, 27 Oct 2013 21:26:40 +0000
treeherdermozilla-aurora@df153717f1ff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey, koi
bugs915604
milestone26.0a2
Bug 915604 - Hide RIL DOM APIs from regular Web pages. r=khuey, a=koi+
b2g/app/b2g.js
dom/base/Navigator.cpp
dom/telephony/Telephony.cpp
dom/telephony/Telephony.h
dom/tests/mochitest/general/test_interfaces.html
dom/webidl/MozCellBroadcast.webidl
dom/webidl/MozCellBroadcastEvent.webidl
dom/webidl/MozVoicemail.webidl
dom/webidl/MozVoicemailEvent.webidl
dom/webidl/USSDReceivedEvent.webidl
modules/libpref/src/init/all.js
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -385,19 +385,16 @@ pref("dom.mozBrowserFramesEnabled", true
 // Enable a (virtually) unlimited number of mozbrowser processes.
 // We'll run out of PIDs on UNIX-y systems before we hit this limit.
 pref("dom.ipc.processCount", 100000);
 
 pref("dom.ipc.browser_frames.oop_by_default", false);
 
 // SMS/MMS
 pref("dom.sms.enabled", true);
-pref("dom.sms.strict7BitEncoding", false); // Disabled by default.
-pref("dom.sms.requestStatusReport", true); // Enabled by default.
-pref("dom.mms.requestStatusReport", true); // Enabled by default.
 
 // WebContacts
 pref("dom.mozContacts.enabled", true);
 pref("dom.navigator-property.disable.mozContacts", false);
 pref("dom.global-constructor.disable.mozContact", false);
 
 // Shortnumber matching needed for e.g. Brazil:
 // 01187654321 can be found with 87654321
@@ -426,17 +423,16 @@ pref("services.push.pingInterval", 18000
 // How long before a DOMRequest errors as timeout
 pref("services.push.requestTimeout", 10000);
 // enable udp wakeup support
 pref("services.push.udp.wakeupEnabled", true);
 
 // NetworkStats
 #ifdef MOZ_B2G_RIL
 pref("dom.mozNetworkStats.enabled", true);
-pref("ril.cellbroadcast.disabled", false);
 pref("dom.webapps.firstRunWithSIM", true);
 #endif
 
 // WebSettings
 pref("dom.mozSettings.enabled", true);
 pref("dom.navigator-property.disable.mozSettings", false);
 pref("dom.mozPermissionSettings.enabled", true);
 
@@ -713,20 +709,16 @@ pref("jsloader.reuseGlobal", true);
 pref("font.size.inflation.minTwips", 120);
 // And disable it for lingering master-process UI.
 pref("font.size.inflation.disabledInMasterProcess", true);
 
 // Enable freeing dirty pages when minimizing memory; this reduces memory
 // consumption when applications are sent to the background.
 pref("memory.free_dirty_pages", true);
 
-// UAProfile settings
-pref("wap.UAProf.url", "");
-pref("wap.UAProf.tagname", "x-wap-profile");
-
 pref("layout.imagevisibility.enabled", false);
 pref("layout.imagevisibility.numscrollportwidths", 1);
 pref("layout.imagevisibility.numscrollportheights", 1);
 
 // Enable native identity (persona/browserid)
 pref("dom.identity.enabled", true);
 
 // Wait up to this much milliseconds when orientation changed
@@ -802,8 +794,21 @@ pref("devtools.debugger.unix-domain-sock
 
 // enable Skia/GL (OpenGL-accelerated 2D drawing) for large enough 2d canvases,
 // falling back to Skia/software for smaller canvases
 pref("gfx.canvas.azure.backends", "skia");
 pref("gfx.canvas.azure.accelerated", true);
 
 // Enable Telephony API
 pref("dom.telephony.enabled", true);
+
+// Cell Broadcast API
+pref("dom.cellbroadcast.enabled", true);
+pref("ril.cellbroadcast.disabled", false);
+
+// ICC API
+pref("dom.icc.enabled", true);
+
+// Mobile Connection API
+pref("dom.mobileconnection.enabled", true);
+
+// Voice Mail API
+pref("dom.voicemail.enabled", true);
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1693,53 +1693,78 @@ Navigator::HasCameraSupport(JSContext* /
   return win && nsDOMCameraManager::CheckPermission(win);
 }
 
 #ifdef MOZ_B2G_RIL
 /* static */
 bool
 Navigator::HasTelephonySupport(JSContext* /* unused */, JSObject* aGlobal)
 {
+  // First of all, the general pref has to be turned on.
+  bool enabled = false;
+  Preferences::GetBool("dom.telephony.enabled", &enabled);
+  NS_ENSURE_TRUE(enabled, false);
+
   nsCOMPtr<nsPIDOMWindow> win = GetWindowFromGlobal(aGlobal);
-  return win && Telephony::CheckPermission(win);
+  return win && CheckPermission(win, "telephony");
 }
 
 /* static */
 bool
 Navigator::HasMobileConnectionSupport(JSContext* /* unused */,
                                       JSObject* aGlobal)
 {
+  // First of all, the general pref has to be turned on.
+  bool enabled = false;
+  Preferences::GetBool("dom.mobileconnection.enabled", &enabled);
+  NS_ENSURE_TRUE(enabled, false);
+
   nsCOMPtr<nsPIDOMWindow> win = GetWindowFromGlobal(aGlobal);
   return win && (CheckPermission(win, "mobileconnection") ||
                  CheckPermission(win, "mobilenetwork"));
 }
 
 /* static */
 bool
 Navigator::HasCellBroadcastSupport(JSContext* /* unused */,
                                    JSObject* aGlobal)
 {
+  // First of all, the general pref has to be turned on.
+  bool enabled = false;
+  Preferences::GetBool("dom.cellbroadcast.enabled", &enabled);
+  NS_ENSURE_TRUE(enabled, false);
+
   nsCOMPtr<nsPIDOMWindow> win = GetWindowFromGlobal(aGlobal);
   return win && CheckPermission(win, "cellbroadcast");
 }
 
 /* static */
 bool
 Navigator::HasVoicemailSupport(JSContext* /* unused */,
                                JSObject* aGlobal)
 {
+  // First of all, the general pref has to be turned on.
+  bool enabled = false;
+  Preferences::GetBool("dom.voicemail.enabled", &enabled);
+  NS_ENSURE_TRUE(enabled, false);
+
   nsCOMPtr<nsPIDOMWindow> win = GetWindowFromGlobal(aGlobal);
   return win && CheckPermission(win, "voicemail");
 }
 
 /* static */
 bool
 Navigator::HasIccManagerSupport(JSContext* /* unused */,
                                 JSObject* aGlobal)
 {
+  // First of all, the general pref has to be turned on.
+  bool enabled = false;
+  Preferences::GetBool("dom.icc.enabled", &enabled);
+  NS_ENSURE_TRUE(enabled, false);
+
   nsCOMPtr<nsPIDOMWindow> win = GetWindowFromGlobal(aGlobal);
   return win && CheckPermission(win, "mobileconnection");
 }
 #endif // MOZ_B2G_RIL
 
 #ifdef MOZ_B2G_BT
 /* static */
 bool
--- a/dom/telephony/Telephony.cpp
+++ b/dom/telephony/Telephony.cpp
@@ -714,30 +714,8 @@ Telephony::EnqueueEnumerationAck()
     return;
   }
 
   nsCOMPtr<nsIRunnable> task = new EnumerationAck(this);
   if (NS_FAILED(NS_DispatchToCurrentThread(task))) {
     NS_WARNING("Failed to dispatch to current thread!");
   }
 }
-
-/* static */
-bool
-Telephony::CheckPermission(nsPIDOMWindow* aWindow)
-{
-  MOZ_ASSERT(aWindow && aWindow->IsInnerWindow());
-
-  nsCOMPtr<nsIPermissionManager> permMgr =
-    do_GetService(NS_PERMISSIONMANAGER_CONTRACTID);
-  NS_ENSURE_TRUE(permMgr, false);
-
-  uint32_t permission;
-  nsresult rv =
-    permMgr->TestPermissionFromWindow(aWindow, "telephony", &permission);
-  NS_ENSURE_SUCCESS(rv, false);
-
-  if (permission != nsIPermissionManager::ALLOW_ACTION) {
-    return false;
-  }
-
-  return true;
-}
--- a/dom/telephony/Telephony.h
+++ b/dom/telephony/Telephony.h
@@ -101,18 +101,16 @@ public:
   IMPL_EVENT_HANDLER(incoming)
   IMPL_EVENT_HANDLER(callschanged)
   IMPL_EVENT_HANDLER(remoteheld)
   IMPL_EVENT_HANDLER(remoteresumed)
 
   static already_AddRefed<Telephony>
   Create(nsPIDOMWindow* aOwner, ErrorResult& aRv);
 
-  static bool CheckPermission(nsPIDOMWindow* aOwner);
-
   void
   AddCall(TelephonyCall* aCall)
   {
     NS_ASSERTION(!mCalls.Contains(aCall), "Already know about this one!");
     mCalls.AppendElement(aCall);
     UpdateActiveCall(aCall, true);
     NotifyCallsChanged(aCall);
   }
--- a/dom/tests/mochitest/general/test_interfaces.html
+++ b/dom/tests/mochitest/general/test_interfaces.html
@@ -97,26 +97,26 @@ var interfaceNamesInGlobalScope =
     "BlobEvent",
     {name: "BluetoothAdapter", b2g: true},
     {name: "BluetoothDevice", b2g: true},
     {name: "BluetoothDeviceEvent", b2g: true},
     {name: "BluetoothManager", b2g: true},
     {name: "BluetoothStatusChangedEvent", b2g: true},
     {name: "BoxObject", xbl: true},
     {name: "BrowserFeedWriter", desktop: true},
-    {name: "CallEvent", b2g: true},
+    {name: "CallEvent", b2g: true, pref: "dom.telephony.enabled"},
     "CameraCapabilities",
     "CameraControl",
     "CameraManager",
     "CanvasGradient",
     "CanvasPattern",
     "CanvasRenderingContext2D",
     "CaretPosition",
     "CDATASection",
-    {name: "CFStateChangeEvent", b2g: true},
+    {name: "CFStateChangeEvent", b2g: true, pref: "dom.mobileconnection.enabled"},
     "ChannelMergerNode",
     "ChannelSplitterNode",
     "CharacterData",
     {name: "ChromeWindow", xbl: true},
     "ClientRect",
     "ClientRectList",
     "ClipboardEvent",
     "CloseEvent",
@@ -147,17 +147,17 @@ var interfaceNamesInGlobalScope =
     "CSSStyleRule",
     "CSSStyleSheet",
     "CSSSupportsRule",
     "CSSValue",
     "CSSValueList",
     "CustomEvent",
     "DataChannel",
     "DataContainerEvent",
-    {name: "DataErrorEvent", b2g: true},
+    {name: "DataErrorEvent", b2g: true, pref: "dom.mobileconnection.enabled"},
     "DataTransfer",
     "DelayNode",
     "DesktopNotification",
     "DesktopNotificationCenter",
     "DeviceAcceleration",
     "DeviceLightEvent",
     "DeviceMotionEvent",
     "DeviceOrientationEvent",
@@ -270,17 +270,17 @@ var interfaceNamesInGlobalScope =
     "HTMLTableSectionElement",
     "HTMLTemplateElement",
     "HTMLTextAreaElement",
     "HTMLTimeElement",
     "HTMLTitleElement",
     "HTMLUListElement",
     "HTMLUnknownElement",
     "HTMLVideoElement",
-    {name: "IccCardLockErrorEvent", b2g: true},
+    {name: "IccCardLockErrorEvent", b2g: true, pref: "dom.icc.enabled"},
     "IDBCursor",
     "IDBCursorWithValue",
     "IDBDatabase",
     "IDBFactory",
     "IDBFileHandle",
     "IDBIndex",
     "IDBKeyRange",
     "IDBObjectStore",
@@ -310,47 +310,47 @@ var interfaceNamesInGlobalScope =
     "MessageEvent",
     "MimeType",
     "MimeTypeArray",
     "ModalContentWindow",
     "MouseEvent",
     "MouseScrollEvent",
     {name: "MozActivity", b2g: true},
     "MozApplicationEvent",
-    {name: "MozCellBroadcast", b2g: true},
-    {name: "MozCellBroadcastEvent", b2g: true},
+    {name: "MozCellBroadcast", b2g: true, pref: "dom.cellbroadcast.enabled"},
+    {name: "MozCellBroadcastEvent", b2g: true, pref: "dom.cellbroadcast.enabled"},
     "MozConnection",
     "mozContact",
     "MozContactChangeEvent",
     "MozCSSKeyframeRule",
     "MozCSSKeyframesRule",
-    {name: "MozEmergencyCbModeEvent", b2g: true},
-    {name: "MozIccManager", b2g: true},
+    {name: "MozEmergencyCbModeEvent", b2g: true, pref: "dom.mobileconnection.enabled"},
+    {name: "MozIccManager", b2g: true, pref: "dom.icc.enabled"},
     {name: "MozInputContext", b2g: true},
     {name: "MozInputMethodManager", b2g: true},
     "MozMmsEvent",
     "MozMmsMessage",
-    {name: "MozMobileConnection", b2g: true},
+    {name: "MozMobileConnection", b2g: true, pref: "dom.mobileconnection.enabled"},
     "MozMobileMessageManager",
     "MozMobileMessageThread",
     "MozNamedAttrMap",
-    {name: "MozOtaStatusEvent", b2g: true},
+    {name: "MozOtaStatusEvent", b2g: true, pref: "dom.mobileconnection.enabled"},
     "MozPowerManager",
     "mozRTCIceCandidate",
     "mozRTCPeerConnection",
     "mozRTCSessionDescription",
     "MozSettingsEvent",
     "MozSmsEvent",
     "MozSmsFilter",
     "MozSmsMessage",
     "MozSmsSegmentInfo",
-    {name: "MozStkCommandEvent", b2g: true},
+    {name: "MozStkCommandEvent", b2g: true, pref: "dom.icc.enabled"},
     {name: "MozTimeManager", b2g: true},
-    {name: "MozVoicemail", b2g: true},
-    {name: "MozVoicemailEvent", b2g: true},
+    {name: "MozVoicemail", b2g: true, pref: "dom.voicemail.enabled"},
+    {name: "MozVoicemailEvent", b2g: true, pref: "dom.voicemail.enabled"},
     "MozWakeLock",
     {name: "MozWifiConnectionInfoEvent", b2g: true},
     {name: "MozWifiStatusChangeEvent", b2g: true},
     "MutationEvent",
     "MutationObserver",
     "MutationRecord",
     "Navigator",
     "Node",
@@ -523,19 +523,19 @@ var interfaceNamesInGlobalScope =
     "SVGTransform",
     "SVGTransformList",
     "SVGTSpanElement",
     "SVGUnitTypes",
     "SVGUseElement",
     "SVGViewElement",
     "SVGZoomAndPan",
     "SVGZoomEvent",
-    {name: "Telephony", b2g: true},
-    {name: "TelephonyCall", b2g: true},
-    {name: "TelephonyCallGroup", b2g: true},
+    {name: "Telephony", b2g: true, pref: "dom.telephony.enabled"},
+    {name: "TelephonyCall", b2g: true, pref: "dom.telephony.enabled"},
+    {name: "TelephonyCallGroup", b2g: true, pref: "dom.telephony.enabled"},
     "Text",
     "TextDecoder",
     "TextEncoder",
     "TextMetrics",
     "TimeEvent",
     "TimeRanges",
     "Touch",
     "TouchEvent",
@@ -546,17 +546,17 @@ var interfaceNamesInGlobalScope =
     {name: "TreeContentView", xbl: true},
     {name: "TreeSelection", xbl: true},
     "TreeWalker",
     "UIEvent",
     "UndoManager",
     "URL",
     {name: "UserDataHandler", xbl: true},
     "UserProximityEvent",
-    {name: "USSDReceivedEvent", b2g: true},
+    {name: "USSDReceivedEvent", b2g: true, pref: "dom.mobileconnection.enabled"},
     "ValidityState",
     "VideoStreamTrack",
     "WaveShaperNode",
     "WebGLActiveInfo",
     "WebGLBuffer",
     "WebGLFramebuffer",
     "WebGLProgram",
     "WebGLRenderbuffer",
@@ -592,16 +592,17 @@ var interfaceNamesInGlobalScope =
     {name: "XULLabeledControlElement", xbl: true},
     {name: "XULPopupElement", xbl: true},
     {name: "XULTemplateBuilder", xbl: true},
     {name: "XULTreeBuilder", xbl: true},
   ]
 // IMPORTANT: Do not change this list without review from a DOM peer!
 
 function createInterfaceMap(isXBLScope) {
+  var prefs = SpecialPowers.Services.prefs;
   var version = SpecialPowers.Cc["@mozilla.org/xre/app-info;1"].getService(SpecialPowers.Ci.nsIXULAppInfo).version;
   var isNightly = version.endsWith("a1");
   var isRelease = !version.contains("a");
   var isDesktop = !/Mobile|Tablet/.test(navigator.userAgent);
   var isB2G = !isDesktop && !navigator.userAgent.contains("Android");
   var interfaceMap = {};
   for (var entry of ecmaGlobals) {
     if (typeof(entry) === "string") {
@@ -614,17 +615,18 @@ function createInterfaceMap(isXBLScope) 
     }
   }
   for (var entry of interfaceNamesInGlobalScope) {
     if (typeof(entry) === "string") {
       interfaceMap[entry] = true;
     } else if (entry.xbl === !isXBLScope ||
                entry.desktop === !isDesktop ||
                entry.b2g === !isB2G ||
-               entry.release === !isRelease) {
+               entry.release === !isRelease ||
+               entry.pref && !prefs.getBoolPref(entry.pref)) {
       interfaceMap[entry.name] = false;
     } else {
       interfaceMap[entry.name] = true;
     }
   }
   return interfaceMap;
 }
 
--- a/dom/webidl/MozCellBroadcast.webidl
+++ b/dom/webidl/MozCellBroadcast.webidl
@@ -3,16 +3,17 @@
  * 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/. */
 
 /**
  * Cell Broadcast short message service (CBS) permits a number of
  * unacknowledged general CBS messages to be broadcast to all receivers within
  * a particular region.
  */
+[Pref="dom.cellbroadcast.enabled"]
 interface MozCellBroadcast : EventTarget
 {
   /**
    * Cell Broadcast messages received.
    */
   [SetterThrows]
   attribute EventHandler onreceived;
 };
--- a/dom/webidl/MozCellBroadcastEvent.webidl
+++ b/dom/webidl/MozCellBroadcastEvent.webidl
@@ -1,16 +1,16 @@
 /* -*- 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/.
  */
 interface MozCellBroadcastMessage;
 
-[Constructor(DOMString type, optional MozCellBroadcastEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
+[Constructor(DOMString type, optional MozCellBroadcastEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h", Pref="dom.cellbroadcast.enabled"]
 interface MozCellBroadcastEvent : Event
 {
   readonly attribute MozCellBroadcastMessage? message;
 };
 
 dictionary MozCellBroadcastEventInit : EventInit
 {
   MozCellBroadcastMessage? message = null;
--- a/dom/webidl/MozVoicemail.webidl
+++ b/dom/webidl/MozVoicemail.webidl
@@ -2,16 +2,17 @@
 /* vim: set ts=2 et sw=2 tw=40: */
 /* 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/. */
 
 // nsIDOMMozVoicemailStatus
 interface MozVoicemailStatus;
 
+[Pref="dom.voicemail.enabled"]
 interface MozVoicemail : EventTarget
 {
   /**
    * The current voicemail status, or null when the status is unknown
    */
   [GetterThrows]
   readonly attribute MozVoicemailStatus? status;
 
--- a/dom/webidl/MozVoicemailEvent.webidl
+++ b/dom/webidl/MozVoicemailEvent.webidl
@@ -1,16 +1,16 @@
 /* -*- 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/.
  */
 interface MozVoicemailStatus;
 
-[Constructor(DOMString type, optional MozVoicemailEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
+[Constructor(DOMString type, optional MozVoicemailEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h", Pref="dom.voicemail.enabled"]
 interface MozVoicemailEvent : Event
 {
   readonly attribute MozVoicemailStatus? status;
 };
 
 dictionary MozVoicemailEventInit : EventInit
 {
   MozVoicemailStatus? status = null;
--- a/dom/webidl/USSDReceivedEvent.webidl
+++ b/dom/webidl/USSDReceivedEvent.webidl
@@ -1,15 +1,15 @@
 /* -*- 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/.
  */
 
-[Constructor(DOMString type, optional USSDReceivedEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h"]
+[Constructor(DOMString type, optional USSDReceivedEventInit eventInitDict), HeaderFile="GeneratedEventClasses.h", Pref="dom.icc.enabled"]
 interface USSDReceivedEvent : Event
 {
   readonly attribute DOMString? message;
   readonly attribute boolean sessionEnded;
 };
 
 dictionary USSDReceivedEventInit : EventInit
 {
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -4233,16 +4233,17 @@ pref("dom.vibrator.max_vibrate_list_len"
 pref("dom.battery.enabled", true);
 
 // WebSMS
 pref("dom.sms.enabled", false);
 // Enable Latin characters replacement with corresponding ones in GSM SMS
 // 7-bit default alphabet.
 pref("dom.sms.strict7BitEncoding", false);
 pref("dom.sms.requestStatusReport", true);
+pref("dom.mms.requestStatusReport", true);
 
 // WebContacts
 pref("dom.mozContacts.enabled", false);
 pref("dom.navigator-property.disable.mozContacts", true);
 pref("dom.global-constructor.disable.mozContact", true);
 
 // WebAlarms
 pref("dom.mozAlarms.enabled", false);
@@ -4349,17 +4350,17 @@ pref("jsloader.reuseGlobal", false);
 
 // When we're asked to take a screenshot, don't wait more than 2000ms for the
 // event loop to become idle before actually taking the screenshot.
 pref("dom.browserElement.maxScreenshotDelayMS", 2000);
 
 // Whether we should show the placeholder when the element is focused but empty.
 pref("dom.placeholder.show_on_focus", true);
 
-// UAProfile settings
+// MMS UA Profile settings
 pref("wap.UAProf.url", "");
 pref("wap.UAProf.tagname", "x-wap-profile");
 
 // MMS version 1.1 = 0x11 (or decimal 17)
 // MMS version 1.3 = 0x13 (or decimal 19)
 // @see OMA-TS-MMS_ENC-V1_3-20110913-A clause 7.3.34
 pref("dom.mms.version", 19);
 
@@ -4405,10 +4406,22 @@ pref("dom.forms.inputmode", true);
 #endif
 
 // InputMethods for soft keyboards in B2G
 pref("dom.mozInputMethod.enabled", false);
 
 // Telephony API
 pref("dom.telephony.enabled", false);
 
+// Cell Broadcast API
+pref("dom.cellbroadcast.enabled", false);
+
+// ICC API
+pref("dom.icc.enabled", false);
+
+// Mobile Connection API
+pref("dom.mobileconnection.enabled", false);
+
+// Voice Mail API
+pref("dom.voicemail.enabled", false);
+
 // DOM Inter-App Communication API.
 pref("dom.inter-app-communication-api.enabled", false);