Commit Graph

3230 Commits

Author SHA1 Message Date
Weng Su
a7b13c11cd Disable "Add network" if DISALLOW_ADD_WIFI_CONFIG
- When DISALLOW_ADD_WIFI_CONFIG is not restricted by Admin
  - Disable the preference directly

Bug: 335387874
Flag: EXEMPT bugfix
Test: Manual testing
atest -c AddWifiNetworkPreferenceTest

Change-Id: I0bb08656971107c73d7632a395a820d03723620b
2024-07-05 06:52:36 +08:00
Chaohui Wang
562f56bb7a Use wifiCallingReadyFlow in WifiCallingSettingsForSub
Simply and unify the logic, and fixed a crash.

Fix: 348372605
Flag: EXEMPT bug fix
Test: manual on Wi-Fi calling
Change-Id: Idc7dff934323fbebb09137bbd0585575e65a7867
2024-06-21 16:53:38 +08:00
Kai Zhou
a6c54bc98f Merge "Retrieve WifiDppQrGeneratorFragment at runtime." into main 2024-06-19 06:56:42 +00:00
Kai Zhou
5097783e6e Retrieve WifiDppQrGeneratorFragment at runtime.
* Add getWifiDppQrCodeGeneratorFragment() in WifiFeatureProvider
* WifiDppConfiguratorActivity calls from the FeatureFactory to get WifiDppQrCodeGeneratorFragment instance
* Use a flag to guard this behaviour
* Updated a few private variables of WifiDppQrCodeGeneratorFragment to
  protected so I can access them in derived classes.

Bug: b/338891273
Settings Intake: b/329012096

Test: manual test, override the flag locally, and check I can switch to
overriden implementation.
Flag: com.android.settings.flags.enable_wifi_sharing_runtime_fragment

Change-Id: I715bf89bd9be221f06914e87629c76bf7a2f743f
2024-06-18 07:28:10 +00:00
Treehugger Robot
b3aae5aaf1 Merge "Don't show the Wi-Fi icon when Wi-Fi is off" into main 2024-06-14 03:58:01 +00:00
Weng Su
3b161c23b3 Don't show the Wi-Fi icon when Wi-Fi is off
- Show an empty icon when the Wi-Fi level is unreachable

Bug: 339343274
Flag: EXEMPT bugfix
Test: Manual testing
atest -c SettingsRoboTests

Change-Id: I55f3be145150235b19484e256c35e37f885a1dcf
2024-06-13 20:43:40 +08:00
Chaohui Wang
b0acf0daf5 InternetPreferenceController V2 (7/7)
Support alternateSummary for HotspotNetworkEntry.

Bug: 339884322
Flag: com.android.settings.flags.internet_preference_controller_v2
Test: manual - on Internet
Test: unit test
Change-Id: I6a454e86453ea8ed597a032d3f5769b6cf9102ba
2024-06-13 16:47:01 +08:00
Chaohui Wang
52b5aef999 InternetPreferenceController V2 (2/n)
Add ConnectivityRepository, when no validated connection,
show "Airplane mode is on" or "Networks available".

Bug: 339884322
Flag: com.android.settings.flags.internet_preference_controller_v2
Test: manual - on Internet
Test: unit test
Change-Id: I227d896fd52c099fb6d58a7ab60e98983fdab8cf
2024-06-07 15:28:46 +08:00
Chaohui Wang
efa1f0e3ed InternetPreferenceController V2 (1/n)
Refactor the InternetPreferenceController, migrate to repository and
flow, run data loading on background thread.

Only add Wifi summary for now.

Bug: 339884322
Flag: com.android.settings.flags.internet_preference_controller_v2
Test: manual - on Internet
Test: unit test
Change-Id: Ibd8911bc11b24d4a7e2ef320dea4d38b9c3a864f
2024-06-07 12:28:44 +08:00
Quang Luong
e3fdcad6a2 Merge "Gate dhcp hostname setting behind Wifi V API flag" into main 2024-06-06 08:33:00 +00:00
Quang Anh Luong
dda3dd56cb Gate dhcp hostname setting behind Wifi V API flag
DCHP hostname setting should only be shown if the feature flag for Wifi
V API is enabled.

