Merge "Add missing RequiresPermission to EthernetManager" am: b3d7fe48ad am: 360c24f950

Change-Id: I82aa6c27748dab5835158f4a64c3d8efbc8e28b4
This commit is contained in:
Automerger Merge Worker
2020-03-09 08:24:38 +00:00

View File

@@ -17,6 +17,7 @@
package android.net; package android.net;
import android.annotation.NonNull; import android.annotation.NonNull;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi; import android.annotation.SystemApi;
import android.annotation.SystemService; import android.annotation.SystemService;
import android.annotation.TestApi; import android.annotation.TestApi;
@@ -248,6 +249,10 @@ public class EthernetManager {
* interface, the existing interface will be used. * interface, the existing interface will be used.
* @param callback A callback to be called once the request has been fulfilled. * @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 @NonNull
public TetheredInterfaceRequest requestTetheredInterface(@NonNull final Executor executor, public TetheredInterfaceRequest requestTetheredInterface(@NonNull final Executor executor,
@NonNull final TetheredInterfaceCallback callback) { @NonNull final TetheredInterfaceCallback callback) {