summaryrefslogtreecommitdiff
path: root/Tethering/common/TetheringLib/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | Hide startTethering with type function to module-lib onlymarkchien2020-03-191-0/+2
| | | | | | | | | | | | Bug: 151918384 Test: m Change-Id: Icef8b363aae97dd020d618bcb397f661aa6c4750
* | TetheringManager API clean upmarkchien2020-03-191-42/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per API review: - @IntDef defined on the type integer parameter - have getters on each parameter that is set in the TetheringRequest.Builder - new added API should not be deprecated Below APIs is moved from system-current to module-lib-current that only plafrom code(e.g. ConnectivityManager and Settings) can use them. TetheringRequest. onTetherableInterfaceRegexpsChanged, TetheringInterfaceRegexps: Only platform code can use them because interfaces by regular expressions are a mechanism which is planning to be deprecated. Also rename some constants for easier to understand. Bug: 149858697 Bug: 151243337 Test: m doc-comment-check-docs atest TetheringTests Change-Id: Idd041f0fbeca411ea23e49786a50dd7feb77ef45
* | Support static address configurationAutomerger Merge Worker2020-03-192-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Application can specify static ipv4 server and client address to setup tethering and this is one shot configuration. Tethering service would not save the configuration and the configuration would be reset when tethering stop or start failure. When startTethering callback fired, it just mean tethering is requested successful. Therefore, callers may call startTethering again if startTethering successful but do not receive following tethering active notification for a while. Tethering service never actually does anything synchronously when startTethering is called: -startProvisioningIfNeeded just posts a message to the handler thread. -enableTetheringInternal doesn't do anything synchronously, it just asks the downstreams to get their interfaces ready and waits for callbacks. If tethering is already enabled with a different request, tethering would be disabled and re-enabled. Bug: 141256482 Test: -build, flash, boot -atest TetheringTests -atest CtsTetheringTest Change-Id: I2b2dd965a673e6f1626738d41b5d443f0f9fbd0e Merged-In: I0399917e7cefa1547d617e688225544c4fc1a231 (cherry picked from commit 5d6723e24e21154bef3967585a8adc069e007f49)
* | Cleanup the TetheredClients APIAutomerger Merge Worker2020-03-161-15/+26
| | | | | | | | | | | | | | | | | | | | | | | | Add comments to getters as requested in API review, and remove the expirationTime private field that was planned to be replaced with LinkAddress expiration. Test: atest TetheringTests Fixes: 150878126 Change-Id: Iecf65859cdeeaac2fa7b817b4f505c510424ac89 Merged-In: Iecf65859cdeeaac2fa7b817b4f505c510424ac89 (cherry picked from commit 594d0eae38c13e2bb03de0b3ae1f8781991c321e)
* | Change TetheringConstants class to finalAutomerger Merge Worker2020-03-161-1/+1
| | | | | | | | | | | | | | | | | | Bug: 151322331 Test: m doc-comment-check-docs Change-Id: Ieca36d81b7799988b8dbb9c0d22de690136303ab Merged-In: Ia02be3d1d91a08ae4a56b25560ed448c96a693db (cherry picked from commit 5e2740b24658ba340a6b47a46c89cfd642afe394)
* | Merge "Send offload status changed callback" into rvc-devMark Chien2020-03-093-1/+40
|\ \
| * | Send offload status changed callbackAutomerger Merge Worker2020-03-093-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The callback would be fired when offload started, stopped, or failed. If offload is not supported, "failed" callback would be fired when user enable tethering. Enabling multiple tethering would not have multiple offload status callbacks because offload should already be started or failed. Bug: 130596697 Test: -build, flash, boot -atest TetheringTests -ON/OFF hotspotf Change-Id: Ifb16dcedc8081833fa95a39596fe5cdc309ededd Merged-In: Ifb16dcedc8081833fa95a39596fe5cdc309ededd Merged-In: Ia0398601144b0e5f61dc0c5771eacf13e7cfbb59 (cherry picked from commit cd266076bed28459234c5d74ad373867944df116)
* | | Tethering: add isTetheringSupported with callerPkg parameterAutomerger Merge Worker2020-03-091-0/+19
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BT tethering need to know whether tethering is supported for its caller that call isTetheringSupported in binder thread under BT's process. Current isTetheringSupported API is getting callerPkg inside TetheringManager that would be BT's package name for bt tethering case. Provide isTetheringSupported(String callerPkg) for caller to pass its caller's package name if the use case is under binder IPC. Bug: 146915889 Test: -boot, flash, boot Change-Id: I01646fe045772c57b4e39a5e129531f8a2cea89f Merged-In: I01646fe045772c57b4e39a5e129531f8a2cea89f Merged-In: I2a35e1b6851e7a799c343be0dd60da23514768ba (cherry picked from commit e09a92fabe7956692f34e94c198d9763bf76e53d)
* | Merge "Stop exposing constructor of TetheringConstants" am: e19cd8f3ab am: ↵Automerger Merge Worker2020-02-201-0/+3
|\| | | | | | | | | | | f2472fa7aa am: 051bd7f721 Change-Id: If4cf11820b0d712584e7ee393c26c7c359d7952f
| * Stop exposing constructor of TetheringConstantsmarkchien2020-02-201-0/+3
| | | | | | | | | | | | | | | | | | | | Fully-static utility classes must not have constructor. Bug: 149430003 Test: -build, flash, boot -atest TetheringTests Change-Id: I18e1129ef8717211d667ccd3b4110169dd7905b4
| * Add tethering client callbacksRemi NGUYEN VAN2020-02-195-4/+35
| | | | | | | | | | | | | | | | | | | | | | The callbacks are fired when the list of connected clients or their IP addresses / hostname change. Test: flashed, connected 2 devices, verified callbacks Test: atest TetheringTests Bug: 135411507 Change-Id: I96291038cf7b39a67547a5f74fcd7cbedc1ca002 Merged-In: I96291038cf7b39a67547a5f74fcd7cbedc1ca002
| * Use framework-tethering-stub instead of framework-tetheringmarkchien2020-02-193-10/+23
| | | | | | | | | | | | | | | | | | | | | | The non-updatable part of the platform now is built with framework-tethering-stub, which is a stub library of framework-tethering. Bug: 147200698 Test: m Change-Id: I97ef83f7f9b4c1376f373713036f5256318f1050 Merged-In: I97ef83f7f9b4c1376f373713036f5256318f1050
* | Merge "Use constant for tethering connector poll interval."Amos Bianchi2020-02-181-1/+1
|\ \
| * | Use constant for tethering connector poll interval.Amos Bianchi2020-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | A constant is defined but a literal is used instead. Test: manual Change-Id: I233e11af4e39a35d9a47e45066df994a9f547272
* | | Add tethering client callbacksRemi NGUYEN VAN2020-02-185-4/+35
|/ / | | | | | | | | | | | | | | | | | | The callbacks are fired when the list of connected clients or their IP addresses / hostname change. Test: flashed, connected 2 devices, verified callbacks Test: atest TetheringTests Bug: 135411507 Change-Id: I96291038cf7b39a67547a5f74fcd7cbedc1ca002
* | Merge "Fix TetheredClient and TetheredClientTest" am: 8451e20d98 am: ↵Automerger Merge Worker2020-02-121-2/+2
|\| | | | | | | | | | | 8ab2f58ab9 am: c8190ff316 Change-Id: I8a3d01dbd02639e07284a3dc6798c0db512c8307
| * Fix TetheredClient and TetheredClientTestRemi NGUYEN VAN2020-02-071-2/+2
| | | | | | | | | | | | | | | | | | | | - Ensure that addAddresses preserves the ordering of addresses - Fix assertion that was supposed to check equality of TetheredClient with a different tethering type, and used the same type. Bug: 148996181 Test: atest TetheringTests Change-Id: I86cef7b834d7ae7afa3d1d748ccac6b3a7e57ebc
* | Use framework-tethering-stub instead of framework-tetheringmarkchien2020-02-073-10/+23
|/ | | | | | | | | | The non-updatable part of the platform now is built with framework-tethering-stub, which is a stub library of framework-tethering. Bug: 147200698 Test: m Change-Id: I97ef83f7f9b4c1376f373713036f5256318f1050
* Merge "Do not block for connector in TetheringManager"Remi NGUYEN VAN2020-01-291-55/+161
|\
| * Do not block for connector in TetheringManagerRemi NGUYEN VAN2020-01-291-55/+161
| | | | | | | | | | | | | | | | | | | | Instead of blocking for the ITetheringConnector, in the rare case (only on boot) that the connector is not ready, queue requests and poll for the connector until it is available. Bug: 146821053 Test: Flashed, verified tethering working Change-Id: I4bd45fcbdce2336694c3b6a349f121e40230f001
* | Add support for Ethernet tetheringRemi NGUYEN VAN2020-01-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Ethernet tethering can be started via startTethering(TETHERING_ETHERNET). Test: flashed, enabled ethernet tethering, verified internet access on downstream. Bug: 130840861 Merged-In: I34842acd94b972e440c3622f7617df10c18acf65 Change-Id: I34842acd94b972e440c3622f7617df10c18acf65 (cherry-pick with conflicts in test-current.txt)
* | Local Tethering with ncm interfaceMilim Lee2020-01-281-0/+6
|/ | | | | | | | | | | Bug: 130840842 Test: build, boot atest TetheringTest manual test (call startTethering(TETHERING_NCM)) Merged-In: Icc6c4d6be39e787503cecf3a5835b40d4be12a57 Change-Id: Icc6c4d6be39e787503cecf3a5835b40d4be12a57 (clean cherry-pick)
* Add API for tethering clients changeRemi NGUYEN VAN2020-01-243-0/+244
| | | | | | | | | | | | Add a onClientsChanged callback to OnTetheringEventCallback. The callback will provide information on connected clients combining at least DHCP leases and WiFi AP information (WiFi AP tethering used). Test: atest TetheringTests Bug: 135411507 Change-Id: I7065d081c11bc606d691f76ac8b499dd075d6504 Merged-In: I7065d081c11bc606d691f76ac8b499dd075d6504
* Allows the caller to specify configuration by TetheringRequestmarkchien2020-01-243-9/+203
| | | | | | | | | | | | | | | This is initial work to allow caller to pass their prefered configuration to start tethering. Caller may able to specify the downstream interface ipv4 address with dhcp server disabled for static IP configuration, or able to exempt entitlement check if they have permission in follow up CL. Bug: 141256482 Test: -atest TetheringTest -ON/OFF wifi tethering Change-Id: Ic7c3a33195bbd7e72f9b8e73fa148be476b87bf3 Merged-In: Ic7c3a33195bbd7e72f9b8e73fa148be476b87bf3
* Make TetheringManager to system APImarkchien2020-01-244-53/+372
| | | | | | | | | | | | | | Also deprecated tethering APIs in ConnectivityManager. Will have follow up change to remove @hide tethering function in ConnectivityManager. Bug: 145093446 Bug: 148038547 Test: -build, flash, boot -atest TetheringTests Change-Id: Ia432057bf9056727c4a0ca97d160a49274d33581 Merged-In: Ia432057bf9056727c4a0ca97d160a49274d33581
* Replace ConnectivityManager constants to TetheringManagermarkchien2020-01-081-3/+98
| | | | | | | | | | | Replace some ConnectivityManager constants as TetheringManager inside tethering module. No API change, will have follow up CL to delete @hide tethering constants in ConnectivityManager and replace caller to using TetheringManager. Bug: 144753389 Test: build Change-Id: Ia1b963669722c32d147375763205ed2f3af52fed
* [Tether13] Move TetheringManager into frameworkmarkchien2019-12-194-322/+353
| | | | | | | | | | | | Move tethering out of ConnectivityService. All client would use TetheringManager to talk with TetheringService directly. Bug: 144320246 Test: -build, flash, boot -atest TetheringTests Change-Id: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e Merged-In: Ib051bea724a256f9c4572b566e46ae7b9c4abe6e
* Protect early access before tethering readymarkchien2019-12-131-0/+25
| | | | | | Bug: 145876447 Test: build, flash, boot Change-Id: Ic40b6080a662e312e4efd7246d964710d9f07bef
* [Tether10]Remove UserManagerInternal usage in Tetheringmarkchien2019-11-302-3/+9
| | | | | | | | | | | | | | | | | | | To be the unbundled application, tethering can not use UserManagerInternal method anymore. Replace it by listening user restriction change intent. Also fix some cleanup from https://android-review.googlesource.com/c/platform/frameworks/base/+/1131002 Bug: 143195885 Test: -build, flash, boot -atest TetheringTests -manual test. Add a trigger point to call UserManager.setUserRestriction(DISALLOW_CONFIG_TETHERING) from Settings. Open hotspot -> restrict tethering from new adding trigger point -> hotspot is OFF and Tethering settings are not available. Change-Id: I4ed08d20f8b7476b8ecd5d018b75806dd2f22cc1 Merged-In: I4ed08d20f8b7476b8ecd5d018b75806dd2f22cc1
* [Tether07] Migrate Tethering into modulemarkchien2019-11-305-0/+626
| | | | | | | | | | | | | | | | | | | | Now tethering would be run in dedicated service. TetheringManager is the interface used to communicate with TetheringService. The new call flow would be: ConnectivityManager -> ConnectivityService -> TetheringManager -> TetheringService. Note: the return value of #tether(), #untether() and #setUsbTethering() APIs would always be no error. Client can use #getLastTetherError() or #getTetheredIfaces or listen tether state change to check status of corresponding interface. Bug: 136040414 Bug: 144742179 Test: -build, flash, boot -atest TetheringTests -atest FrameworksNetTests Change-Id: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3 Merged-In: I7e78c0e0a3e70f940a749ba2a39ece7c7ec5b9b3
* [Tether01] Add Tethering Appmarkchien2019-10-241-0/+20
This is initial patch that don't contain any service for now. Bug: 136040414 Test: -build, flash, boot Change-Id: I0b49d7e9c3fcba5af3025163f9cc9eafb0778116