Bug: 341981620
Test: manual
Change-Id: Iee3740db2513c7071c14361513f7e51199245af0
2024-06-04 22:59:23 +00:00
Quang Luong
d65e37e8a8 Change hotspot security to WPA3-Transition when switching from 6GHz
When changing hotspot to 6GHz, we auto-set the security to WPA3-SAE. However, we don't do the reverse when changing out of 6GHz, which may cause legacy devices to be unable to connect. Instead, always revert back to WPA3-Transition when switching out of 6GHz.

Bug: 323764310
Test: manual
Change-Id: I06b1e97f452da86a693812a6620c251ff5d0e932
2024-06-04 07:48:16 +00:00
Weng Su
8d4eb82d95 Refer the SoftApCapability cache if getUsableChannels is unsupported
- Get SAP band capability from SoftApCapability#getSupportedChannelList

Bug: 272450463
Bug: 338503507
Bug: 340789513
Flag: EXEMPT bugfix
Test: Manual testing
atest -c WifiHotspotRepositoryTest

Change-Id: I7b792c27bc3c41e78417032f797d57b030d6db72
2024-05-28 13:08:45 +08:00
Weng Su
ec4db174a8 Merge "Remove Instant Hotspot from Settings search" into main 2024-05-13 06:54:59 +00:00
Weng Su
3dc7837617 Remove Instant Hotspot from Settings search
- If Instant Hotspot is not enabled then remove it from Settings search

Bug: 339159245
Flag: None
Test: Manual testing
atest -c WifiTetherSettingsTest

Change-Id: I0b1d34c1130b17bfc0f3f0451a10c8aba265733c
2024-05-11 20:00:02 +08:00
Treehugger Robot
8e4223c769 Merge "Revert "Checks WEP password lengths of Wi-Fi network"" into main 2024-05-09 08:00:14 +00:00
Weng Su
2e25a60436 Revert "Checks WEP password lengths of Wi-Fi network"
This reverts commit 1cd3b6f21f.

Reason for revert:
http://b/338298452 Can't connect to WEP network because incorrect passphrase length check  

Change-Id: I4e152a0c89e9ee11b4faa957061b6e9844b1a0c4
2024-05-09 06:49:41 +00:00
Tom Hsu
c495d92a25 Merge "Show dialog on Wifi, and APM' entries in Settings" into main 2024-05-08 04:37:28 +00:00
tomhsu
29b2f16edf Show dialog on Wifi, and APM' entries in Settings
- When satellite mode is switched on Wifi, and APM entry shall show the warning dialog and avoid user uses these functions.

Bug: 337154438
Test: Manual test.
Test: atest pass
Change-Id: I45cd92a8688e7a619613361ea4a8d58a0984d99f
2024-05-08 03:53:32 +00:00
Mill Chen
4c061771b7 Deprecated Wifi panel and relevant objects
Bug: 328529085
Test: robotest
Change-Id: I960718acbdf1d2be6c3b6b396cf2ac69d4aa3046
2024-05-06 22:22:52 +00:00
Weng Su
9245bf0b89 Merge "Don't set the Wi-Fi dialog to the topmost UI" into main 2024-05-06 07:18:49 +00:00
Weng Su
a955648be4 Don't set the Wi-Fi dialog to the topmost UI
- Set Wi-Fi dialog to topmost UI only when called by SysUI

Bug: 293965733
Flag: None
Test: Manual testing
atest -c WifiDialogActivityTest

Change-Id: I9215b3e7f86c0d31fa0c4c492f29032c3d14ad6d
2024-05-03 21:12:54 +08:00
Weng Su
c5ab12732b Add ActivityOptions to start instant hotspot settings in the background
- Set intent with ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_ALLOWED

Bug: 338244101
Flag: None
Test: Manual testing
atest -c SharedConnectivityRepositoryTest

