Commit Graph

77 Commits

Author SHA1 Message Date
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
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
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
Charlotte Lu
628ebac9e2 Add WEP warning.
Test: Visual Test
Fix: 318797664
Change-Id: Id713ddf2d805b7ce47fe1e620a3273b86cdb3dfe
2024-01-19 04:12:59 +00:00
Chaohui Wang
0d129f77f0 Remove duplicated metered & privacy spinner
From Wi-Fi dialog when there are already same settings in the Wi-Fi
detail page.
This makes simpler for the user and help fix the inconsistent issue.

Fix: 297036035
Test: manual - open Wi-Fi dialog from Wi-Fi detail page
Test: robo test
Change-Id: Ic02658d91938db78b91e867a923260aa2610ae49
2023-09-04 17:10:17 +08:00
Treehugger Robot
ab4ee23850 Merge "Use ArrayMap to cache active subscriptions" into main am: 29ee574493 am: 565161fb1a am: 47f8568209 am: fc02a337f8 am: 7e297c494a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2704973

Change-Id: Ifda23786d9102042d4beb2ce09b4bfd24f911cbc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-17 02:32:50 +00:00
Treehugger Robot
47f8568209 Merge "Use ArrayMap to cache active subscriptions" into main am: 29ee574493 am: 565161fb1a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2704973

Change-Id: Ic7d2922b78791b84fd7caaee33e91a2ea35acc48
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-16 22:11:01 +00:00
DingFei Song
07f2e22d26 Use ArrayMap to cache active subscriptions
Because we use ArrayMap to deduplicate active subscriptions.
Caching also needs to use ArrayMap, otherwise it will cause
index inconsistency.

Bug: 295124402

Change-Id: I4fa0efd1d35855d0ea7723ad6134213ab384cd4d
Signed-off-by: DingFei Song <v-dingfeisong@xiaomi.corp-partner.google.com>
2023-08-11 10:47:48 +08:00
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
Quang Luong
d6d560ff6e Don't overwrite security params when editing saved config
WifiConfigController2 sets the security params of a saved config, which
may overwrite @hide fields like SecurityParams#mIsAddedByAutoUpgrade. To
prevent this, only set the security params for a new config, and use the
existing security params for existing configs.

Bug: 262312532
Test: atest WifiConfigController2Test
Change-Id: I9ef5eb8ce2b4208e1fad27bd68fc4f0fad7d1008
2023-04-04 00:55:13 +00:00
Weng Su
a346f5b5e2 Initialize Anonymous identity field for TTLS and PEAP EAP methods
- The anonymized identity field will only be displayed for TTLS and PEAP EAP methods

- Initialize the default anonymous identity when it is displayed

Bug: 267517525
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test

Change-Id: I08bd322ff6d86c44298ebd1c4926c0a1363a16ce
2023-02-08 23:42:33 +08:00
Weng Su
c5ec83f1bd Add minimum TLS version for Wi-Fi EAP network
- Remove "TLS v1.3" if device does not support it

Bug: 258372351
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test

Change-Id: If7e41e8c404b4fbf92268afddd92bc6553e60576
2022-12-02 07:06:20 +08:00
TreeHugger Robot
bd13405d8e Merge "Show one SIM only for EAP-SIM when dual SIMs have the same carrier ID" into tm-qpr-dev am: 4a0bc2c34b
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19600285

Change-Id: I81eb13d2c651d25accc69f68afb634882daeca9f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 14:39:14 +00:00
Treehugger Robot
48b4af999a Merge "Fix array-related errorprone warnings" am: a93e78f781 am: a89e7aea3b am: cdacabf984 am: 49a0bbc650 am: ac7a368afd
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2183972

Change-Id: I0ebc25250b00a36bef5a72dd87192013b08e098f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-17 20:53:49 +00:00
Treehugger Robot
a93e78f781 Merge "Fix array-related errorprone warnings" 2022-08-17 18:37:46 +00:00
Cole Faust
a21ac03acb Fix array-related errorprone warnings
The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.

Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Ida6513002f8fd845a385924be290b720f06c4748
2022-08-15 18:52:37 -07:00
Weng Su
028c8f3dbc Show one SIM only for EAP-SIM when dual SIMs have the same carrier ID
- Because the wifiConfiguration save the carrier ID only for EAP-SIM authentication

- If multiple SIMs have the same carrier ID, the Wi-Fi framework will use the default data SIM for EAP-SIM authentication

- To avoid user confusion, show one SIM only when dual SIMs have the same carrier ID

