Backed out changeset 6384318223b4 (bug 1588218) for Linting failure on mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java. CLOSED TREE
authorDorel Luca <dluca@mozilla.com>
Mon, 11 Nov 2019 23:16:27 +0200
changeset 501521 46cd6386dfdac604ecfa1fbbe560fd88dd23e4f7
parent 501520 6384318223b46b1513240125d11aa6bf99eb0c00
child 501522 ff2e9fe32e4e3983ca13c52e436af438e8d7a857
push id114170
push usermalexandru@mozilla.com
push dateTue, 12 Nov 2019 21:58:32 +0000
treeherdermozilla-inbound@9e3f44e87a1a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1588218
milestone72.0a1
backs out6384318223b46b1513240125d11aa6bf99eb0c00
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
Backed out changeset 6384318223b4 (bug 1588218) for Linting failure on mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java. CLOSED TREE
mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
netwerk/system/android/nsAndroidNetworkLinkService.cpp
--- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java
@@ -61,18 +61,16 @@ import android.hardware.SensorEvent;
 import android.hardware.SensorEventListener;
 import android.hardware.SensorManager;
 import android.location.Criteria;
 import android.location.Location;
 import android.location.LocationListener;
 import android.location.LocationManager;
 import android.media.AudioManager;
 import android.net.ConnectivityManager;
-import android.net.LinkProperties;
-import android.net.Network;
 import android.net.NetworkInfo;
 import android.os.Build;
 import android.os.Bundle;
 import android.os.LocaleList;
 import android.os.Looper;
 import android.os.PowerManager;
 import android.os.Vibrator;
 import android.provider.Settings;
@@ -1229,37 +1227,16 @@ public class GeckoAppShell {
             case TelephonyManager.NETWORK_TYPE_UNKNOWN:
             default:
                 Log.w(LOGTAG, "Connected to an unknown mobile network!");
                 return LINK_TYPE_UNKNOWN;
         }
     }
 
     @WrapForJNI(calledFrom = "gecko")
-    private static String getDNSDomains() {
-        if (Build.VERSION.SDK_INT < 21) {
-            return "";
-        }
-
-        ConnectivityManager cm = (ConnectivityManager)
-            getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
-        Network net = cm.getActiveNetwork();
-        if (net == null) {
-            return "";
-        }
-
-        LinkProperties lp = cm.getLinkProperties(net);
-        if (lp == null) {
-            return "";
-        }
-
-        return lp.getDomains();
-    }
-
-    @WrapForJNI(calledFrom = "gecko")
     private static int[] getSystemColors() {
         // attrsAppearance[] must correspond to AndroidSystemColors structure in android/AndroidBridge.h
         final int[] attrsAppearance = {
             android.R.attr.textColor,
             android.R.attr.textColorPrimary,
             android.R.attr.textColorPrimaryInverse,
             android.R.attr.textColorSecondary,
             android.R.attr.textColorSecondaryInverse,
--- a/netwerk/system/android/nsAndroidNetworkLinkService.cpp
+++ b/netwerk/system/android/nsAndroidNetworkLinkService.cpp
@@ -129,32 +129,17 @@ nsAndroidNetworkLinkService::GetNetworkI
 
   mNetlinkSvc->GetNetworkID(aNetworkID);
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsAndroidNetworkLinkService::GetDnsSuffixList(
     nsTArray<nsCString>& aDnsSuffixList) {
-  aDnsSuffixList.Clear();
-  if (!mozilla::AndroidBridge::Bridge()) {
-    NS_WARNING("GetDnsSuffixList is not supported without a bridge connection");
-    return NS_ERROR_NOT_AVAILABLE;
-  }
-
-  auto suffixList = java::GeckoAppShell::GetDNSDomains();
-  if (!suffixList) {
-    return NS_OK;
-  }
-
-  nsAutoCString list(suffixList->ToCString());
-  for (const nsACString& suffix : list.Split(',')) {
-    aDnsSuffixList.AppendElement(suffix);
-  }
-  return NS_OK;
+  return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 void nsAndroidNetworkLinkService::OnNetworkChanged() {
   if (mozilla::StaticPrefs::network_notify_changed()) {
     if (!mNetworkChangeTime.IsNull()) {
       mozilla::Telemetry::AccumulateTimeDelta(
           mozilla::Telemetry::NETWORK_TIME_BETWEEN_NETWORK_CHANGE_EVENTS,
           mNetworkChangeTime);