Backed out changeset 6384318223b4 (bug 1588218) for Linting failure on mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java. CLOSED TREE

This commit is contained in:
Dorel Luca 2019-11-11 23:16:27 +02:00
parent f4d8a78639
commit 9afadd1cdd
2 changed files with 1 additions and 39 deletions

View File

@ -66,8 +66,6 @@ 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;
@ -1233,27 +1231,6 @@ public class GeckoAppShell {
}
}
@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

View File

@ -134,22 +134,7 @@ nsAndroidNetworkLinkService::GetNetworkID(nsACString& aNetworkID) {
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() {