Bug: 233765468
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test

Change-Id: I56f956d20053d314f082ba185d661d8e0a0ef3cb
Merged-In: I56f956d20053d314f082ba185d661d8e0a0ef3cb
2022-08-15 13:25:47 +00:00
Weng Su
66922f4870 Show one SIM only for EAP-SIM when dual SIMs have the same carrier ID
- Because the wifiConfiguration save the carrier ID only for EAP-SIM authentication

- If multiple SIMs have the same carrier ID, the Wi-Fi framework will use the default data SIM for EAP-SIM authentication

- To avoid user confusion, show one SIM only when dual SIMs have the same carrier ID

Bug: 233765468
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test

Change-Id: I56f956d20053d314f082ba185d661d8e0a0ef3cb
2022-08-03 03:33:00 +00:00
Jimmy Chen
bde88c4b8d wifi: add Trust-On-First-Use option for CA
Bug: 196180536
Test: * connect to a EAP-TLS network with TOFU option
      * make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test
Change-Id: I30b55d835bd073d604bddd235f2425bdc8b647af
2022-01-11 17:17:47 +08:00
changbetty
0adb8dc55a To get Display name by active subscription info
Bug: 206601918
Test: manual test and test team verified pass
Change-Id: Id156b3c5c65ff3af25f74721db27f46c08f3543e
2021-12-06 06:40:52 +00:00
Weng Su
caa29d401b Minor change to Wi-Fi WPA3 password length restriction
- Change the maximum length limit to 128

Bug: 200305860
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test

Change-Id: Ia739dab35da75c73e28077ccc81979253def6128
2021-09-20 22:38:29 +08:00
Quang Luong
1c7ba38627 Add 6 GHz Wifi band to Wifi Network Details
Display 6 GHz for the frequency pref in Wifi Network Details
when connected to a 6 GHz network.

Bug: 184170532
Test: build
Change-Id: I7d10fe0e4c95e6f0ec66c3a179c3c46828eeb545
2021-06-07 11:30:07 -07:00
changbetty
916bac8f2e Adding an option to install a certificate from the CA certificate menu
For CA ceritificate we only can install in Network Preferences > Advaned
> Install certificates. So we add the option for user to install when
you setup the wifi network. After you install the certificate, you can
see the certificate in your menu.

Bug: 176998563
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test

Change-Id: I532b12f9277c6a15c649907fa3711c807566c88e
2021-05-26 16:37:14 +08:00
Betty Chang
35e244754c Merge "Assign StaticIpConfiguration builder value to global variable" into sc-dev 2021-05-04 14:04:56 +00:00
changbetty
01cc97f382 Assign StaticIpConfiguration builder value to global variable
[Root Cause]
Due to call by reference for Object, we pass the StaticIpConfiguration
to method. But in method we new the staticIpConfiguration builder
and re-assign builder to parameter, it will release when the method is ended.
The value in Builder will not be set to global variable.

[Solution]
Assign the value in StaticIpConfiguration builder to global variable
directly.

Bug: 186489618
Test: manual test
      make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2Test
Change-Id: I1a6aee31e6977be42792440c3667db2557a20c4e
2021-05-04 14:40:31 +08:00
changbetty
244268b98d Add TextWatcher for the ip config field
[Root Cause]
We always check the valid for the ip config field. If the text is empty
we will set the default for user even if user deleted the values.

[Solution]
Add TextWatcher for the ip config field (include gateway/network prefix
length/dns1). If the text change and the text is empty, we will set the
hint for user, not the default.

Bug: 179331339
Test: manual test
       make RunSettingsRoboTests ROBOTEST_FILTER=WifiConfigController2
Change-Id: I1976200c70ae768285a44aff5df54ced00a78171
2021-04-26 12:53:08 +08:00
Chiachang Wang
003e27d146 Remove hidden connectivity methods access
This commit resolves the hidden methods accesses for
LinkProperties, IpConfiguration and RouteInfo with atlernative
way for the connectivity mainline module preparation.

Bug: 172183305
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
com.android.settings.wifi.details2.WifiDetailPreferenceController2Test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
com.android.settings.wifi.details.WifiDetailPreferenceControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
com.android.settings.UtilsTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
com.android.settings.wifi.WifiConfigController2Test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
com.android.settings.wifi.WifiConfigController2Test

Change-Id: Iec4dab5d9fa12dedcf69a1cfe2a8be0956bc0d79
2021-03-18 14:31:28 +00:00
Chiachang Wang
75014e693d Merge "Replace the hidden ProxyInfo methods usage" am: 2f66e59e05 am: 3ad73342c7 am: 168298f426
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1641827

