summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2020-03-09 07:42:25 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-03-09 07:42:25 +0000
commitb3d7fe48adeddbef8a7c238b65cc37be49346978 (patch)
treead3d0681b4c7ee4f0b8231e92e1451fbc5999f99 /core/java
parente09d5feef22152f2ab52b955c6f74d95b6fa76d0 (diff)
parentbb5104fa138fdbf4554a14e875833759cd4d18da (diff)
Merge "Add missing RequiresPermission to EthernetManager"
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/net/EthernetManager.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/net/EthernetManager.java b/core/java/android/net/EthernetManager.java
index 139f5bebcd89..83b5f63576f2 100644
--- a/core/java/android/net/EthernetManager.java
+++ b/core/java/android/net/EthernetManager.java
@@ -17,6 +17,7 @@
package android.net;
import android.annotation.NonNull;
+import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
@@ -248,6 +249,10 @@ public class EthernetManager {
* interface, the existing interface will be used.
* @param callback A callback to be called once the request has been fulfilled.
*/
+ @RequiresPermission(anyOf = {
+ android.Manifest.permission.NETWORK_STACK,
+ android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK
+ })
@NonNull
public TetheredInterfaceRequest requestTetheredInterface(@NonNull final Executor executor,
@NonNull final TetheredInterfaceCallback callback) {