Loading b2g/app/b2g.js +0 −3 Original line number Diff line number Diff line Loading @@ -821,9 +821,6 @@ pref("gfx.canvas.skiagl.dynamic-cache", true); // enable fence with readpixels for SurfaceStream pref("gfx.gralloc.fence-with-readpixels", true); // Enable Telephony API pref("dom.telephony.enabled", true); // Cell Broadcast API pref("dom.cellbroadcast.enabled", true); pref("ril.cellbroadcast.disabled", false); Loading b2g/installer/package-manifest.in +2 −2 Original line number Diff line number Diff line Loading @@ -405,6 +405,8 @@ @BINPATH@/components/MmsService.manifest @BINPATH@/components/MobileMessageDatabaseService.js @BINPATH@/components/MobileMessageDatabaseService.manifest @BINPATH@/components/TelephonyProvider.js @BINPATH@/components/TelephonyProvider.manifest #endif // MOZ_WIDGET_GONK && MOZ_B2G_RIL #ifndef MOZ_WIDGET_GONK Loading Loading @@ -486,8 +488,6 @@ @BINPATH@/components/NetworkStatsManager.manifest @BINPATH@/components/NetworkInterfaceListService.manifest @BINPATH@/components/NetworkInterfaceListService.js @BINPATH@/components/TelephonyProvider.manifest @BINPATH@/components/TelephonyProvider.js @BINPATH@/components/NetworkStatsServiceProxy.manifest @BINPATH@/components/NetworkStatsServiceProxy.js #endif Loading dom/base/Navigator.cpp +27 −27 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ #include "nsIDOMWakeLock.h" #include "nsIPowerManagerService.h" #include "mozilla/dom/MobileMessageManager.h" #include "mozilla/dom/Telephony.h" #include "mozilla/Hal.h" #include "nsISiteSpecificUserAgent.h" #include "mozilla/ClearOnShutdown.h" Loading @@ -40,7 +41,6 @@ #include "mozilla/dom/IccManager.h" #include "MobileConnection.h" #include "mozilla/dom/CellBroadcast.h" #include "mozilla/dom/Telephony.h" #include "mozilla/dom/Voicemail.h" #endif #include "nsIIdleObserver.h" Loading Loading @@ -138,12 +138,12 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Navigator) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mBatteryManager) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPowerManager) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMobileMessageManager) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTelephony) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mConnection) #ifdef MOZ_B2G_RIL NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMobileConnection) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCellBroadcast) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mIccManager) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTelephony) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mVoicemail) #endif #ifdef MOZ_B2G_BT Loading Loading @@ -209,6 +209,10 @@ Navigator::Invalidate() mMobileMessageManager = nullptr; } if (mTelephony) { mTelephony = nullptr; } if (mConnection) { mConnection->Shutdown(); mConnection = nullptr; Loading @@ -229,10 +233,6 @@ Navigator::Invalidate() mIccManager = nullptr; } if (mTelephony) { mTelephony = nullptr; } if (mVoicemail) { mVoicemail = nullptr; } Loading Loading @@ -1165,34 +1165,34 @@ Navigator::GetMozMobileMessage() return mMobileMessageManager; } #ifdef MOZ_B2G_RIL CellBroadcast* Navigator::GetMozCellBroadcast(ErrorResult& aRv) Telephony* Navigator::GetMozTelephony(ErrorResult& aRv) { if (!mCellBroadcast) { if (!mTelephony) { if (!mWindow) { aRv.Throw(NS_ERROR_UNEXPECTED); return nullptr; } mCellBroadcast = CellBroadcast::Create(mWindow, aRv); mTelephony = Telephony::Create(mWindow, aRv); } return mCellBroadcast; return mTelephony; } Telephony* Navigator::GetMozTelephony(ErrorResult& aRv) #ifdef MOZ_B2G_RIL CellBroadcast* Navigator::GetMozCellBroadcast(ErrorResult& aRv) { if (!mTelephony) { if (!mCellBroadcast) { if (!mWindow) { aRv.Throw(NS_ERROR_UNEXPECTED); return nullptr; } mTelephony = Telephony::Create(mWindow, aRv); mCellBroadcast = CellBroadcast::Create(mWindow, aRv); } return mTelephony; return mCellBroadcast; } Voicemail* Loading Loading @@ -1697,15 +1697,6 @@ Navigator::HasMobileMessageSupport(JSContext* /* unused */, JSObject* aGlobal) return true; } /* static */ bool Navigator::HasCameraSupport(JSContext* /* unused */, JSObject* aGlobal) { nsCOMPtr<nsPIDOMWindow> win = GetWindowFromGlobal(aGlobal); return win && nsDOMCameraManager::CheckPermission(win); } #ifdef MOZ_B2G_RIL /* static */ bool Navigator::HasTelephonySupport(JSContext* /* unused */, JSObject* aGlobal) Loading @@ -1719,6 +1710,15 @@ Navigator::HasTelephonySupport(JSContext* /* unused */, JSObject* aGlobal) return win && CheckPermission(win, "telephony"); } /* static */ bool Navigator::HasCameraSupport(JSContext* /* unused */, JSObject* aGlobal) { nsCOMPtr<nsPIDOMWindow> win = GetWindowFromGlobal(aGlobal); return win && nsDOMCameraManager::CheckPermission(win); } #ifdef MOZ_B2G_RIL /* static */ bool Navigator::HasMobileConnectionSupport(JSContext* /* unused */, Loading dom/base/Navigator.h +5 −5 Original line number Diff line number Diff line Loading @@ -86,11 +86,11 @@ class BluetoothManager; #ifdef MOZ_B2G_RIL class CellBroadcast; class IccManager; class Telephony; class Voicemail; #endif class PowerManager; class Telephony; namespace time { class TimeManager; Loading Loading @@ -211,6 +211,7 @@ public: bool MozIsLocallyAvailable(const nsAString& aURI, bool aWhenOffline, ErrorResult& aRv); nsIDOMMozMobileMessageManager* GetMozMobileMessage(); Telephony* GetMozTelephony(ErrorResult& aRv); nsIDOMMozConnection* GetMozConnection(); nsDOMCameraManager* GetMozCameras(ErrorResult& aRv); void MozSetMessageHandler(const nsAString& aType, Loading @@ -218,7 +219,6 @@ public: ErrorResult& aRv); bool MozHasPendingMessage(const nsAString& aType, ErrorResult& aRv); #ifdef MOZ_B2G_RIL Telephony* GetMozTelephony(ErrorResult& aRv); nsIDOMMozMobileConnection* GetMozMobileConnection(ErrorResult& aRv); CellBroadcast* GetMozCellBroadcast(ErrorResult& aRv); Voicemail* GetMozVoicemail(ErrorResult& aRv); Loading Loading @@ -268,11 +268,11 @@ public: } static bool HasMobileMessageSupport(JSContext* /* unused */, JSObject* aGlobal); static bool HasTelephonySupport(JSContext* /* unused */, JSObject* aGlobal); static bool HasCameraSupport(JSContext* /* unused */, JSObject* aGlobal); #ifdef MOZ_B2G_RIL static bool HasTelephonySupport(JSContext* /* unused */, JSObject* aGlobal); static bool HasMobileConnectionSupport(JSContext* /* unused */, JSObject* aGlobal); static bool HasCellBroadcastSupport(JSContext* /* unused */, Loading Loading @@ -326,12 +326,12 @@ private: #endif nsRefPtr<PowerManager> mPowerManager; nsRefPtr<MobileMessageManager> mMobileMessageManager; nsRefPtr<Telephony> mTelephony; nsRefPtr<network::Connection> mConnection; #ifdef MOZ_B2G_RIL nsRefPtr<network::MobileConnection> mMobileConnection; nsRefPtr<CellBroadcast> mCellBroadcast; nsRefPtr<IccManager> mIccManager; nsRefPtr<Telephony> mTelephony; nsRefPtr<Voicemail> mVoicemail; #endif #ifdef MOZ_B2G_BT Loading dom/telephony/TelephonyFactory.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/dom/telephony/TelephonyFactory.h" #ifdef MOZ_WIDGET_GONK #if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL) #include "nsIGonkTelephonyProvider.h" #endif #include "nsServiceManagerUtils.h" Loading @@ -20,7 +20,7 @@ TelephonyFactory::CreateTelephonyProvider() if (XRE_GetProcessType() == GeckoProcessType_Content) { provider = new TelephonyIPCProvider(); #ifdef MOZ_WIDGET_GONK #if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL) } else { provider = do_CreateInstance(GONK_TELEPHONY_PROVIDER_CONTRACTID); #endif Loading Loading
b2g/app/b2g.js +0 −3 Original line number Diff line number Diff line Loading @@ -821,9 +821,6 @@ pref("gfx.canvas.skiagl.dynamic-cache", true); // enable fence with readpixels for SurfaceStream pref("gfx.gralloc.fence-with-readpixels", true); // Enable Telephony API pref("dom.telephony.enabled", true); // Cell Broadcast API pref("dom.cellbroadcast.enabled", true); pref("ril.cellbroadcast.disabled", false); Loading
b2g/installer/package-manifest.in +2 −2 Original line number Diff line number Diff line Loading @@ -405,6 +405,8 @@ @BINPATH@/components/MmsService.manifest @BINPATH@/components/MobileMessageDatabaseService.js @BINPATH@/components/MobileMessageDatabaseService.manifest @BINPATH@/components/TelephonyProvider.js @BINPATH@/components/TelephonyProvider.manifest #endif // MOZ_WIDGET_GONK && MOZ_B2G_RIL #ifndef MOZ_WIDGET_GONK Loading Loading @@ -486,8 +488,6 @@ @BINPATH@/components/NetworkStatsManager.manifest @BINPATH@/components/NetworkInterfaceListService.manifest @BINPATH@/components/NetworkInterfaceListService.js @BINPATH@/components/TelephonyProvider.manifest @BINPATH@/components/TelephonyProvider.js @BINPATH@/components/NetworkStatsServiceProxy.manifest @BINPATH@/components/NetworkStatsServiceProxy.js #endif Loading
dom/base/Navigator.cpp +27 −27 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ #include "nsIDOMWakeLock.h" #include "nsIPowerManagerService.h" #include "mozilla/dom/MobileMessageManager.h" #include "mozilla/dom/Telephony.h" #include "mozilla/Hal.h" #include "nsISiteSpecificUserAgent.h" #include "mozilla/ClearOnShutdown.h" Loading @@ -40,7 +41,6 @@ #include "mozilla/dom/IccManager.h" #include "MobileConnection.h" #include "mozilla/dom/CellBroadcast.h" #include "mozilla/dom/Telephony.h" #include "mozilla/dom/Voicemail.h" #endif #include "nsIIdleObserver.h" Loading Loading @@ -138,12 +138,12 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Navigator) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mBatteryManager) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPowerManager) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMobileMessageManager) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTelephony) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mConnection) #ifdef MOZ_B2G_RIL NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMobileConnection) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCellBroadcast) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mIccManager) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTelephony) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mVoicemail) #endif #ifdef MOZ_B2G_BT Loading Loading @@ -209,6 +209,10 @@ Navigator::Invalidate() mMobileMessageManager = nullptr; } if (mTelephony) { mTelephony = nullptr; } if (mConnection) { mConnection->Shutdown(); mConnection = nullptr; Loading @@ -229,10 +233,6 @@ Navigator::Invalidate() mIccManager = nullptr; } if (mTelephony) { mTelephony = nullptr; } if (mVoicemail) { mVoicemail = nullptr; } Loading Loading @@ -1165,34 +1165,34 @@ Navigator::GetMozMobileMessage() return mMobileMessageManager; } #ifdef MOZ_B2G_RIL CellBroadcast* Navigator::GetMozCellBroadcast(ErrorResult& aRv) Telephony* Navigator::GetMozTelephony(ErrorResult& aRv) { if (!mCellBroadcast) { if (!mTelephony) { if (!mWindow) { aRv.Throw(NS_ERROR_UNEXPECTED); return nullptr; } mCellBroadcast = CellBroadcast::Create(mWindow, aRv); mTelephony = Telephony::Create(mWindow, aRv); } return mCellBroadcast; return mTelephony; } Telephony* Navigator::GetMozTelephony(ErrorResult& aRv) #ifdef MOZ_B2G_RIL CellBroadcast* Navigator::GetMozCellBroadcast(ErrorResult& aRv) { if (!mTelephony) { if (!mCellBroadcast) { if (!mWindow) { aRv.Throw(NS_ERROR_UNEXPECTED); return nullptr; } mTelephony = Telephony::Create(mWindow, aRv); mCellBroadcast = CellBroadcast::Create(mWindow, aRv); } return mTelephony; return mCellBroadcast; } Voicemail* Loading Loading @@ -1697,15 +1697,6 @@ Navigator::HasMobileMessageSupport(JSContext* /* unused */, JSObject* aGlobal) return true; } /* static */ bool Navigator::HasCameraSupport(JSContext* /* unused */, JSObject* aGlobal) { nsCOMPtr<nsPIDOMWindow> win = GetWindowFromGlobal(aGlobal); return win && nsDOMCameraManager::CheckPermission(win); } #ifdef MOZ_B2G_RIL /* static */ bool Navigator::HasTelephonySupport(JSContext* /* unused */, JSObject* aGlobal) Loading @@ -1719,6 +1710,15 @@ Navigator::HasTelephonySupport(JSContext* /* unused */, JSObject* aGlobal) return win && CheckPermission(win, "telephony"); } /* static */ bool Navigator::HasCameraSupport(JSContext* /* unused */, JSObject* aGlobal) { nsCOMPtr<nsPIDOMWindow> win = GetWindowFromGlobal(aGlobal); return win && nsDOMCameraManager::CheckPermission(win); } #ifdef MOZ_B2G_RIL /* static */ bool Navigator::HasMobileConnectionSupport(JSContext* /* unused */, Loading
dom/base/Navigator.h +5 −5 Original line number Diff line number Diff line Loading @@ -86,11 +86,11 @@ class BluetoothManager; #ifdef MOZ_B2G_RIL class CellBroadcast; class IccManager; class Telephony; class Voicemail; #endif class PowerManager; class Telephony; namespace time { class TimeManager; Loading Loading @@ -211,6 +211,7 @@ public: bool MozIsLocallyAvailable(const nsAString& aURI, bool aWhenOffline, ErrorResult& aRv); nsIDOMMozMobileMessageManager* GetMozMobileMessage(); Telephony* GetMozTelephony(ErrorResult& aRv); nsIDOMMozConnection* GetMozConnection(); nsDOMCameraManager* GetMozCameras(ErrorResult& aRv); void MozSetMessageHandler(const nsAString& aType, Loading @@ -218,7 +219,6 @@ public: ErrorResult& aRv); bool MozHasPendingMessage(const nsAString& aType, ErrorResult& aRv); #ifdef MOZ_B2G_RIL Telephony* GetMozTelephony(ErrorResult& aRv); nsIDOMMozMobileConnection* GetMozMobileConnection(ErrorResult& aRv); CellBroadcast* GetMozCellBroadcast(ErrorResult& aRv); Voicemail* GetMozVoicemail(ErrorResult& aRv); Loading Loading @@ -268,11 +268,11 @@ public: } static bool HasMobileMessageSupport(JSContext* /* unused */, JSObject* aGlobal); static bool HasTelephonySupport(JSContext* /* unused */, JSObject* aGlobal); static bool HasCameraSupport(JSContext* /* unused */, JSObject* aGlobal); #ifdef MOZ_B2G_RIL static bool HasTelephonySupport(JSContext* /* unused */, JSObject* aGlobal); static bool HasMobileConnectionSupport(JSContext* /* unused */, JSObject* aGlobal); static bool HasCellBroadcastSupport(JSContext* /* unused */, Loading Loading @@ -326,12 +326,12 @@ private: #endif nsRefPtr<PowerManager> mPowerManager; nsRefPtr<MobileMessageManager> mMobileMessageManager; nsRefPtr<Telephony> mTelephony; nsRefPtr<network::Connection> mConnection; #ifdef MOZ_B2G_RIL nsRefPtr<network::MobileConnection> mMobileConnection; nsRefPtr<CellBroadcast> mCellBroadcast; nsRefPtr<IccManager> mIccManager; nsRefPtr<Telephony> mTelephony; nsRefPtr<Voicemail> mVoicemail; #endif #ifdef MOZ_B2G_BT Loading
dom/telephony/TelephonyFactory.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/dom/telephony/TelephonyFactory.h" #ifdef MOZ_WIDGET_GONK #if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL) #include "nsIGonkTelephonyProvider.h" #endif #include "nsServiceManagerUtils.h" Loading @@ -20,7 +20,7 @@ TelephonyFactory::CreateTelephonyProvider() if (XRE_GetProcessType() == GeckoProcessType_Content) { provider = new TelephonyIPCProvider(); #ifdef MOZ_WIDGET_GONK #if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL) } else { provider = do_CreateInstance(GONK_TELEPHONY_PROVIDER_CONTRACTID); #endif Loading