Change-Id: Ie8f4aad4c3d89e5b06800d61719478d6b4b7afdd
2021-03-18 04:34:00 +00:00
Chiachang Wang
77dc754137 Merge "Replace the way to access StaticIpConfiguration" am: dd61e5d664 am: cda53ebeae am: f60f9ec14c
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1641821

Change-Id: I904f5ec889d40113bf232f7935a98c6da030c9c3
2021-03-18 01:43:58 +00:00
Chiachang Wang
eb16ebd14a Replace the hidden ProxyInfo methods usage
The hidden ProxyInfo methods usage should be replaced because
ProxyInfo is moving to connectivity mainline module. Setting
will not be able to access it. Replace the usage with
corresponding APIs.

Bug: 172183305
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
      com.android.settings.wifi.WifiConfigControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
      com.android.settings.wifi.WifiConfigController2Test
Test: manually update proxy from setting and check the result
Change-Id: I59192d0d5d38c833eb83cc930e358a738ebe3d13
2021-03-17 12:47:22 +00:00
Chiachang Wang
b16da1a9ca Replace the way to access StaticIpConfiguration
StaticIpConfiguration is a part of incoming connectivity
mainline module. The hidden variable is not accessible for
module outside. The caller should use getter and builder
to access it. Replace the usage with the formal way.

Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
      com.android.settings.wifi.WifiConfigControllerTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=\
      com.android.settings.wifi.WifiConfigController2Test
Change-Id: I2ccd427ba19a4ec7df863c38ee0b34cf0be87fa5
2021-03-17 11:30:11 +00:00
TreeHugger Robot
3dacd0209c Merge "Change ScrollView to NestedScrollView for wifi_dialog" into sc-dev 2021-03-09 08:03:05 +00:00
Arc Wang
12d9d5e85a Change ScrollView to NestedScrollView for wifi_dialog
After enabling collapsing toolbar, ScrollView is not working with
CoordinatorLayout. So we need to update it to NestedScrollView to make
it work with CoordinatorLayout.

Bug: 182221182
Test: make RunSettingsLibRoboTests ROBOTEST_FILTER=com.android.settingslib.wifi
      manual visual
      In Settings -< Network & internet -> Wi-Fi -> Add network,
      select enterprise type and scroll the screen.
Change-Id: Ie9de753ee198409275e818a123b5ba7f9b6a1e26
2021-03-09 14:25:37 +08:00
Jimmy Chen
e82e80450c wifi: add WPA3 Enterprise entry in "Add network"
Bug: 174569407
Test: checked UI manually and stored configurations.
Change-Id: I8a05bbb11e4a363c39a71d26513caf727d228b36
2021-03-05 03:06:17 +08:00
Janis Danisevskis
e92bcb3287 Keystore 2.0: Update Wifi settings to use mostly public keystore API.
Test: N/A
Bug: 171305607
Bug: 171305388
Merged-In: Ib794c5f2d904c2b187d7d5fd00b81afc852d0052
Change-Id: Ib794c5f2d904c2b187d7d5fd00b81afc852d0052
2021-03-03 22:30:35 -08:00
Janis Danisevskis
93af3137fc Keystore 2.0: Update Wifi settings to use mostly public keystore API.
Test: N/A
Bug: 171305607
Bug: 171305388
Merged-In: Ib794c5f2d904c2b187d7d5fd00b81afc852d0052
Change-Id: Ib794c5f2d904c2b187d7d5fd00b81afc852d0052
2021-02-25 17:40:19 -08:00
Chiachang Wang
2fe30b6403 Merge "Replace NetworkUtils methods" am: 3dd1c29aee
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1571848

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4419b7cc320726dbac4c324f6ce5c42434322fc7
2021-02-24 00:16:42 +00:00
Chiachang Wang
0f40c023f6 Replace NetworkUtils methods
NetworkUtils is moved to connectivity mainline module which is
not accessible for module outside. getNetworkPart() method is
used by wifi lib and Settings but no usage inside the module,
so move the method to framework lib to share with wifi lib and
Settings.

Also, NetworkUtils.numericToInetAddress() method is also hidden
and deprecated. It should be replaced by
InetAddresses.parseNumericAddress().

Update the corresponding usage to refer to these methods.

