Bug 1510648 - Suppress MissingPermission warnings. r=geckoview-reviewers,snorp

This is because these persmissions are the responsibility of the embedding app to request,not GeckoView's.

Differential Revision: https://phabricator.services.mozilla.com/D14722

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emily Toop 2018-12-19 15:49:42 +00:00
Родитель c3770087c3
Коммит 110522d32d
2 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -1108,6 +1108,7 @@ public class GeckoAppShell
}
}
@SuppressLint("MissingPermission")
@WrapForJNI(calledFrom = "gecko")
private static void vibrate(long milliseconds) {
sVibrationEndTime = System.nanoTime() + milliseconds * 1000000;
@ -1119,6 +1120,7 @@ public class GeckoAppShell
}
}
@SuppressLint("MissingPermission")
@WrapForJNI(calledFrom = "gecko")
private static void vibrate(long[] pattern, int repeat) {
// If pattern.length is odd, the last element in the pattern is a
@ -1138,6 +1140,7 @@ public class GeckoAppShell
}
}
@SuppressLint("MissingPermission")
@WrapForJNI(calledFrom = "gecko")
private static void cancelVibrate() {
sVibrationMaybePlaying = false;

Просмотреть файл

@ -15,6 +15,7 @@ import org.mozilla.gecko.util.NetworkUtils.ConnectionSubType;
import org.mozilla.gecko.util.NetworkUtils.ConnectionType;
import org.mozilla.gecko.util.NetworkUtils.NetworkStatus;
import android.annotation.SuppressLint;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@ -394,7 +395,7 @@ public class GeckoNetworkManager extends BroadcastReceiver implements BundleEven
return 0;
}
DhcpInfo d = mgr.getDhcpInfo();
@SuppressLint("MissingPermission") DhcpInfo d = mgr.getDhcpInfo();
if (d == null) {
return 0;
}
@ -409,6 +410,7 @@ public class GeckoNetworkManager extends BroadcastReceiver implements BundleEven
}
}
@SuppressLint("MissingPermission")
@Override // BundleEventListener
/**
* Handles native messages, not part of the state machine flow.
@ -450,7 +452,7 @@ public class GeckoNetworkManager extends BroadcastReceiver implements BundleEven
return;
}
final WifiInfo info = mgr.getConnectionInfo();
@SuppressLint("MissingPermission") final WifiInfo info = mgr.getConnectionInfo();
if (info == null) {
callback.sendError("Cannot get connection info");
return;