diff --git a/dom/mobilemessage/MobileMessageManager.cpp b/dom/mobilemessage/MobileMessageManager.cpp index 610abd3bd735..7ee1e22ae434 100644 --- a/dom/mobilemessage/MobileMessageManager.cpp +++ b/dom/mobilemessage/MobileMessageManager.cpp @@ -36,7 +36,7 @@ // Service instantiation #include "ipc/SmsIPCService.h" #include "MobileMessageService.h" -#ifdef MOZ_WIDGET_ANDROID +#if defined(MOZ_WIDGET_ANDROID) && defined(MOZ_WEBSMS_BACKEND) #include "android/MobileMessageDatabaseService.h" #include "android/SmsService.h" #elif defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL) @@ -853,7 +853,7 @@ NS_CreateSmsService() if (XRE_IsContentProcess()) { smsService = SmsIPCService::GetSingleton(); } else { -#ifdef MOZ_WIDGET_ANDROID +#if defined(MOZ_WIDGET_ANDROID) && defined(MOZ_WEBSMS_BACKEND) smsService = new SmsService(); #elif defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL) smsService = do_GetService(GONK_SMSSERVICE_CONTRACTID); @@ -870,7 +870,7 @@ NS_CreateMobileMessageDatabaseService() if (XRE_IsContentProcess()) { mobileMessageDBService = SmsIPCService::GetSingleton(); } else { -#ifdef MOZ_WIDGET_ANDROID +#if defined(MOZ_WIDGET_ANDROID) && defined(MOZ_WEBSMS_BACKEND) mobileMessageDBService = new MobileMessageDatabaseService(); #elif defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL) mobileMessageDBService = diff --git a/dom/mobilemessage/moz.build b/dom/mobilemessage/moz.build index 227270c681d6..c15ebf5518ff 100644 --- a/dom/mobilemessage/moz.build +++ b/dom/mobilemessage/moz.build @@ -16,7 +16,7 @@ EXPORTS.mozilla.dom.mobilemessage += [ 'Types.h', # Required by IPDL SmsTypes.h ] -if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android' and CONFIG['MOZ_WEBSMS_BACKEND']: SOURCES += [ 'android/MobileMessageDatabaseService.cpp', 'android/SmsManager.cpp',