Bug 952371 - Part 2: dom changes - [DSDS] mozMobileconnection.lastKnownNetwork and .lastKnownHomeNetwork aren't working. r=smaug, a=1.3+
authorJessica Jong <jjong@mozilla.com>
Wed, 08 Jan 2014 18:54:33 +0800
changeset 175619 f58b2c2c9f272ee92928c6a1adafe101de349cc7
parent 175618 031315f1fe0ba46a44769d21b24df7167e3876a2
child 175620 1aab8c2a2114fff1ef1bbbcaed0a3fa8404814c3
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, 1
bugs952371
milestone28.0a2
Bug 952371 - Part 2: dom changes - [DSDS] mozMobileconnection.lastKnownNetwork and .lastKnownHomeNetwork aren't working. r=smaug, a=1.3+
dom/network/src/MobileConnection.cpp
--- a/dom/network/src/MobileConnection.cpp
+++ b/dom/network/src/MobileConnection.cpp
@@ -128,31 +128,29 @@ NS_IMETHODIMP
 MobileConnection::GetLastKnownNetwork(nsAString& aNetwork)
 {
   aNetwork.SetIsVoid(true);
 
   if (!CheckPermission("mobilenetwork")) {
     return NS_OK;
   }
 
-  aNetwork = mozilla::Preferences::GetString("ril.lastKnownNetwork");
-  return NS_OK;
+  return mProvider->GetLastKnownNetwork(mClientId, aNetwork);
 }
 
 NS_IMETHODIMP
 MobileConnection::GetLastKnownHomeNetwork(nsAString& aNetwork)
 {
   aNetwork.SetIsVoid(true);
 
   if (!CheckPermission("mobilenetwork")) {
     return NS_OK;
   }
 
-  aNetwork = mozilla::Preferences::GetString("ril.lastKnownHomeNetwork");
-  return NS_OK;
+  return mProvider->GetLastKnownHomeNetwork(mClientId, aNetwork);
 }
 
 // All fields below require the "mobileconnection" permission.
 
 bool
 MobileConnection::CheckPermission(const char* aType)
 {
   nsCOMPtr<nsPIDOMWindow> window = do_QueryReferent(mWindow);