summaryrefslogtreecommitdiff
path: root/core/java/android/net/EthernetManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Move Ethernet related files to f/b/packages/ConnectivityT.Xiao Ma2021-12-161-318/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ethernet-service is going to be moved into Connectivity mainline module. Move all ethernet related files in f/b/ to f/b/packages/ConnectivityT so that it's easier to migrate these files to Connectivity module finally after clearing the hidden API usages. Below files to be moved: Ethernet framework related files: - EthernetManager.java - EthernetNetworkSpecifier.java - IEthernetManager.aidl - IEthernetServiceListener.aidl - ITetheredInterfaceCallback.aidl Ethernet service related files: - IpConfigStore.java(EthernetConfigStore has dependency on the class) For the ethernet-service related files, keep it as-is temproraliy and fix the hiden API dependencies in f/opt/net/ethernet/. After this work is done, then migrating the whole of ethernet folder to Connectivity module completely. This CL also fixes some minor errors of code style format to pass the code style check. Bug: 210586283 Test: build pass atest FrameworksNetTests atest EthernetServiceTests Change-Id: Ib359d29d5221105f648bc4194c6d6dbe4cc6e3e5
* Register ethernet listeners on specific ExecutorsRemi NGUYEN VAN2020-12-151-35/+58
| | | | | | | | | | | | | | | | | | | Have users of EthernetManager#addListener specify an Executor instead of running callbacks on ConnectivityThread. For existing clients, run callbacks on the common BackgroundThread. This change in behavior is fine because addListener is not an API, the threading model in Q was to run callbacks on the looper of the thread that first created EthernetManager (so there is already no guarantee on which thread is used), and the only users are in Settings. ConnectivityThread is moving to a connectivity-specific JAR, so it should not be used by external classes. Bug: 174436414 Test: Ethernet client / tethering working atest TetheringIntegrationTests Change-Id: Ic9a959f89915329f79eeeaa0a210ad50811d1291
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-11-041-8/+9
| | | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. Bug: 170729553 Test: Treehugger Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
* Remove @TestApi from @SystemApi symbolsAnton Hansson2020-10-191-1/+0
| | | | | | | | | | | | | | I ran these commands: cd frameworks/base grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \ 's/\@SystemApi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@SystemApi\1/gs' grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \ 's/\@TestApi[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs' Bug: 171179806 Test: m checkapi Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789 Merged-In: I772790b783b0a8730b8bf680c9e569a886b8d789
* Make Ethernet interfaces more testable.Lorenzo Colitti2020-03-191-0/+15
| | | | | | | | | | This CL adds a setIncludeTestInterfaces method to EthernetManager that, when called, causes the Ethernet service to recognize and manage test interfaces created by TestNetworkManager. Bug: 150644681 Test: Tested by EthernetTetheringTest in same topic Change-Id: I86eef7a93267f800dbfc8eafd307effa76a344ca
* Add missing RequiresPermission to EthernetManagerRemi NGUYEN VAN2020-03-091-0/+5
| | | | | | | | | The method requires NETWORK_STACK or MAINLINE_NETWORK_STACK permissions, but the annotation was missing. Test: m Fixes: 150877670 Change-Id: I2af74cbcfa642f05f5e7bf85b2a8e8c38595f6ca
* Fix crash and duplicated ethernet tethering requestmarkchien2020-02-271-4/+6
| | | | | | | | | | | | | | | | | This change fix two things: 1. Handle ethernet callback in internal thread to avoid crash. IpServer should be created from tethering thread, otherwise mIpNeighborMonitor of IpServer would throw IllegalStateException("start() called from off-thread") 2. Ethernet tethering request may be duplicated if multiple startTethering is called but no stopTethering Bug: 130840861 Bug: 148824036 Test: ON/OFF ethernet tehtering manually atest TetheringTests Change-Id: I7c5127e96d80d077735010d2e62c7227805ccb10
* Add support for Ethernet tetheringRemi NGUYEN VAN2020-01-281-0/+14
| | | | | | | | | | | | | 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)
* Support putting one Ethernet interface in server mode.Lorenzo Colitti2020-01-281-1/+77
| | | | | | | | | | | | requestTetheredInterface can be used to put an interface in server mode, which will persist until release() is called on the returned request, or until the requesting process dies. Test: Enabled ethernet tethering with change on top Bug: 130840861 Merged-In: Id96d581acb3fa4e52ca62dd94ec257f56bd3a1ce Change-Id: Id96d581acb3fa4e52ca62dd94ec257f56bd3a1ce (clean cherry-pick from internal branch)
* Use new UnsupportedAppUsage annotation.Artur Satayev2020-01-081-1/+1
| | | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I0c336de56bc4a041dc97ff9b7927f62f0b44b457 Merged-In: I0c336de56bc4a041dc97ff9b7927f62f0b44b457
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-141-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For packages: android.net.wimax android.net.wifi.p2p.nsd android.net.wifi.p2p android.net.wifi.hotspot2.pps android.net.wifi.hotspot2.omadm android.net.wifi.hotspot2 android.net.wifi.aware android.net.wifi android.net.util android.net.sip android.net.rtp android.net.nsd android.net.metrics android.net.lowpan android.net.http android.net.captiveportal android.net This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: Ie25423113ee1a8071cd5039382c00de6ce0af7fd Merged-In: I520be7a4c79e68310c12e4f55bf66acaa94145a1
* Enable multiple active Ethernet interfacesPavel Maltsev2018-01-291-16/+33
| | | | | | | | | | | | | | - add Ethernet interface configurations to config.xml; no vendors can specify network capabilities (in particular they can mark network as restricted which make sense for embedded applications + static IP configuration) - extend EthernetManager to support multiple interfaces, use interface name as an identificator - extend IpConfigStore to store IP configuration based on string identifier (e.g. ethernet name) Test: runtest -x frameworks/base/services/tests/servicestests/ -c com.android.server.net.IpConfigStoreTest Change-Id: Ic1e70003f2380ca8edb4469d6b34e27c5e8cf059
* Annotate @SystemApi with required permissions.Jeff Sharkey2017-06-051-0/+2
| | | | | | | | | | | | | | | | | Most @SystemApi methods should be protected with system (or higher) permissions, so annotate common methods with @RequiresPermission to make automatic verification easier. Verification is really only relevant when calling into system services (where permissions checking can happen on the other side of a Binder call), so annotate managers with the new @SystemService annotation, which is now automatically documented. This is purely a docs change; no logic changes are being made. Test: make -j32 update-api && make -j32 offline-sdk-docs Bug: 62263906 Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
* When system server goes down, crash apps more.Jeff Sharkey2016-03-011-7/+10
| | | | | | | | | | | | | Apps making calls into the system server may end up persisting internal state or making security decisions based on the perceived success or failure of a call, or the default values returned. The reality is that if the system process just died, init will be along shortly to kill all running apps, so we should have no problem rethrowing the RemoteException as a RuntimeException. Bug: 27364859 Change-Id: Ife0bcb079636c88d54c44d17eb580409fd79028b
* Add an API to check availability of Ethernet interface.Jaewan Kim2014-11-201-10/+87
| | | | | Bug: 18045481 Change-Id: I95358241b431cfe4435ce70c23c9a639b9dc4d58
* Stop using LinkProperties for static configuration.Lorenzo Colitti2014-08-191-7/+2
| | | | | | | | | | | | | | | | | LinkProperties can represent way more complicated configurations than what we can actually apply to interfaces. This makes it error-prone to use it to represent static configuration, both when trying to apply configuration coming from LinkProperties and when trying to save configuration from current LinkProperties. Instead, move static configuration (IPv4 only, since we don't support static IPv6 configuration) into a separate StaticIpConfiguration class. Bug: 16114392 Bug: 16893413 Change-Id: Ib33f35c004e30b6067bb20235ffa43c247d174df
* CW on Master: Disable CaptivePortalTracker, EthernetServiceJoe LaPenna2014-07-081-0/+8
| | | | | | BUG: 15143878 Change-Id: I6c534a28c1fcd475982ae70e7f3af69f3a219e24
* Fix Ethernet documentation.Lorenzo Colitti2014-05-221-3/+2
| | | | | | | | 1. Remove incorrect @return tag for void function. 2. Fix build breakage by removing the reference to #ETHERNET_SERVICE, which is hidden. Change-Id: Ia893464bafc8257e48e0bd710d27954b535fcece
* Add an EthernetManager.Lorenzo Colitti2014-05-211-0/+73
The implementation will live in frameworks/opt/net/ethernet. Bug: 7606609 Bug: 8687763 Bug: 14993642 Bug: 14981801 Change-Id: Ic771e268b0c78f0fc32f46af6fe0dd7c634a426e