Bug 832925 - Use DeactivateDataCallByType to close SUPL connection. r=dougt, a=tef+
authorPatrick Wang <kk1fff@patrickz.net>
Mon, 21 Jan 2013 19:30:54 +0800
changeset 118290 291138b021aacc000b8c311b963716752feeff25
parent 118289 c3dd2edbf5014e7f0883ab838e2be92fe37e4bbc
child 118291 2e4b271c2ef1bb3b426d3b95bd2e74c78fd1e3fc
push id331
push userryanvm@gmail.com
push dateThu, 24 Jan 2013 00:20:48 +0000
reviewersdougt, tef
bugs832925
milestone18.0
Bug 832925 - Use DeactivateDataCallByType to close SUPL connection. r=dougt, a=tef+
dom/system/gonk/GonkGPSGeolocationProvider.cpp
dom/system/gonk/GonkGPSGeolocationProvider.h
--- a/dom/system/gonk/GonkGPSGeolocationProvider.cpp
+++ b/dom/system/gonk/GonkGPSGeolocationProvider.cpp
@@ -385,21 +385,17 @@ void
 GonkGPSGeolocationProvider::ReleaseDataConnection()
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (!mRIL) {
     return;
   }
 
-  if (mCid.IsEmpty()) {
-    // We didn't request data call or the data call failed, bail out.
-    return;
-  }
-  mRIL->DeactivateDataCall(mCid, NS_LITERAL_STRING("Close SUPL session"));
+  mRIL->DeactivateDataCallByType(NS_LITERAL_STRING("supl"));
 }
 
 void
 GonkGPSGeolocationProvider::RequestSetID(uint32_t flags)
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (!mRIL) {
--- a/dom/system/gonk/GonkGPSGeolocationProvider.h
+++ b/dom/system/gonk/GonkGPSGeolocationProvider.h
@@ -94,12 +94,11 @@ private:
   bool mSupportsTimeInjection;
 
   const GpsInterface* mGpsInterface;
   const AGpsInterface* mAGpsInterface;
   const AGpsRilInterface* mAGpsRilInterface;
   nsCOMPtr<nsIGeolocationUpdate> mLocationCallback;
   nsCOMPtr<nsIThread> mInitThread;
   nsCOMPtr<nsIRadioInterfaceLayer> mRIL;
-  nsAutoString mCid;
 };
 
 #endif /* GonkGPSGeolocationProvider_h */