Change-Id: Ie983758dc039a7bbca80cca478ca23444527089b
2024-05-03 04:26:50 +08:00
Weng Su
3c2e22afc8 Restrict WifiAPITest
- Disable Wi-Fi functions below if user has DISALLOW_CHANGE_WIFI_STATE
  - disableNetwork
  - disconnect
  - enableNetwork

Bug: 290612834
Flag: None
Test: Manual testing
Change-Id: I7435b30381401b10fa82b25fb245b1ed12bf3ade
2024-04-19 14:57:33 +08:00
Charlotte Lu
0dd832ec8f Merge "[WIFI-Enterprise] Add Server name field." into main 2024-04-12 06:40:23 +00:00
Charlotte Lu
0a87a1685e [WIFI-Enterprise] Add Server name field.
Test: Unit Test
Fix: 333855426
Change-Id: Idfcb5f4efd36257188b04e2be7c7dc1127681b06
2024-04-12 12:39:55 +08:00
Charlotte Lu
eab9765e52 [WIFI-Enterprise] Change the summary for Certificate Details.
Test: Visual Test
Fix: 333850992
Change-Id: If2d8743f788a0732267ac6576f77bea41b4e2e84
2024-04-11 11:40:30 +00:00
Weng Su
a66a4a0d41 Merge "Checks WEP password lengths of Wi-Fi network" into main 2024-04-11 10:07:11 +00:00
Weng Su
1cd3b6f21f Checks WEP password lengths of Wi-Fi network
- Checks for WEP40 and WEP104 password lengths (5 and 13 bytes)

Bug: 333289235
Flag: None
Test: unit test
atest -c WifiConfigController2Test

Change-Id: I5f96ad67ed0c67a2724960e72464dc0a56c0c1ab
2024-04-11 08:20:17 +00:00
Charlotte Lu
f4adddd29d [WIFI-WEP] Change the strings for WEP.
Test: Visual Test
Fix: 303787048
Change-Id: I674944aee08b8bd3a9185d38b2c76b4ad16061f1
2024-04-11 07:29:11 +00:00
Chaohui Wang
8b36ebf0a1 Set Wi-Fi password typeface to monospace
Instead of input type, which turns this TextView into editable, which is
not expected.

Fix: 318621629
Test: manual - on Wi-Fi Share
Change-Id: Ie1ab0f3f3f12583fc0b0c6eea9880e24364660de
2024-04-09 17:20:41 +08:00
Treehugger Robot
cdd9b78e22 Merge "Restrict WifiDppConfiguratorActivity" into main 2024-04-03 08:18:15 +00:00
Les Lee
1635951de2 wifi: Using framework uri parsing
Bug: 298669190
Test: Manual test. Qr code sacnning works normally.
Change-Id: I8e6138971ae6798b42db32930f80e9113a8c0223
2024-04-03 04:59:22 +00:00
Weng Su
2101258e8a Restrict WifiDppConfiguratorActivity
- Don't show WifiDppConfiguratorActivity if user has DISALLOW_ADD_WIFI_CONFIG

- Don't show AddNetworkFragment if user has DISALLOW_ADD_WIFI_CONFIG

Fix: 299931076
Flag: None
Test: manual test with TestDPC
atest -c SettingsUnitTests:AddNetworkFragmentTest \
         SettingsUnitTests:WifiDppConfiguratorActivityTest

Change-Id: I34afe0f698e2dc43eba59b25f5f3f4f61e70166a
2024-04-03 10:45:43 +08:00
Jason Chiu
c53a73ef70 [Safer intents] Connectivity
To avoid implicit intents, make intents launch explicitly.

