Commit Graph

3187 Commits

Author SHA1 Message Date
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
Charlotte Lu
628ebac9e2 Add WEP warning.
Test: Visual Test
Fix: 318797664
Change-Id: Id713ddf2d805b7ce47fe1e620a3273b86cdb3dfe
2024-01-19 04:12:59 +00:00
Sunny Shao
bee65b4109 Merge "Revert^2 "Nullability Annotations replacement"" into main 2024-01-10 08:35:06 +00:00
Sunny Shao
076ed573eb Revert^2 "Nullability Annotations replacement"
This reverts commit 19d1d3d15d.

Reason for revert: revert it because this is not the root cause.

bug: 316867690
Change-Id: I0f168dbb64044aa720202af7b1040afd4f028c9c
2024-01-10 07:34:01 +00:00
Charlotte Lu
8ef68fb1fc Add WEPNetworksPreferenceController.
Test: Visual Test
Fix: 317453032
Change-Id: Ifce83ffa32eeb0d1245b7c5e61c3cad3f85fa14e
2024-01-08 16:45:42 +08:00
Sunny Shao
19d1d3d15d Revert "Nullability Annotations replacement"
This reverts commit cf0501e4d7.

Reason for revert: b/317462033, it seems a flaky but revert it first.

Change-Id: Ie1d5e279cca6477fc17d8c27c1ecda8d7a6b2553
2023-12-29 02:28:24 +00:00
sunnyshao
cf0501e4d7 Nullability Annotations replacement
-- Replace the android.annotation.Nullable / android.annotation.NonNull
   with androidx.annotation.Nullable / androidx.annotation.NonNull

Bug: 316867690
Test: build pass
Change-Id: I0c1da55dfb09ece855151c47e0492d6f46538621
2023-12-20 08:50:09 +08:00
Chaohui Wang
0664d3cc45 Clean up AllInOneTetherSettings
This project is not on-going.

Clean up to help improve latency.

Bug: 311604902
Test: manual - on Network & internet page
Test: robo test
Change-Id: I6addb92e5587206661d1b64bdc56473a85ba9c9f
2023-11-30 12:27:33 +08:00
Chaohui Wang
34c4deb6c9 Clean up Contextual Wifi card
Bug: 245854887
Test: m RunSettingsRoboTests
Change-Id: I3b4ccc076a68eadc11e9fb3d2967a34fe0396cf9
2023-11-27 13:59:33 +08:00
Haijie Hong
e3d823cffd Merge "Skip authentication in Wifi sharing if the device is unlocked recently" into main 2023-11-23 11:42:52 +00:00
Haijie Hong
ec1b13eb72 Skip authentication in Wifi sharing if the device is unlocked recently
BUG: 311168955
Test: atest com.android.settings.wifi.dpp.WifiDppConfiguratorAuthActivityTest
Change-Id: I59674788e04d843541e8fcc3f3305ba295e8d8b1
2023-11-23 10:49:04 +00:00
Weng Su
203931d038 Show Hotspot network in Network & internet settings
- Show Hotspot icons

- Show getAlternateSummary instead of original getSummary

Fix: 308187592
Test: unit test
atest -c InternetPreferenceControllerTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a9ea40dc71362b372c5adc89b82dbe2024253688)
Merged-In: I8afe54edebc904c9ec936f5851a33c6c20f13e29
Change-Id: I8afe54edebc904c9ec936f5851a33c6c20f13e29
2023-11-22 09:58:07 +00:00
SongFerng Wang
2d16858c17 Renew the API getCallState
Since the getCallState was marked as @Deprecated, renew this API as the getCallStateForSubscription. 

Bug: 279852410
Test: build pass

Change-Id: I224164a2d1089483d4f63da1651d7e87296e87f4
2023-11-20 10:49:19 +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
08a1c9876e Revert^2 "Migrate to CompoundButton.OnCheckedChangeListener"
8979681a8d

Change-Id: I60edd3aabf49afbe4aa016af780baa68d928bddf
2023-11-07 14:17:15 +00:00
Sebastian Pickl
8979681a8d Revert "Migrate to CompoundButton.OnCheckedChangeListener"
Revert submission 25147565-onSwitchChanged-CompoundButton

