summaryrefslogtreecommitdiff
path: root/tests/common/java/android/net/LinkPropertiesTest.java
diff options
context:
space:
mode:
authorPatrick Rohr <prohr@google.com>2022-04-04 14:46:25 +0200
committerCherrypicker Worker <android-build-cherrypicker-worker@google.com>2022-05-20 07:50:55 +0000
commit64468d1494619142c0ec31c976b6a76f5c7dea18 (patch)
treefc2aa7a0093e56bd7323692da24a53e35f22dab4 /tests/common/java/android/net/LinkPropertiesTest.java
parent06570714947c69e7fd45a592963bed4e3f31dc02 (diff)
Move ipconfig file inside apex data directory
In order to support rollbacks, the ethernet ipconfig file needs to be written to the data apex's data directory. We still need to support reading from the legacy location to be backwards compatible. If the apex file path already exists, then read the IP configuration from there directly, otherwise, check if the legacy file path exists, if yes, read the legacy IP configuration and copy it to the new apex file path. Support for default IpConfiguration is also being removed in this CL. The default IpConfiguration (configuration entry for interface "0") was a way to transition from supporting a single interface to supporting multiple interfaces and was introduced in P. Every device that has used such a configuration and has connected to an ethernet network since upgrading to P+ has already removed the "0" config and has assigned it to the first interface (probably "eth0"). There has never been an API to set this, but if someone wanted to install a default IpConfiguration, they could just configure "eth0" instead. Bug: 224919694 Test: atest EthernetConfigStoreTest --iterations Test: manually test - adb push <fake ipconfig.txt> /data/misc/ethernet/ - adb reboot - read the IP config from legacy path and the same config file is created in the apex file path - adb reboot - read the IP config from the apex file path directly Change-Id: Ifb82a5d7fa13d17ea8fd3a42a19cd020cb95e26a (cherry picked from commit 47641d75d991a26e8616a239b717021810dee798) Merged-In: Ifb82a5d7fa13d17ea8fd3a42a19cd020cb95e26a
Diffstat (limited to 'tests/common/java/android/net/LinkPropertiesTest.java')
0 files changed, 0 insertions, 0 deletions