Bug: 172183305
Test: atest SettingsRoboTests
Change-Id: I8240b1c74b53d5d66850d9a3ec7d5e5c11558e6a
Merged-In: I2fb674e0d7da0b11ba70177853fd6259bce372a3
2021-02-22 15:35:17 +08:00
Xin Li
ad3fa60e26 Merge ab/7061308 into stage.
Bug: 180401296
Merged-In: I35fe00aeeb112d5d9971985619e3ec5095dcdb7b
Change-Id: I07d008e38827280c9e9c6b7fa31393309f9de8a3
2021-02-21 09:25:11 -08:00
Chiachang Wang
384b88e3fb Replace NetworkUtils methods
NetworkUtils is moved to connectivity mainline module which is
not accessible for module outside. getNetworkPart() method is
used by wifi lib and Settings but no usage inside the module,
so move the method to framework lib to share with wifi lib and
Settings.

Also, NetworkUtils.numericToInetAddress() method is also hidden
and deprecated. It should be replaced by
InetAddresses.parseNumericAddress().

Update the corresponding usage to refer to these methods.

Bug: 172183305
Test: atest SettingsRoboTests
Change-Id: I2fb674e0d7da0b11ba70177853fd6259bce372a3
2021-02-04 02:14:17 +00:00
Aaron Huang
f31cb783da Merge "Replace @hide API with public API" am: d52cff9b57 am: 3178dfc76a am: 68bdb8e8b8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1566248

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I71dd0c79cdf216746d57ea6686c3d8141c721a57
2021-02-03 10:23:59 +00:00
Aaron Huang
68bdb8e8b8 Merge "Replace @hide API with public API" am: d52cff9b57 am: 3178dfc76a
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1566248

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1a1b589342e82b22a5a5a960fe94feaca2505adc
2021-02-03 09:35:49 +00:00
Aaron Huang
3bb961affd Replace @hide API with public API
ProxyInfo is inculded in framework-connectivity module
which should not have external dependencies on its hidden API.
Thus, migrate getExclusionListAsString to getExclusionList.

Bug: 178777253
Test: build
Change-Id: I64b9d5be062bec43c7be3ea68d1f63054319df2d

Change-Id: I400df793fc669d0e574fb4cf022d021d99859d53
2021-02-01 19:16:23 +08:00
Jeremy Goldman
9d87cd9126 SubscriptionsPreferenceController shows the unique sim description.
Bug: 148303118
Bug: 150370656
Test: atest -c SubscriptionsPreferenceControllerTest
Change-Id: I041536fe0148087a068c6000383b382b0ff4e17c
2021-01-22 07:02:52 +00:00
Yan Zhu
460c2cbc0f Clean up split system user code in packages/apps/Settings/
Remove legacy code belonged to Andrometa project. Split system user
feature is always turned off now.

Bug: 137101239
Test: build, sync and reboot
Change-Id: Ieb84a6e131383dcd263a5d9b29a49dc64d905fe0
2021-01-12 16:57:49 -08:00
Weng Su
224948fd7e Fix the bug of losing Wi-Fi certificate when editing
- When the saved certificate is loaded into the UI, the EAP method
spinner will trigger a redundant item selection event to refresh the
certificate to the default value.

- Filter out redundant item selection event of the EAP method spinner.

- Analysis report:
  https://docs.google.com/document/d/1uzyO0NQsT0PVT-ZKbWtDTt4KRXvm3L994MmZTXZ4d5Y/edit?usp=sharing

Bug: 161569880
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=WifiConfigController2Test
Merged-In: I947fb7668ffa7e9ed8c150fe14e6ae9d7a67393c
Change-Id: I00b73b4bfc078aca37396aab4c802a3de64318cf
2020-11-13 07:32:34 +00:00
Weng Su
c95baa2317 Fix the bug of losing Wi-Fi certificate when editing
- When the saved certificate is loaded into the UI, the EAP method
spanner will trigger a redundant item selection event to refresh the
certificate to the default value.

- Filter out redundant item selection event of the EAP method spanner.

Bug: 161569880
Test: make RunSettingsRoboTests
ROBOTEST_FILTER=WifiConfigController2Test
Change-Id: I947fb7668ffa7e9ed8c150fe14e6ae9d7a67393c
2020-11-12 04:05:34 +00:00
TreeHugger Robot
edd587c2a6 Merge "[Wi-Fi] Support multi-SIM for SIM dependent EAP methods" into rvc-qpr-dev 2020-08-07 11:37:27 +00:00
Arc Wang
b3952b0826 Merge "[Wi-Fi] Remove 'Do not validate' option in CA certificate spinner" 2020-08-01 02:32:08 +00:00