Reason for revert: breaking builds 

Bug:309601476

Reverted changes: /q/submissionid:25147565-onSwitchChanged-CompoundButton

Change-Id: Ie746db87d9c642599593aa3d5e5baf6b7ba89c0e
2023-11-07 13:26:36 +00:00
Chaohui Wang
71d1f021af Migrate to CompoundButton.OnCheckedChangeListener
Switch and SwitchCompat are both CompoundButton.

Using CompoundButton in Java will helps migration in the future.

Bug: 306658427
Test: manual - check Settings pages
Change-Id: If2e08a9a9557ec66a3b31ef18cd2e15943098a59
2023-11-07 20:22:27 +08:00
Quang Luong
d30a19395e Merge "Move to non-static WifiTrackerLib isVerboseLoggingEnabled() methods" into main 2023-11-01 03:26:07 +00:00
Quang Anh Luong
2df8aa26a3 Move to non-static WifiTrackerLib isVerboseLoggingEnabled() methods
Bug: 279512950
Test: build
Change-Id: Id2b7bd9d31efbfb190aaacb8d116842dec5bb168
2023-10-31 09:39:08 +09:00
Chaohui Wang
12ea5afdf1 Not call MainSwitchBar.getSwitch()
This is private implement details, will be removed in future.

Should call MainSwitchBar's isChecked() and setChecked() to ensure
main switch bar's style is set correctly.

Bug: 306658427
Test: manual - on wifi tether
Test: manual - on developer options
Test: m RunSettingsRoboTests
Change-Id: I292ffbcf73da0721fc206e3dac7610a0aeb20047
2023-10-25 13:52:43 +08:00
SongFerng Wang
ae7b0b0996 Merge "Add try-catch for set/get wifiCalling mode" into main 2023-10-24 06:40:24 +00:00
SongFerngWang
5ce87cb03d Add try-catch for set/get wifiCalling mode
The APIs can throw IllegalArgumentExceptionm, the UI need the try-catch.

Bug: 299239773
Bug: 287946939

Test: build pass
Change-Id: I4b413abc985dfa871d3c2d39798b51dc1a686313
2023-10-24 13:47:30 +08:00
Chaohui Wang
15ca95a31b Migrate to TwoStatePreference
SwitchPreference and SwitchPreferenceCompat are both TwoStatePreference.

Using TwoStatePreference in Java will helps migration in the future.

Bug: 306771414
Test: manual - check Settings pages
Change-Id: I84e1d7b09451106797c2b23d127855c6976678ca
2023-10-23 09:28:57 +00:00
Chaohui Wang
a1243188ce Merge "Prevent unnecessary reconnection for wifi privacy" into main 2023-10-13 07:08:45 +00:00
Weng Su
de77e7bf92 Fix NullPointerException in WifiConfigController
- Add null checking for spinners to avoid NullPointerException in Monkey tests.

Fix: 302628103
Test: unit test
atest -c WifiConfigControllerTest

Change-Id: I301163b85b0b87edba9eee2c1b34d5a6104eaaea
2023-10-12 14:45:20 +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
Chaohui Wang
9b4db8d33f Fix & ignore some tests
Fix the followings,
- SimSelectNotificationTest
- WifiCallingSliceHelperTest
- WifiDetailPreferenceController2Test
- WifiDialogActivityTest

Ignore the followings,
- WifiP2pSettingsTest

Fix: 300160894
Test: robo test
Change-Id: I27b6eb61dccbd0688a100154fc77b82a91eede57
2023-09-27 23:45:48 +08:00
Peter Kalauskas
1bb84f9854 Merge "Enable use_resource_processor for all sysui deps" into main 2023-09-22 18:41:27 +00:00
Weng Su
af77327017 Update Battery preference for Instant Hotspot
- Use the static battery full icon

- Show charging status in Battery preference summary

Bug: 300559036
Test: manual test
atest -c WifiNetworkDetailsFragmentTest

Change-Id: I89e811ba0d1b715d4fff23c96bc094cd4270fef7
2023-09-22 12:45:52 +00:00
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