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
manager
Emulator system image doesn't support bluetooth and ethernet manager
yet.
BUG: 150408099
Signed-off-by: Weilun Du <wdu@google.com>
Change-Id: Iab4f7b962f01755fe7d84956f9b54374f1e17408
(cherry picked from commit 08e95d0db0)
When user is not admin, we should skip the setup and tear down
procedures in AllInOneTetherSettings' lifecycle. Also, the switch for
"Hotspot & tethering" on "Network & internet" should be disabled in such
case.
Bug: 151648198
Test: Build and flashed to crosshatch device. Using guest user, the
settings won't crash when using AllInOneTetherSetting and the switch is
disabled.
Change-Id: Ibd2f4111c53b8b9fa6a18504a681a27b966a3c46
Bluetooth, USB and Wifi Disable tether preferences will turn on/off that
type of tethering interface instantly without storing it into
SharedPreferences. They are listening to TetherEnabler to update their
state.
Refactored to remove dependancy on SharedPreferences.
Bug: 151367756
Test: TetherEnablerTest; BluetoothTetherPreferenceControllerTest;
UsbTetherPreferenceControllerTest;
WifiTetherDisablePreferenceControllerTest; AllInOneSettingsTest;
AllInOneTetherPreferenceControllerTest
Change-Id: Ia6cc60bc4de8f08413beb6d41552a18f6fa6a55b
TetherEnabler need to update tethering state of each tethering
interfaces to make sure other preferences that depends on these
SharedPreferences be consistent with UI.
Bug: 148968321
Test: TetherEnablerTest; CodeInspectionTest. Manully test, built and
flashed to crosshatch device.
Change-Id: Ie0be7748adf20e6fb0ff5489795b0ca0664b6323
The summary for AllInOneTetherPreference in NetworkDashboardFragment is
updated according to tethering state and tether interface chosen by
user.
Bug: 149256198
Test: AllInOneTetherPreferenceControllerTest, TetherEnablerTest,
CodeInspectionTest
Change-Id: I24ba4deabbb02b203e76d32048040d7ccf1b2d22
These preferences are for user to toggle a specific tethering option,
like USB, BT or WIFI.
Bug: 147323306
Test: CodeInspectionTest, AllInOneTetherSettingsTest, TetherEnablerTest
Change-Id: I1229ffd2dd12b39e9c6e48dc29c6e46ce9ad7634
These controllers extended AbstractPreferenceController, which is not
quite compatible with some of the present framework. Especially for
indexable keys of settings search.
TetherEnabler and AllInOneTetherSettings are refactored based on the
change. Tests are updated.
Bug: 147272749
Test: CodeInspectionTest and other tests of classes touched by this CL
Change-Id: Ic3ad13e735d133c0959a0a309319a6fd5165b015
In AllInOneTetherSettings, we use TetherEnabler to hanle all behavior
related to tethering switch on/off.
In TetherEnbler, add WifiManager.WIFI_AP_STATE_CHANGED_ACTION to cover
all possible tethering state change.
TetherEnablerTest is modified accordingly.
Bug: 147322704
Test: make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=TetherEnablerTest
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=AllInOneTetherSettingsTest
Change-Id: I505b3825f79260983fff9d3935ba834ad8f9f690
This fragment class is created to display Wifi tether settings, Usb
tether settings and bluetooth tether settings within the single "Hotspot &
tethering" screen. By creating a new fragemnt, we can safely change the
UI by replace fragment name in xml file.
Right now, it only supports wifi tether settings and mostly copied from
WifiTetherSettings.java.
Bug: 146447611
Test: AllInOneTetherSettingsTest is created and run.
Change-Id: Icdac0d4930451e6956dbf6ef0f4b65bce96fed3f
These controllers are responsible for persisting preference values and
managing the visibility and switch state. TetherEnabler will be
listening to changes of shared prefernce values and turn on/off
corresponding type of tethering when tethering is on at that time.
Bug: 146582865
Test: tests are created for each controller class.
Change-Id: I7e601b2bd693da59269517d2988bade7475e7f12
This class is created to manage the switch state of overall tethering
state. It can turn on/off each type of tethering based on stored value
in SharedPreference. Also, it listens to data saver state change.
Bug: 145923107
Test: TetherEnablerTest
Change-Id: I7f360329569f53f34cf13065aa0e00ad9b55f659