Commit Graph

109 Commits

Author SHA1 Message Date
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
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
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
8b8a16bc7c Change Privacy into full page.
Test: Visual Test
Fix: 324020620
Change-Id: Ifacbf7eef3b56774c5f891c8cd60ddee2d380632
2024-02-26 04:26:26 +00:00
Quang Luong
8edc0b7052 Merge "Use WifiEntry.shouldShowSsid() to show SSID" into main 2023-11-20 08:24:24 +00:00
Quang Anh Luong
0b77afa833 Use WifiEntry.shouldShowSsid() to show SSID
Bug: 300205461
Test: build
Change-Id: Ifd82297cbc6a84b05cbba70e96470ea2a52aaa0e
2023-11-15 07:42:03 +00:00
Sunny Shao
3233c71d6e Tweak the UI display in the IPv6 address
- Replace the PreferenceCategory with Preference.

Fixes: 246489166
Test: SettingsRoboTests:com.android.settings.wifi
Change-Id: Ide4d36e7ad5c0850cd53010c811e01714c1c1f76
2023-11-13 15:46:27 +08:00
Chaohui Wang
8e2e9e5d3e Prevent unnecessary reconnection for wifi privacy
Before fix, privacy toggle in the Network details page causes a
disconnection + reconnection even when selecting the same setting.

Check current setting first to prevent unnecessary reconnection.

Fix: 303093138
Test: manual - select same privacy setting
Test: unit test
Change-Id: I71208e3cd256fdc0dd5e895fa1a68fdab47aed9a
2023-10-07 15:42:35 +08:00
Weng Su
54d0709409 Refresh title in the Network details header
- Since the title information may be updated later, it needs to be refreshed continuously to display the latest results.

Bug: 299514568
Test: manual test
atest -c WifiDetailPreferenceController2Test

Change-Id: I4634c152b550c59bd9854cde1b91da44442aa879
2023-09-15 04:45:25 +08:00
Chaohui Wang
4b686147b6 Clean up WifiDataUsageSummaryPreferenceController
Which is legacy and not finished implemented.

Bug: 295260929
Test: unit test
Test: robo test
Test: manual - on Mobile Settings page
Test: manual - on Network details page
Change-Id: I30ac639c1ba285a74038d5413b63e2c31c6cc8ba
2023-09-06 17:37:02 +08: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
Weng Su
25e20caf00 Show Hotspot informations in Network details settings
- Show Hotspot device type in hearder icon

- Show Hotspot device details informations.
  - Internet source (network type)
  - Battery

Bug: 297346368
Test: manual test
atest -c WifiNetworkDetailsFragmentTest \
         WifiDetailPreferenceController2Test
atest -c SharedConnectivityRepositoryTest \
         WifiNetworkDetailsViewModelTest

Change-Id: I4bd090e00681911c8fac469289fd818237b8c518
2023-08-29 04:06:55 +08:00
Chaohui Wang
0aca2ffbdb Clean up used EntityHeaderController
From DataUsageSummaryPreferenceController and
BatteryHeaderPreferenceController.

There are no entity header UI for these 2 controllers, so no need to
create EntityHeaderController instance.

Bug: 295260929
Test: manual - on mobile settings page
Test: manual - on data usage page
Test: manual - on battery settings page
Change-Id: Ib96c9ae93de31f86434e5203ef4acac3af50e0ef
2023-08-24 14:08:17 +08:00
Chaohui Wang
cdbe5f350d Clean up unused Lifecycle
From DataUsageSummaryPreferenceController.

Bug: 295260929
Test: m RunSettingsRoboTests
Change-Id: I4f1d33d7878a80e10aae908df32cff052762fd62
2023-08-22 14:21:03 +08:00
Chaohui Wang
cc2133ba8e Clean up unused fields from EntityHeaderController
Bug: 295260929
Test: manual - on pages with header
Test: robo test
Change-Id: Icebd63dbb5d3d44b4b46d3bececb8b65b30b4883
2023-08-21 13:58:07 +08:00
Quang Anh Luong
260142b495 Use speed string from WifiEntry
Use speed string from WifiEntry.getTx/RxSpeedString() instead of
creating it from the raw Mbps value.

Bug: 286246206
Test: atest WifiDetailPReferenceController2Test, manually verify speed
string is populated correctly in the Network Details page

Change-Id: I89fa0e387d8ef4a5bbfa14871517273ed77bb0e0
2023-06-26 16:19:49 +09:00
Weng Su
2732be59e5 Show default data SIM in Wi-Fi details when dual SIMs have the same carrier ID
- Because the wifiConfiguration is only save the carrier ID 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

- Show default data SIM in Wi-Fi details settings, when dual SIMs have the same carrier ID

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

Change-Id: I350fe637f506134770ccf316e47c0e225661bb6a
2022-08-11 17:51:51 +08:00
Treehugger Robot
5e49a1ab34 Merge "Fix SIM name in Network Details to show the selected SIM." am: 3bd3f983bf am: 4967e754eb am: f6e91b15da am: 4cfe8b60be am: c00c4b0481
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2181975

