Adapt new EthernetManager APIs in Settings.
EthernetManager is going to be moved to Connectivity mainline module and new EthernetManager management APIs have been exposed. This CL adapts new APIs in the settings in advance, the changes include: 1. use addInterfaceStateListener and removeInterfaceStateListener. 2. rely on the onInterfaceStateChanged callback to receive the Ethernet interface state update, to replace the getAvailableInterfaces and getConfiguration. 3. after the Ethernet mainline migration completes, Settings cannot access the platform resource such as config_ethernet_iface_regex, instead, check the availability of Ethernet interface by checking if either any of FEATURE_ETHERNET and FEATURE_USB_HOST is supported. Bug: 210586283 Bug: 218798003 Test: m Test: manually verify that device can access the Internet via Ethernet Test: manually verify that device can share the Internet via Ethernet tethering Test: make RunSettingsRoboTests ROBOTEST_FILTER=<modified test cases> EthernetTetherPreferenceControllerTest AllInOneTetherSettingsTest Change-Id: I9e10481e1751975772a24db29568aa26bb85cd70
Loading
Please register or sign in to comment