Commit Graph

22 Commits

Author SHA1 Message Date
Chaohui Wang
2541381259 Fix references to resources for Settings
Bug: 293810334
Test: m Settings
Change-Id: Ie140278f492ef7e1c062ec1ecae2866c521a86aa
2023-08-08 01:56:05 +00:00
Les Lee
c6c6ef3a58 wifi: Handle wifi ap initial state before register intent
The intent WIFI_AP_STATE_CHANGED_ACTION is not sticky intent after
SC-V2, query wifi ap state and run intent handling after registering intent.

Bug: 231214355
Test: make RunSettingsRoboTests ROBOTEST_FILTER=Hotspot
Test: make RunSettingsRoboTests ROBOTEST_FILTER=Tether
Test: Manual test, the state shows correctly even if resume hotspot settings page from recent app.
Change-Id: Iab6b2b8628d725b003d5e5c4086420a329611745
2022-08-25 23:07:40 +08:00
paulhu
6151c227e0 Replace ConnectivityManager hidden symbols on Settings
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
2021-02-24 06:17:17 +00:00
Stanley Wang
b87ddba6cd Use SettingsLib's MainSwitchBar to replace SwitchBar in Settings.
To log Settings metrics, the MainSwitch extends MainSwitchBar and
replace the SwitchBar in SettingsActivity.

Bug: 175181773
Test: Run robotest and apply the widget in Settings and see the ui

Change-Id: I3add3702e9058ad9192b5172c7cf0e2ccfb55a70
2021-01-14 22:48:31 +08:00
Weng Su
b9c865b704 Add Hotspot WPA3 Settings
- Add WPA3 SAE security types
  - "WPA3-Personal"
  - "WPA2/WPA3-Personal"

- Verify valid WPA3 password

- Enable QR code scanner for Hotspot WPA3

- Avoid null point exception when settings keyword searching

- Screenshot
  https://screenshot.googleplex.com/B6u54wh8w35Xnyf
  https://screenshot.googleplex.com/8hWHHUTb6UaS9vB

Bug: 167968488
Test: manual test
- atest WifiTetherSecurityPreferenceControllerTest
- atest WifiUtilsTest

Change-Id: I2992040498f8add107a4cce70a92c1c6ee6ab805
2021-01-10 08:38:39 +00:00
bsears
598ab32345 Revert "Add Hotspot WPA3 Settings"
This reverts commit e0062af10c.

Reason for revert: Bug 176569060 - Droidfood blocking crash in Settings app.

Change-Id: Id50c96e8ce704b19e5ffb9b9a9fcbb0db2d81aee
2020-12-31 21:16:51 +00:00
Weng Su
e0062af10c Add Hotspot WPA3 Settings
- Add WPA3 SAE security types
  - "WPA3-Personal"
  - "WPA2/WPA3-Personal"

- Verify valid WPA3 password

- Enable QR code scanner for Hotspot WPA3

- Screenshot
  https://screenshot.googleplex.com/B6u54wh8w35Xnyf
  https://screenshot.googleplex.com/8hWHHUTb6UaS9vB

Bug: 167968488
Test:
- Manual Test
- atest WifiTetherSecurityPreferenceControllerTest
- atest WifiUtilsTest

Change-Id: I155ed0bfd187d27ba864f9fb1b78d08c437740f3
2020-12-29 08:04:10 +00:00
Bonian Chen
a5f08854e3 [Settings] Inclusive language for Data Usage
Change wordings in data usage part into inclusive language.

Bug: 160707804
Test: make RunSettingsRoboTests
Change-Id: I713e52df8201413b884257a51bc1f71a0d43179d
2020-07-15 02:52:32 +00:00
Arc Wang
b347128bbf [Wi-Fi] Expose AP Band outside of the Advanced section
Design change for UX improvement.

Bug: 156629343
Test: manual visual
Change-Id: I4ff89eec472de699d1fa723d8369ad99b78a83a3
2020-05-18 11:13:47 +08:00
Zhen Zhang
c10ec56e0f Add ethernet tether option into AllInOneTetherSettings
Create controller for ethernet tether preference in
AllInOneTetherSettings and corresponding test.