Change-Id: Iee0132bdf56d518983c91ec9cf6d8d2727f7fe1f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 19:37:23 +00:00
Treehugger Robot
4967e754eb Merge "Fix SIM name in Network Details to show the selected SIM." am: 3bd3f983bf
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2181975

Change-Id: Ie48078a7c33f40939b9d49140875ec7a02582ed3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 17:41:35 +00:00
Bruno Kremp
b204960ea4 Fix SIM name in Network Details to show the selected SIM.
When dual SIM cards with same Carrier Id inserted, authentication of
SIM base network is via default data SIM. However, SIM name shown in
Network Details is always the one inserted first.
Hence, make SIM name of default data SIM shown in Network Details
preferred to keep consistent with the one used for authentication.

Co-authored-by: Yibo Wang <yibo.x.wang@sony.com>

Test: manual test
Bug: 240732444
Change-Id: Ibd64189d6c25b5a64881a0ad9d40854df93481f4
2022-08-10 15:09:49 +02:00
Chaohui Wang
d59315e7f8 Merge "Fix Wi-Fi "Network usage" and "Privacy" drop down" into tm-dev am: 7a21c9ef1f am: 1bf9ab501c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/18186095

Change-Id: I3f6167d6091cda111074d64eb7d6a0a4d90c8b72
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 16:35:17 +00:00
Chaohui Wang
e0ff6f8dd6 Fix Wi-Fi "Network usage" and "Privacy" drop down
Currently, these are implemented with DropDownPreference, which keeps
disappearing after opening. This is because this page is special, many
other preferences on this page auto refreshed every some seconds,
causing the container RecyclerView to re-render (and a scrollbar is
displayed when re-render happens). This re-renders cause the drop downs
to auto dismiss.

Use ListPreference instead can solve this issue, because
DropDownPreference is extended from ListPreference, this is simple
change.

Fix: 209799515
Test: manual
Change-Id: Ib098922c39d9d6c56d645f12f5884489ea6688be
2022-05-06 10:56:19 +08:00
Quang Luong
168e2f8f4b Use WifiEntry.getBandString() to show band for Frequency preference
Display string for Wifi band is now available via
WifiEntry.getBandString(), so use this for the Frequency preference in
the Network Details page. This API also allows the band string to be
shown for disconnected but in-range networks.

Bug: 190390803
Test: manually verify Frequency preference is populated in Network
Details page for both connected and disconnected but in-range networks.

Change-Id: I83bec35c659a9ba04964675e3d800f1dd051d155
2022-04-20 22:50:18 +00:00
Quang Luong
29bc66a352 Use WifiEntry.getStandardString() for Wi-Fi Type summary
Bug: 222337006
Test: manually verify NetworkDetails page shows Wi-Fi Type
Change-Id: I4576fe083f87f631c5f98c526422544055a9df20
2022-03-31 10:40:02 -07:00
Weng Su
0b82d67a04 wifi data usage: Query wifi usage per configuration
- Updated to use the AllNetworkKeys set instead of NetworkId.

- Fix crash issue when mDataUsageController is not created.

- See b/126299427#comment37 for a screenshot.

Bug: 126299427
Test: manual test
make RunSettingsRoboTests
ROBOTEST_FILTER=DataUsageSummaryPreferenceControllerTest
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiDetailPreferenceController2Test
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiDataUsageSummaryPreferenceControllerTest

Change-Id: I26289fde1f18d97631448edc71e034d33b865cc4
2022-02-11 06:32:04 +08:00
Jason Chiu
2989c50a23 Add highlight menu keys for all toggle pref controllers and custom slices
Bug: 204695404
Test: manual, robotest build pass, unit
Change-Id: Iad2e28ada8ddb766ffa7eff2c8dc581250cbd6f8
2021-11-01 15:00:18 +08:00
Weng Su
29f4a35dea [RESTRICT AUTOMERGE] Add new ACTION_WIFI_DETAILS_SETTINGS to Settings
- Need to export the interface to Quick Settings to launch Wi-Fi Network
details settings.

- Rename WifiNetworkDetailsFragment.class

Bug: 191475923
Test: manual test with the topic CLs.
make RunSettingsRoboTests
atest -c SettingsUnitTests:com.android.settings.wifi \
         SettingsUnitTests:com.android.settings.network

Change-Id: Id2fd8c9b3b113ffbb49168305b05c67392fa4d87
(cherry picked from commit e8a4e13a80)
2021-08-26 04:24:39 +00:00
changbetty
5a23ca7c21 Disable EntityHeaderController animation for item move down issue
EntityHeaderController include the RecyclerView and it has animation by
default. When RecyclerView do the animation first then update the UI, it
will cause the issue.

Bug: 189071671
Test: manaul test
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiDetailPreferenceController2Test

