summaryrefslogtreecommitdiff
path: root/core/java/android/net/InterfaceConfiguration.java
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Revert "Migrate unsafe parcel APIs in framework-minus-apex""Bernardo Rufino2022-01-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 331be9a6431d6489f8d1e1b80cb510d0ee073c50. Reintroducing ag/16366278 since it seems unrelated to b/214053959 (more details on b/214053959#comment55). Original commit message: Migrate unsafe parcel APIs in framework-minus-apex Migrate the following unsafe parcel APIs in framework-minus-apex: * Parcel.readSerializable() * Parcel.readArrayList() * Parcel.readList() * Parcel.readParcelable() * Parcel.readParcelableList() * Parcel.readSparseArray() This CL was generated by applying lint fixes that infer the expected type from the caller code and provide that as the type parameter (ag/16365240). A few observations: * In some classes we couldn't migrate because the class also belonged to another build module whose min SDK wasn't current (as is the case for framework-minus-apex), hence I suppressed the lint check (since I'll eventually submit the lint check to the tree). * In some cases, I needed to do the cast in https://stackoverflow.com/a/1080525/5765705 to make the compiler happy since there isn't another way of providing a class of type Class<MyClassWithGenerics<T>>. * In the readSerializable() case, the new API also requires the class loader, that was inferred to by InferredClass.class.getClassLoader(). * Note that automatic formatting and import rely on running hooked up to the IDE, which wasn't the case here. Bug: 195622897 Change-Id: I272432e6e082a973f7a50492ec35d79c2b577c93 Test: TH passes
* Revert "Migrate unsafe parcel APIs in framework-minus-apex"Bernardo Rufino2022-01-121-1/+0
| | | | | | | | This reverts commit 90bb3709dc75f7e44914222114752de5bce133d4. Reason for revert: b/214053959 Change-Id: Ic271bab1d3eaf677a5989dda9deb944ee2ad6850
* Migrate unsafe parcel APIs in framework-minus-apexBernardo Rufino2021-12-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Migrate the following unsafe parcel APIs in framework-minus-apex: * Parcel.readSerializable() * Parcel.readArrayList() * Parcel.readList() * Parcel.readParcelable() * Parcel.readParcelableList() * Parcel.readSparseArray() This CL was generated by applying lint fixes that infer the expected type from the caller code and provide that as the type parameter (ag/16365240). A few observations: * In some classes we couldn't migrate because the class also belonged to another build module whose min SDK wasn't current (as is the case for framework-minus-apex), hence I suppressed the lint check (since I'll eventually submit the lint check to the tree). * In some cases, I needed to do the cast in https://stackoverflow.com/a/1080525/5765705 to make the compiler happy since there isn't another way of providing a class of type Class<MyClassWithGenerics<T>>. * In the readSerializable() case, the new API also requires the class loader, that was inferred to by InferredClass.class.getClassLoader(). * Note that automatic formatting and import rely on running hooked up to the IDE, which wasn't the case here. Bug: 195622897 Test: TH passes Change-Id: I11a27b9bdab7959ee86e90aa1e1cbebd7aaf883c
* Use new UnsupportedAppUsage annotation.Artur Satayev2020-01-061-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
* InterfaceConfiguration: Don't use @hide Sets classRoshan Pius2019-12-091-3/+1
| | | | | | | | | | InterfaceConfiguration class is going to be jar-jar'ed by wifi (in internal master). Remove this @hide usage to avoid transitive @hide dependency on wifi mainline module. Bug: 145904524 Test: Compiles Change-Id: I4dbe69a8597d75d19fb12b4f4940b26b64fda35e
* Add @UnsupportedAppUsage annotations for greylist.Artur Satayev2019-11-081-0/+4
| | | | | | | | | | | | go/cleanup-greylist-txt These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code. Bug: 137350495 Test: m Change-Id: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09 Merged-In: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
* Stop using netd parcelables in the framework.Lorenzo Colitti2019-03-201-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | The only actual users of these classes are in services.jar, not in frameworks.jar. The only reason the framework depends on them is that the code that converts to and from stable parcelables is currently in the framework. Move that code to services and cut the dependency. These classes aren't used in the networkstack app so they don't need to be in shared. They also can't be in shared because the classes are not in the SDK. So put the conversion functions directly inside their only user (NetworkManagementService). Also remove the jarjar rules that rename the classes for use by the NetworkStack app. This does not actually remove the dependency from the build file, that will be done in a future CL. Bug: 128804404 Test: builds, boots Test: atest FrameworksNetTests android.net.cts.ConnectivityManagerTest HostsideVpnTests Change-Id: I027d50ba56091f5558f45e6e08f32e5912b2a82a
* All Parcelable CREATOR fields are @NonNull.Jeff Sharkey2019-02-281-1/+1
| | | | | | | | | If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
* Remove deps from framework on netd interfacesRemi NGUYEN VAN2019-02-131-2/+3
| | | | | | | | | | | If included in framework.jar, the interfaces conflict with any app that needs to depend on them, including the NetworkStack. (cherry-pick of aosp/903220 with trivial conflict in Android.bp) Bug: 124033493 Test: atest FrameworksNetTests NetworkStackTests Change-Id: I0ecae20d514bf888f3a80331f19369ceb1c52aa3
* interface-related commands portingLuke Huang2018-10-251-2/+40
| | | | | | Test: runtest frameworks-net passes Test: manual testing of interface related function works(tethering) Change-Id: Ie1a1ac00c28ef914d62e7d75b0db8c2434c810d2
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Use this.isUp() inside InterfaceConfigurationChristopher Wiley2016-10-171-1/+1
| | | | | | Bug: 31337216 Test: Compiles Change-Id: I968a739f9ada47b1357932d2da76451eb26c3d5f
* Add InterfaceConfiguration.isUp()Christopher Wiley2016-10-111-0/+4
| | | | | | Bug: 31337216 Test: None Change-Id: Ifd83b069472fc50c9517fc69306e7938a9e9628c
* Allow WiFi components to manage interface up stateChristopher Wiley2016-09-191-0/+8
| | | | | | | | | | | | | | | Setting the WiFi network interface up or down is racy because it is not synchronized with the WiFi components managing the interface. This causes a problem for hostapd when the interface is marked down before hostapd starts because it causes the driver to enter the de-initialization process. hostapd does not know how to react to this change of events. Bug: 31205821 Test: bug no longer reproduces on upcoming devices, unit tests pass Change-Id: I96938e2aef89b400593d42ce1b0a6ccc2d2e5754
* Move native netd calls to varargs.Jeff Sharkey2011-12-021-18/+2
| | | | | | | | | Uses argument escaping inside NativeDaemonConnector, using varargs to separate boundaries. Also introduces Command object to help build argument lists. Bug: 5472606 Change-Id: I357979fc19bb0171a056e690064e01b5a7119501
* Clean up InterfaceConfiguration flags.Jeff Sharkey2011-11-291-39/+116
| | | | | | | Offer modifier methods for interface flags instead of mutating directly, and remove square brackets. Change-Id: I4cce719dccedfb3f0e8448c111e65b93c0008cbb
* Bind addr and prefixLength together in LinkAddressRobert Greenwalt2011-01-281-20/+4
| | | | | bug:2542681 Change-Id: I90200446216d78c676498144946832afe75efdb8
* Pick an upstream interface with valid IP configIrfan Sheriff2011-01-171-2/+24
| | | | | | | | | As a work around for the issue of picking the wrong interface, add a check for selecting an upstream interface that has a valid IP configuration Bug: 3362306 Change-Id: I01084517cff756c97660b2cfbfa8e9bf26673148
* Fix some IpV4-only code.Robert Greenwalt2010-12-141-15/+29
| | | | | | | | InterfaceConfiguration changed to use InetAddress and stop with the string->int->string conversions. bug:2542681 Change-Id: I11c4954547333c43bb840fa0469ddde57b0d043b
* Add USB RNDIS enable/disable controlRobert Greenwalt2010-02-231-4/+4
| | | | | Also adding interface configuration to the tethering machine. Also fixing netd bug that didn't send up/down portion of iface config command.
* android.net: Introduce @hidden parcelable InterfaceConfiguration classSan Mehat2010-01-221-0/+83
This class is used to get/set interface configuration via the new NetworkManagementService API Signed-off-by: San Mehat <san@google.com>