Test: AllInOneTetherSettingsTest; UsbTetherPreferenceControllerTest;
BluetoothTetherPreferenceControllerTest;
EthernetTetherPreferenceControllerTest;
WifiTetherDisablePreferenceControllerTest; TetherEnablerTest
Bug: 153690620

Change-Id: I8918d5c8a82c521b00eb3c712af80c2041778595
2020-04-20 13:53:58 -07:00
Zhen Zhang
b1d19a8b35 Fix advanced preferences behavior in AllInOneTetherSettings
In AllInOneTetherSettings, advanced preferences should not be hidden
again after user have expanded them.

Bug: 151954343
Test: CodeInspectionTest; AllInOneTetherSettingsTest; manually test oberved advanced preferences won't be hidden.
Change-Id: If2c7d99b7dcac4149f065eca73022a582924c90b
2020-04-06 19:14:41 +00:00
Zhen Zhang
3b53b80715 Fix crash in AllInOneTetherSettings when user is not admin
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
2020-03-24 06:58:41 +00:00
Zhen Zhang
7f2d6ce058 Refactor new tether settings to remove SharedPreferences
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
2020-03-20 13:15:10 -07:00
Arc Wang
005fe6951c [Wi-Fi] Add STA+AP information in Hotspot & tethering footer
Use WifiManager#isStaApConcurrencySupported() to check if a
device supports STA+AP and shows the footer information.

Bug: 121328949
Test: make RunSettingsRoboTests ROBOTEST_FILTER=TetherSettingsTest
      make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherFooterPreferenceControllerTest
Change-Id: I3446abb5cc9cdf76da8d17f5de31bd65715c165c
2020-03-10 18:15:13 +08:00
Zhen Zhang
8e7ab637f3 Remove obsolete TODO in AllInOneTetherSettings
These TODO are for b/147325229 which is obsolete now. Clean them up.
Test: build successful, CodeInspectionTest

Change-Id: Ibae56812810d870e728bbb685c2c3b1ba4fb2866
2020-02-14 18:43:32 +00:00
Zhen Zhang
aef1e8db96 Fix bug: Add some controllers to AllInOneTetherSettings Lifecycle
These controllers are not added to lifecycle as observers, which caused
the preferences are disabled persistently. Adding them explicitly can
fix the issue.

Bug: 149339076
Test: CodeInspectionTest, AllInOneTetherSettingsTest
Change-Id: Ia53e0845ed38f63a9a370488b028966d6a066889
2020-02-11 16:40:43 -08:00
Zhen Zhang
ec966cb7a3 Add tether preferences into AllInOneTetherSettings
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
2020-02-10 23:04:37 -08:00
Zhen Zhang
258fb7f672 Make tether preference controllers extend BasePreferenceController
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
2020-02-05 10:18:57 -08:00
Zhen Zhang
d2a7f9ae79 Use feature flag to show/hide AllInOneTetherSettings
This partially reverts commit 0ccc849de7
which added a config value. Instead, we will use feature flag to switch
between the fragments.

This CL also adds a postfix to keys in all_tether_prefs to
de-duplicate with keys in tether_prefs and wifi_tether_settings.

Bug: 148182953
Change-Id: I92832c786473990065a965409072e4117a7e75a8
Fix: 148618984
Test: make RunSettingsRoboTests
Test: make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
2020-01-30 16:01:42 -08:00
Zhen Zhang
0ccc849de7 Add config value to switch between Tether Settings UIs.
Adding this config value to make it easy to switch to developing
Tethering settings UI. Also, using this config value to make sure
that preferences from new AllInOneTetherSettings screen won't show up in
the search results.

Bug: 147915366
Test: make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=TetherSettingsTest
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=TetehrPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherSettingsTest

Change-Id: I8c88816a8f2b40fc219cae8d0d442454c5270b2b
2020-01-21 07:37:56 +00:00
Zhen Zhang
02dfed6846 Use TetherEnabler in AllInOneTetherSettings to manage master switch
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
2020-01-17 11:11:30 -08:00
Zhen Zhang
b60e8ca294 Create a fragment class for the new "Hotspot & tethering" screen
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
2020-01-12 23:32:44 -08:00