xref: /aosp_15_r20/prebuilts/sdk/33/module-lib/api/framework-tethering.txt (revision 344a7f5ef16c479e7a7f54ee6567a9d112f9e72b)
1*344a7f5eSAndroid Build Coastguard Worker// Signature format: 2.0
2*344a7f5eSAndroid Build Coastguard Workerpackage android.net {
3*344a7f5eSAndroid Build Coastguard Worker
4*344a7f5eSAndroid Build Coastguard Worker  public final class TetheringConstants {
5*344a7f5eSAndroid Build Coastguard Worker    field public static final String EXTRA_ADD_TETHER_TYPE = "extraAddTetherType";
6*344a7f5eSAndroid Build Coastguard Worker    field public static final String EXTRA_PROVISION_CALLBACK = "extraProvisionCallback";
7*344a7f5eSAndroid Build Coastguard Worker    field public static final String EXTRA_REM_TETHER_TYPE = "extraRemTetherType";
8*344a7f5eSAndroid Build Coastguard Worker    field public static final String EXTRA_RUN_PROVISION = "extraRunProvision";
9*344a7f5eSAndroid Build Coastguard Worker    field public static final String EXTRA_SET_ALARM = "extraSetAlarm";
10*344a7f5eSAndroid Build Coastguard Worker  }
11*344a7f5eSAndroid Build Coastguard Worker
12*344a7f5eSAndroid Build Coastguard Worker  public class TetheringManager {
13*344a7f5eSAndroid Build Coastguard Worker    ctor public TetheringManager(@NonNull android.content.Context, @NonNull java.util.function.Supplier<android.os.IBinder>);
14*344a7f5eSAndroid Build Coastguard Worker    method public int getLastTetherError(@NonNull String);
15*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public String[] getTetherableBluetoothRegexs();
16*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public String[] getTetherableIfaces();
17*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public String[] getTetherableUsbRegexs();
18*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public String[] getTetherableWifiRegexs();
19*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public String[] getTetheredIfaces();
20*344a7f5eSAndroid Build Coastguard Worker    method @NonNull public String[] getTetheringErroredIfaces();
21*344a7f5eSAndroid Build Coastguard Worker    method public boolean isTetheringSupported();
22*344a7f5eSAndroid Build Coastguard Worker    method public boolean isTetheringSupported(@NonNull String);
23*344a7f5eSAndroid Build Coastguard Worker    method public void requestLatestTetheringEntitlementResult(int, @NonNull android.os.ResultReceiver, boolean);
24*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated public int setUsbTethering(boolean);
25*344a7f5eSAndroid Build Coastguard Worker    method @RequiresPermission(anyOf={android.Manifest.permission.TETHER_PRIVILEGED, android.Manifest.permission.WRITE_SETTINGS}) public void startTethering(int, @NonNull java.util.concurrent.Executor, @NonNull android.net.TetheringManager.StartTetheringCallback);
26*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated public int tether(@NonNull String);
27*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated public int untether(@NonNull String);
28*344a7f5eSAndroid Build Coastguard Worker  }
29*344a7f5eSAndroid Build Coastguard Worker
30*344a7f5eSAndroid Build Coastguard Worker  public static interface TetheringManager.TetheredInterfaceCallback {
31*344a7f5eSAndroid Build Coastguard Worker    method public void onAvailable(@NonNull String);
32*344a7f5eSAndroid Build Coastguard Worker    method public void onUnavailable();
33*344a7f5eSAndroid Build Coastguard Worker  }
34*344a7f5eSAndroid Build Coastguard Worker
35*344a7f5eSAndroid Build Coastguard Worker  public static interface TetheringManager.TetheredInterfaceRequest {
36*344a7f5eSAndroid Build Coastguard Worker    method public void release();
37*344a7f5eSAndroid Build Coastguard Worker  }
38*344a7f5eSAndroid Build Coastguard Worker
39*344a7f5eSAndroid Build Coastguard Worker  public static interface TetheringManager.TetheringEventCallback {
40*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated public default void onTetherableInterfaceRegexpsChanged(@NonNull android.net.TetheringManager.TetheringInterfaceRegexps);
41*344a7f5eSAndroid Build Coastguard Worker  }
42*344a7f5eSAndroid Build Coastguard Worker
43*344a7f5eSAndroid Build Coastguard Worker  @Deprecated public static class TetheringManager.TetheringInterfaceRegexps {
44*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated @NonNull public java.util.List<java.lang.String> getTetherableBluetoothRegexs();
45*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated @NonNull public java.util.List<java.lang.String> getTetherableUsbRegexs();
46*344a7f5eSAndroid Build Coastguard Worker    method @Deprecated @NonNull public java.util.List<java.lang.String> getTetherableWifiRegexs();
47*344a7f5eSAndroid Build Coastguard Worker  }
48*344a7f5eSAndroid Build Coastguard Worker
49*344a7f5eSAndroid Build Coastguard Worker}
50*344a7f5eSAndroid Build Coastguard Worker
51