Add TetheredInterface{Request, Callback} interface
Define interfaces that match the signature of the existing
EthernetManager.TetheredInterfaceRequest and TetheredInterfaceCallback
classes and make EthernetManager.TetheredInterfaceRequest and
TetheredInterfaceCallback implement/subinterface these interfaces. The
new bluetooth API could also implement these interfaces to make API surface
consistent.
Test: TH would test the existing tests that use the subclass.
Bug: 190438212
Change-Id: I093972c111cb1d921076782492716d5a046be8fc
diff --git a/Tethering/common/TetheringLib/api/module-lib-current.txt b/Tethering/common/TetheringLib/api/module-lib-current.txt
index 0566040..460c216 100644
--- a/Tethering/common/TetheringLib/api/module-lib-current.txt
+++ b/Tethering/common/TetheringLib/api/module-lib-current.txt
@@ -27,6 +27,15 @@
method @Deprecated public int untether(@NonNull String);
}
+ public static interface TetheringManager.TetheredInterfaceCallback {
+ method public void onAvailable(@NonNull String);
+ method public void onUnavailable();
+ }
+
+ public static interface TetheringManager.TetheredInterfaceRequest {
+ method public void release();
+ }
+
public static interface TetheringManager.TetheringEventCallback {
method @Deprecated public default void onTetherableInterfaceRegexpsChanged(@NonNull android.net.TetheringManager.TetheringInterfaceRegexps);
}