Bug: 323061508
Test: build
Change-Id: I44ff8a789d933f11ba7e68e52055575245276224
2024-03-26 16:44:48 +08:00
Charlotte Lu
8cad117210 Merge "Fix certX509 has not been initialized." into main 2024-03-13 06:42:51 +00:00
Charlotte Lu
6693a02a2b Fix certX509 has not been initialized.
Test: Manual
Fix: 329243388
Change-Id: If9507f2aeddc1a5077a39246ac2af2f32b2b94bc
2024-03-13 12:13:30 +08:00
Charlotte Lu
e9ee2c66bb Merge "Add CertificateDetailsPageProvider." into main 2024-03-12 03:31:25 +00:00
Charlotte Lu
458b942a90 Add CertificateDetailsPageProvider.
Test: Unit Test
Fix: 326191189
Change-Id: I542903b26bac589ba67c297d8758ea0a69ebdf23
2024-03-11 17:29:35 +08:00
Charlotte Lu
08f8f0ce9e Add dhcp in advanced settings toggle.
Test: Unit Test
Fix: 329002870
Change-Id: I5c57deb1e8ed0dd59a7699b56f5eb99ca29876b8
2024-03-11 06:47:38 +00:00
Charlotte Lu
7755dc53b9 Add WEP warning dialog disconnect.
Test: Unit Test
Fix: 318797664
Change-Id: I48dd4ad2783ea4b1f03f2b7c7e0f8716cbb59224
2024-02-28 17:51:20 +08:00
Charlotte Lu
8b8a16bc7c Change Privacy into full page.
Test: Visual Test
Fix: 324020620
Change-Id: Ifacbf7eef3b56774c5f891c8cd60ddee2d380632
2024-02-26 04:26:26 +00:00
Nate Jiang
efcf1b7f05 Move to new read only flag
Mainline module can only support read-only flag now

Bug: 325521253
Test: TH
Change-Id: I4514fcd21560f95084ed3c9da1a0a9b13c625c91
2024-02-20 16:14:17 -08:00
Lifu Tang
7a792e0b8f Restrict WifiScanModeActivity when user restriction applies
Bug: 299633613
Change-Id: If8cfb7047c0131da451a7af0d2b5108080876b85
2024-02-03 18:55:47 +00:00
Aishwarya Mallampati
abf2a6ae52 Merge "Disable Wi-Fi calling roaming preferrence while using NTN." into main 2024-02-02 22:40:50 +00:00
Aishwarya Mallampati
aab23344cb Disable Wi-Fi calling roaming preferrence while using NTN.
When phone is connected to non-terrestrial network, carrier can specify
whether to override Wi-Fi calling roaming mode or not using
KEY_OVERRIDE_WFC_ROAMING_MODE_WHILE_USING_NTN_BOOL.

If KEY_USE_WFC_HOME_NETWORK_MODE_IN_ROAMING_NETWORK_BOOL is false,
and if KEY_NTN_EDITABLE_WFC_ROAMING_MODE_BOOL is true and
if KEY_OVERRIDE_WFC_ROAMING_MODE_WHILE_USING_NTN_BOOL is true, then
Wi-Fi calling roaming preferrence is disabled.

Bug: 318871716
Test: atest CarrierConfigManagerTest, atest ImsManagerTest,
atest WifiCallingSettingsForSubTest

Change-Id: I95bf5e6a0f11796e67bd7e6a2c12a331481f8187
2024-02-02 06:34:18 +00:00
Treehugger Robot
5fe4714851 Merge "Restrict WifiDialogActivity" into main 2024-01-26 10:56:00 +00:00
Weng Su
51fa3d798a Restrict WifiDialogActivity
- Don't show WifiDialogActivity if user has DISALLOW_ADD_WIFI_CONFIG

Fix: 299931761
Bug: 314867581
Flag: None
Test: manual test with TestDPC
atest -c SettingsRoboTests:WifiDialogActivityTest

Change-Id: Icbb8f45922ded163208976be9c2816060dcf09f1
2024-01-26 18:01:28 +08:00
Weng Su
3d34250209 Merge "Fix Wi-Fi anonymous ID UI issue" into main 2024-01-23 04:13:12 +00:00
Weng Su
dd1947c078 Fix Wi-Fi anonymous ID UI issue
- Do not reset the anonymous default ID after retrieving the previous value from WifiConfiguration.

Fix: 267517525
Flag: None
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test

Change-Id: Ic10d6953f6657836e18eab6884df2af0f35a20c4
2024-01-23 06:44:46 +08:00