Change-Id: Ieb7e0a8f7658bface9af090ea061ca7265099fcd
2021-06-10 17:37:16 +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
Weng Su
91ac1eb149 [Provider model] Update the Wi-Fi icons in the Settings
- Use the same Wi-Fi icons between "Network details" Settings and
Internet Panel

Bug: 188660580
Test: manual test
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiDetailPreferenceController2Test

Change-Id: Icefc08eb47d2d573e26ff82b6a141cf55ce787c5
2021-05-26 21:50:55 +08:00
Quang Luong
8f421b2dbf Refresh security pref in Network Details page
Security type of WifiEntry may change based on available
scans/configs/the current connection for entries that can support
multiple security types. Refresh the security string every time the
WifiEntry is updated.

Bug: 185914718
Test: manual inspection that connected wifi entry has the correct
security string

Change-Id: I5f3b7274f1e6b68de414493a6619555ee9b17e23
2021-05-10 17:48:53 -07:00
changbetty
e7d468f658 Fix a NPE when forget wifi network
To prevent the null activity. If activity is null, there is no need to
execute.

Bug: 184154325
Test: manual test
      make RunSettingsRoboTests ROBOTEST_FILTER=WifiDetailPreferenceController2Test
Change-Id: I0dc32e7ea2a0d5a3f2a55ad8936578ed9fadd201
2021-05-04 22:26:51 +08:00
TreeHugger Robot
feb811053f Merge "Modify Wi-Fi network details settings to restricted style" into sc-dev 2021-04-12 02:15:52 +00:00
Weng Su
688fa772b9 Modify Wi-Fi network details settings to restricted style
- Show restricted text in guest mode

- Screenshot:
  https://screenshot.googleplex.com/Q5tbzn67EJigpVJ

Bug: 177573895
Test: manual test
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiNetworkDetailsFragment2Test

Change-Id: I64c8d82518d47c7f96802f505efa380c63b9e10c
2021-04-09 23:10:24 +08:00
Wesley.CW Wang
50f314e45d Update StringUtil#formatElapsedTime method (2/3)
- Update the usage and the test case
 - Update discharging string to follow new string doc

Bug: 183689347
Test: make RunSettingsRoboTests
Change-Id: I1e14e7da8cb02755d8cf6e12626a0d94fad87121
2021-04-07 10:19:10 +00:00
Bonian Chen
fecfb7f5e4 Merge "Revert "[Settings] Support getSystemService(Class<T>)"" into sc-dev 2021-03-30 05:31:52 +00:00
Bonian Chen
234b698fb2 Revert "[Settings] Support getSystemService(Class<T>)"
This reverts commit d5ccde31a8.

Reason for revert: failure on test cases

Change-Id: I0a179a6ebb5ef1dec566ce6e8facd5f3b82d7c8a
2021-03-30 00:51:15 +00:00
changbetty
8fcb1f5974 Display WiFi Version number
- Display these type and hide the item in other case
   WIFI_STANDARD_11AX(6) WiFi 6
   WIFI_STANDARD_11AC(5) WiFi 5
   WIFI_STANDARD_11N (4) WiFi 4

-Screenshot
 https://photos.app.goo.gl/BbyZEQFyganEPfuw8

Bug: 117216087
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiDetailPreferenceController2Test

Change-Id: Ic360e501d2e3bd80ce3bcb3ddf529ec5d00c1bcc
2021-03-25 17:29:31 +08:00
Bonian Chen
d5ccde31a8 [Settings] Support getSystemService(Class<T>)
Add getSystemService(Class<T>) to align the capability with framework
part.

This is a back port from aosp/1639943, aosp/1645152 and aosp/1648047

Bug: 179640862
Test: local
Change-Id: I035db55a71f94000ca35f8d71f03c19208423c73
2021-03-24 00:59:46 +08:00
TreeHugger Robot
8bdbdf4b91 Merge "Hide edit menu if network is uneditable" into sc-dev 2021-03-22 01:53:59 +00: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
Weng Su
b7dbd3a911 Hide edit menu if network is uneditable
- Screenshot:
  https://screenshot.googleplex.com/3BhZRBrmQXjeaGL

Bug: 161896161
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiNetworkDetailsFragment2Test

Change-Id: I47ea2cf19e178eff48f23e56903d0daa4ef8fa28
2021-03-18 17:35:25 +08:00
Janis Danisevskis
5cef487b4b resolve merge conflicts of d42d9a41f6 to sc-dev
Change-Id: Ifa6a4af09d7cd45773a8c057416ab90fac23061e
2021-03-17 19:09:29 +00:00
Bonian Chen
203f0fe89d [Settings] Code refactor - remove unused import lines
Remove some unused import lines within source code based on
https://source.android.com/setup/contribute/code-style

Bug: 182867979
Test: build pass
Change-Id: I76dbcfa9e5b435b2838401dfee15b12f472d07d0
2021-03-16 10:24:24 +00:00