Commit Graph

3150 Commits

Author SHA1 Message Date
Peter Kalauskas
80e914a263 Enable use_resource_processor for all sysui deps
This will make the build faster

Test: m checkbuild
Bug: 295208392
Change-Id: If75acb6b1c3f204e3686c20cef609f7cfabe15cf
2023-09-21 23:09:39 +00: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
Chaohui Wang
6e7b06f18e Clean up deprecated WifiSettings
Replace all references to NetworkProviderSettings.

Bug: 297036035
Test: robo test
Test: manual - on internet settings
Change-Id: I2a5ae5644042c982c2a284a303257896c20b7714
2023-09-01 13:24:29 +08:00
Chaohui Wang
b1ecd0e392 Migrate WifiDialog2 to Kotlin
Bug: 297036035
Test: unit test
Test: manual - on wifi dialog
Change-Id: I5bcd636705b8514fe3fd784ef380f55e079c6ce7
2023-09-01 11:15:14 +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
Treehugger Robot
e23bb57fdf Merge "Show Hotspot network icon (Wi-Fi Slice)" into udc-qpr-dev am: f5023f3805 am: e456621260
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24533568

Change-Id: Ie548f74405de03e73686abbd13f3fc4bb308209c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-24 14:09:35 +00:00
Treehugger Robot
e456621260 Merge "Show Hotspot network icon (Wi-Fi Slice)" into udc-qpr-dev am: f5023f3805
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24533568

Change-Id: I2e20d12d78888908c8d1fe53043b4b6aec719c76
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-24 13:26:55 +00: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
Weng Su
c826558805 Show Hotspot network icon (Wi-Fi Slice)
- Show Hotspot device type icons without signal strength (no Wi-Fi level)

Bug: 268550769
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiSliceTest

Change-Id: I2a707cf20fc1a6d519ef5ca54db64e913daec969
2023-08-24 11:54:05 +08:00
Treehugger Robot
eafc4034d3 Merge "Add Instant hotspot preference" into udc-qpr-dev am: 67d5cb42e9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24483137

Change-Id: I345ec2843e47be6ba23b64807eb1b23ad479738a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-22 15:00:02 +00:00
Chaohui Wang
adc24bca63 Merge "Clean up unused Lifecycle" into main 2023-08-22 10:36:32 +00: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
Weng Su
27b3821313 Add Instant hotspot preference
- Add Instant hotspot preference to Wi-Fi hotspot settings

- Wait onServiceConnected callback and then getSettingsState

- Use the PendingIntent provided by SharedConnectivitySettingsState to launch Instant hotspot settings

Bug: 268550769
Test: manual test
atest -c WifiTetherSettingsTest
atest -c WifiTetherViewModelTest \
         SharedConnectivityRepositoryTest

Merged-In: I343599e6127d9b1cb4af661dcc80a8683589c7b8
Change-Id: I343599e6127d9b1cb4af661dcc80a8683589c7b8
2023-08-21 12:21:25 +00:00
Weng Su
63321a1a83 Add Instant hotspot preference
- Add Instant hotspot preference to Wi-Fi hotspot settings

- Wait onServiceConnected callback and then getSettingsState

- Use the PendingIntent provided by SharedConnectivitySettingsState to launch Instant hotspot settings

Bug: 268550769
Test: manual test
atest -c WifiTetherSettingsTest
atest -c WifiTetherViewModelTest \
         SharedConnectivityRepositoryTest

Change-Id: I343599e6127d9b1cb4af661dcc80a8683589c7b8
2023-08-21 11:14:04 +00: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
Oli Thompson
974bb9ba9f Merge "Add show emergency button call to biometric prompt" into main 2023-08-18 17:54:34 +00: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
7e297c494a Merge "Use ArrayMap to cache active subscriptions" into main am: 29ee574493 am: 565161fb1a am: 47f8568209 am: fc02a337f8
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2704973

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

Change-Id: I32983b0b8ef21c1630b475ec02bd65c8166699b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-16 22:56:33 +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
Oli Thompson
111b073ca9 Add show emergency button call to biometric prompt
useDefaultSubtitle has to be set explicitly from promptInfo rather than being assumed true

