A user should be able to enable tethering even if the interface does not
have link yet. Therefore, the toggle should be active if any interface
is available, independent of its link state.
Test: TH
Bug: 234036868
Change-Id: I2ae25207a766d71217dd6d17f3f9b74ceb261238
When running the monkey test, its going in tethering page
inside Settings app and enabling ethernet tethering.
Due to get adb connection is getting lost.
Guarding ethernet tethering option when monkey test is running,
it will not display ethernet tethering option during monkey test.
Bug:
Test: start monkey test run using below command
adb shell monkey -v 1000000
Change-Id: I4040cb088404e663b032179ff52b1bc564ecf76b
Signed-off-by: Ankit Agrawal <ankit.agarwal@intel.com>
Since ThreadUtils encapsules method to ensure main thread, it is
suggested to call this method rather than maintaining our copy.
Bug: 258270052
Test: atest and manual.
Change-Id: I4c5fcdd6e5bcc7d1d08f526eedb3aa123926d8a1
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
Ethernet service related files are going to be moved into Connectivity
module. EthernetManager.addListener(listener, exectuor) will be exposed
out as module-lib API. Replace the current API usage with the one to be
exposed.
android.os.HandlerExecutor is a hidden API which isn't visible to modules,
try to replace HanlderExecutor class with Handler.post itself although
Setttings can still access this API.
Bug: 210586283
Test: m
Change-Id: I618b43769c68897f4724fae8213181be1cc770c6
Change to getSystemService(Class<T>) to align the capability with framework
part.
Bug: 179640862
Test: local
Change-Id: I1b4812044fc4876bec6645570049a60f9470dbbd
Connectivity is becoming a mainline module in S, so
ConnectivityManager hidden symbols can not be used for outside
components. Besides, most Tethering relevant methods or variables
on CM are migrated to TetheringManager. So replace all these
methods or variables from ConnectivityManager to TetheringManager
on Settings.
Bug: 180693313
Test: make RunSettingsRoboTests ROBOTEST_FILTER=<Modified Test>
Change-Id: Iba4b121a4ddf3f04252aa0355e0e6494a593682a
Merged-In: Iba4b121a4ddf3f04252aa0355e0e6494a593682a