Anton Hansson | 65d1e30 | 2020-01-17 19:03:34 +0000 | [diff] [blame] | 1 | // Signature format: 2.0 |
Quang Anh Luong | 2f37e81 | 2024-08-21 14:25:46 +0900 | [diff] [blame] | 2 | package android.net { |
| 3 | |
| 4 | public final class TetheringInterface implements android.os.Parcelable { |
| 5 | ctor public TetheringInterface(int, @NonNull String); |
| 6 | ctor @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") public TetheringInterface(int, @NonNull String, @Nullable android.net.wifi.SoftApConfiguration); |
| 7 | method public int describeContents(); |
| 8 | method @NonNull public String getInterface(); |
| 9 | method @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") @Nullable @RequiresPermission(value=android.Manifest.permission.NETWORK_SETTINGS, conditional=true) public android.net.wifi.SoftApConfiguration getSoftApConfiguration(); |
| 10 | method public int getType(); |
| 11 | method public void writeToParcel(@NonNull android.os.Parcel, int); |
| 12 | field @NonNull public static final android.os.Parcelable.Creator<android.net.TetheringInterface> CREATOR; |
| 13 | } |
| 14 | |
| 15 | public class TetheringManager { |
| 16 | method @RequiresPermission(android.Manifest.permission.ACCESS_NETWORK_STATE) public void registerTetheringEventCallback(@NonNull java.util.concurrent.Executor, @NonNull android.net.TetheringManager.TetheringEventCallback); |
| 17 | method @RequiresPermission(value=android.Manifest.permission.TETHER_PRIVILEGED, conditional=true) public void startTethering(@NonNull android.net.TetheringManager.TetheringRequest, @NonNull java.util.concurrent.Executor, @NonNull android.net.TetheringManager.StartTetheringCallback); |
| 18 | method @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") @RequiresPermission(value=android.Manifest.permission.TETHER_PRIVILEGED, conditional=true) public void stopTethering(@NonNull android.net.TetheringManager.TetheringRequest, @NonNull java.util.concurrent.Executor, @NonNull android.net.TetheringManager.StopTetheringCallback); |
| 19 | method @RequiresPermission(anyOf={android.Manifest.permission.TETHER_PRIVILEGED, android.Manifest.permission.ACCESS_NETWORK_STATE}) public void unregisterTetheringEventCallback(@NonNull android.net.TetheringManager.TetheringEventCallback); |
| 20 | field public static final int CONNECTIVITY_SCOPE_GLOBAL = 1; // 0x1 |
| 21 | field public static final int TETHERING_WIFI = 0; // 0x0 |
| 22 | field public static final int TETHER_ERROR_DHCPSERVER_ERROR = 12; // 0xc |
| 23 | field public static final int TETHER_ERROR_DISABLE_FORWARDING_ERROR = 9; // 0x9 |
| 24 | field @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") public static final int TETHER_ERROR_DUPLICATE_REQUEST = 18; // 0x12 |
| 25 | field public static final int TETHER_ERROR_ENABLE_FORWARDING_ERROR = 8; // 0x8 |
| 26 | field public static final int TETHER_ERROR_ENTITLEMENT_UNKNOWN = 13; // 0xd |
| 27 | field public static final int TETHER_ERROR_IFACE_CFG_ERROR = 10; // 0xa |
| 28 | field public static final int TETHER_ERROR_INTERNAL_ERROR = 5; // 0x5 |
| 29 | field public static final int TETHER_ERROR_NO_ACCESS_TETHERING_PERMISSION = 15; // 0xf |
| 30 | field public static final int TETHER_ERROR_NO_CHANGE_TETHERING_PERMISSION = 14; // 0xe |
| 31 | field public static final int TETHER_ERROR_NO_ERROR = 0; // 0x0 |
| 32 | field public static final int TETHER_ERROR_PROVISIONING_FAILED = 11; // 0xb |
| 33 | field public static final int TETHER_ERROR_SERVICE_UNAVAIL = 2; // 0x2 |
| 34 | field public static final int TETHER_ERROR_TETHER_IFACE_ERROR = 6; // 0x6 |
| 35 | field public static final int TETHER_ERROR_UNAVAIL_IFACE = 4; // 0x4 |
| 36 | field public static final int TETHER_ERROR_UNKNOWN_IFACE = 1; // 0x1 |
| 37 | field @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") public static final int TETHER_ERROR_UNKNOWN_REQUEST = 17; // 0x11 |
| 38 | field public static final int TETHER_ERROR_UNKNOWN_TYPE = 16; // 0x10 |
| 39 | field public static final int TETHER_ERROR_UNSUPPORTED = 3; // 0x3 |
| 40 | field public static final int TETHER_ERROR_UNTETHER_IFACE_ERROR = 7; // 0x7 |
| 41 | } |
| 42 | |
| 43 | public static interface TetheringManager.StartTetheringCallback { |
| 44 | method public default void onTetheringFailed(int); |
| 45 | method public default void onTetheringStarted(); |
| 46 | } |
| 47 | |
| 48 | @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") public static interface TetheringManager.StopTetheringCallback { |
| 49 | method public default void onStopTetheringFailed(int); |
| 50 | method public default void onStopTetheringSucceeded(); |
| 51 | } |
| 52 | |
| 53 | public static interface TetheringManager.TetheringEventCallback { |
| 54 | method public default void onTetheredInterfacesChanged(@NonNull java.util.Set<android.net.TetheringInterface>); |
| 55 | } |
| 56 | |
| 57 | public static final class TetheringManager.TetheringRequest implements android.os.Parcelable { |
| 58 | method @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") public int describeContents(); |
| 59 | method @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") @Nullable public android.net.wifi.SoftApConfiguration getSoftApConfiguration(); |
| 60 | method @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") public void writeToParcel(@NonNull android.os.Parcel, int); |
| 61 | field @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") @NonNull public static final android.os.Parcelable.Creator<android.net.TetheringManager.TetheringRequest> CREATOR; |
| 62 | } |
| 63 | |
| 64 | public static class TetheringManager.TetheringRequest.Builder { |
| 65 | ctor public TetheringManager.TetheringRequest.Builder(int); |
| 66 | method @NonNull public android.net.TetheringManager.TetheringRequest build(); |
| 67 | method @FlaggedApi("com.android.net.flags.tethering_with_soft_ap_config") @NonNull @RequiresPermission(android.Manifest.permission.TETHER_PRIVILEGED) public android.net.TetheringManager.TetheringRequest.Builder setSoftApConfiguration(@Nullable android.net.wifi.SoftApConfiguration); |
| 68 | } |
| 69 | |
| 70 | } |
| 71 | |