Bug 771458 - 0005. Support API change on other platform. r=vicamo
authorChuck Lee <chulee@mozilla.com>
Fri, 10 May 2013 10:24:12 +0800
changeset 142445 8581d14c264ce3680f51b22f144c251bbad871e3
parent 142444 90002330772e2ac62f4c470a57ac1c3f32d943b8
child 142446 7c517de515f6aad806978315829192b55644d950
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvicamo
bugs771458
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 771458 - 0005. Support API change on other platform. r=vicamo
dom/mobilemessage/src/android/MobileMessageDatabaseService.cpp
dom/mobilemessage/src/fallback/MobileMessageDatabaseService.cpp
--- a/dom/mobilemessage/src/android/MobileMessageDatabaseService.cpp
+++ b/dom/mobilemessage/src/android/MobileMessageDatabaseService.cpp
@@ -21,24 +21,33 @@ MobileMessageDatabaseService::GetMessage
     return NS_OK;
   }
 
   AndroidBridge::Bridge()->GetMessage(aMessageId, aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
-MobileMessageDatabaseService::DeleteMessage(int32_t aMessageId,
+MobileMessageDatabaseService::DeleteMessage(int32_t *aMessageIds,
+                                            uint32_t aLength,
                                             nsIMobileMessageCallback* aRequest)
 {
   if (!AndroidBridge::Bridge()) {
     return NS_OK;
   }
 
-  AndroidBridge::Bridge()->DeleteMessage(aMessageId, aRequest);
+  if (!aMessageIds) {
+    return NS_OK;
+  }
+
+  if (aLength != 1) {
+    return NS_ERROR_FAILURE;
+  }
+
+  AndroidBridge::Bridge()->DeleteMessage(aMessageIds[0], aRequest);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MobileMessageDatabaseService::CreateMessageCursor(nsIDOMMozSmsFilter* aFilter,
                                                   bool aReverse,
                                                   nsIMobileMessageCursorCallback* aCallback,
                                                   nsICursorContinueCallback** aResult)
--- a/dom/mobilemessage/src/fallback/MobileMessageDatabaseService.cpp
+++ b/dom/mobilemessage/src/fallback/MobileMessageDatabaseService.cpp
@@ -15,17 +15,18 @@ NS_IMETHODIMP
 MobileMessageDatabaseService::GetMessageMoz(int32_t aMessageId,
                                             nsIMobileMessageCallback* aRequest)
 {
   NS_ERROR("We should not be here!");
   return NS_OK;
 }
 
 NS_IMETHODIMP
-MobileMessageDatabaseService::DeleteMessage(int32_t aMessageId,
+MobileMessageDatabaseService::DeleteMessage(int32_t *aMessageIds,
+                                            uint32_t aLength,
                                             nsIMobileMessageCallback* aRequest)
 {
   NS_ERROR("We should not be here!");
   return NS_OK;
 }
 
 NS_IMETHODIMP
 MobileMessageDatabaseService::CreateMessageCursor(nsIDOMMozSmsFilter* aFilter,