remove subtext for managed profile challenge screen to create space for emergency call button

Test: manually tested
Bug: 286391641
Bug: 286422726
Change-Id: I848e00dcd0013124e59ef711c3615e6773c3d210
2023-08-15 16:52:36 +00:00
Kohsuke Yatoh
c06c74af17 Merge "Define "Add network" preference in XML." into main 2023-08-15 14:39:28 +00:00
Kohsuke Yatoh
bdfab1de26 Define "Add network" preference in XML.
Move the definition from Java to XML, so that SearchIndexProvider can
include it in the getXmlResourcesToIndex().
Also update getNonIndexableKeys() to return the corresponding key when
the preference is hidden.

If the Internet settings are restricted, "Add network" still appears on
search. When clicked, it opens the Internet settings page in restricted
mode, so that users can know that the settings are restricted.

Bug: 224421762
Fix: 224421762
Test: atest SettingsRoboTests:NetworkProviderSettingsTest
Change-Id: Ie9ea58070843a390844b461ce766f0ce29e64fab
2023-08-15 11:41:05 +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
chelseahao
3ecc87b345 Created a new activity in settings App.
This activity displays a WifiDppQrCodeGeneratorFragment after unlocking. This will be used by the new "Share Wi-Fi" button in quick settings InternetDialog.

Bug: 294487249

Test: atest com.android.settings.wifi.dpp.WifiDppConfiguratorAuthActivityTest
Change-Id: I58b61f597db67082f23a1acb4fae5a4556238584
2023-08-10 05:35:47 +00:00
Chaohui Wang
8e2ae547d6 Clean up FeatureFactory.getFeature()
Bug: 286764889
Test: m Settings
Change-Id: I7e472e6b0ca6b7a735c1b92742ddf06c545176fc
2023-08-08 08:41:48 +00:00
Chaohui Wang
0062308347 Merge "Fix references to resources for Settings" into main 2023-08-08 08:40:42 +00:00
Treehugger Robot
cee9631614 Merge "Refersh saved Wi-Fi networks" into main 2023-08-08 02:29:39 +00: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
Wenhui Yang
ed505c25fa Merge "Add bp subtitle for WiFi sharing" into udc-qpr-dev am: c2b7914778 am: b41875eff3
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24211335

Change-Id: I413b6692409ca97f48f6c68ad99b894d12e4734a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-07 20:33:36 +00:00
Wenhui Yang
b41875eff3 Merge "Add bp subtitle for WiFi sharing" into udc-qpr-dev am: c2b7914778
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24211335

Change-Id: Ie562c88a61db12214c11ee18361781f439abb12c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-07 20:13:10 +00:00
Wenhui Yang
c2b7914778 Merge "Add bp subtitle for WiFi sharing" into udc-qpr-dev 2023-08-07 19:55:44 +00:00
Matt Casey
2710d5a85f Merge "Remove dependency on ChooserActivity resources" into udc-qpr-dev am: 39715d3023 am: 3362abc551
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24265323

Change-Id: I95a7256b5488b7847ebd348c455162fa08a2c3cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-07 19:47:09 +00:00
Matt Casey
3362abc551 Merge "Remove dependency on ChooserActivity resources" into udc-qpr-dev am: 39715d3023
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24265323

Change-Id: I44f59ffc7c97affb13fda2151f950a3844a72d90
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-07 18:48:10 +00:00
Matt Casey
39715d3023 Merge "Remove dependency on ChooserActivity resources" into udc-qpr-dev 2023-08-07 17:56:15 +00:00
Weng Su
1962145282 Refersh saved Wi-Fi networks
- Refresh existing saved networks with the same key of WifiEntry

- Update Wi-Fi icon when connection status changes

Bug: 290644817
Bug: 291032267
Bug: 293468313
Bug: 294866208
Test: Manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiEntryPreferenceTest
make RunSettingsRoboTests ROBOTEST_FILTER=SavedAccessPointsPreferenceController2Test

Change-Id: Ifadfb7c46edf8eda32e4ff5dcb6bb3ff086447c8
2023-08-07 17:49:04 +00:00
Chaohui Wang
79a978989f Revert^2 "Clean up unused WifiManager.ActionListener"
This reverts commit c4a0abef8c.

Reason for revert: The original is not the root cause.
Root cause is b/294378814

Change-Id: Ib44ad912073b0f1b06c7ef6b6b998581eef65784
2023-08-07 04:22:56 +00:00
Etan Cohen
726bda1d98 Merge "Fix WiFi (ZX or DPP) QR code parsing to ignore leading spaces" into udc-qpr-dev am: dca9c6b88f am: a20cb88cf6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24285925

Change-Id: Ib3aa9df47d9fa91a2fa56c6d771b9da0c9d512f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-05 01:15:16 +00:00
Etan Cohen
a20cb88cf6 Merge "Fix WiFi (ZX or DPP) QR code parsing to ignore leading spaces" into udc-qpr-dev am: dca9c6b88f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24285925

Change-Id: I687e5e85223d2b96d60667b1c203bd7264935cc2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-05 00:27:43 +00:00
Etan Cohen
dca9c6b88f Merge "Fix WiFi (ZX or DPP) QR code parsing to ignore leading spaces" into udc-qpr-dev 2023-08-04 23:36:38 +00:00
Weng Su
de6eb9100f Show policy transparency dialog for Wi-Fi network restrictions am: 28be567a83 am: cac69880ae
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24156648

Change-Id: I8c69cfc85156917c0223817fe4409f9b6357f05c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-04 17:14:21 +00:00
Weng Su
cac69880ae Show policy transparency dialog for Wi-Fi network restrictions am: 28be567a83
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24156648

Change-Id: I5e5ebdc0aedc686e7a4257458d68592ea51c883b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-04 16:36:08 +00:00
Weng Su
28be567a83 Show policy transparency dialog for Wi-Fi network restrictions
- In order to support various user restrictions of individual Wi-Fi networks, WifiEntry provides the hasAdminRestrictions method for unified management.

- Settings will refer to WifiEntry#hasAdminRestrictions to restrict individual Wi-Fi networks.

Bug: 289448751
Bug: 289951241
Test: manual test
atest -c LongPressWifiEntryPreferenceTest

Change-Id: Iae5996a87ee72a3073300c7f62dfa14a9f31c21d
2023-08-04 07:18:28 +00:00
Etan Cohen
0fb1a3b3a7 Fix WiFi (ZX or DPP) QR code parsing to ignore leading spaces
Increase robustness of QR code parsing: while leading spaces aren't
expected (or allowed) they are observed in the wild and can be safely
ignored.

Bug: 292331368
Test: validated that QR code with scan is now parsed correctly
Test: atest WifiQrCodeTest
Change-Id: Ifff79870bea2ec9924f7b2e8100c2c01fd350846
2023-08-03 14:25:38 +00:00
Martin Stjernholm
c4a0abef8c Revert "Clean up unused WifiManager.ActionListener"
This reverts commit a2adee5362.

Reason for revert: Breaks build - b/294364808

Change-Id: I4f323c2fc43dddbf2f2dd0e323f026727263c99e
2023-08-03 13:46:27 +00:00
Chaohui Wang
a2adee5362 Clean up unused WifiManager.ActionListener
Bug: 285231003
Test: m Settings
Change-Id: I84ec6a76e486df207140c0f5cbda1c6727fe4989
2023-08-02 15:08:04 +08:00
Wenhui Yang
cf8ba456bb Add bp subtitle for WiFi sharing
Move the screen lock message selection logic to Utils and update the
related strings as suzannechen@ suggested.

Test: manual (see bug)
Test: atest UtilsTest
Fixes: 291307701
Change-Id: I346c25426395eea1320edc07ce2d962efeb8daa6
2023-08-01 21:11:33 +00:00
Charlotte Lu
98608f5ca6 Password on wifi sharing screen is NOT monospace.
Difficult to distinguish I from l in the password display on the wifi sharing screen.

Fix: 266182587
Test: Visual Test

Change-Id: Iea266fa17edcdf08f161429a44e6c24051084fdd
2023-08-01 08:52:16 +00:00