Commit Graph

2603 Commits

Author SHA1 Message Date
Treehugger Robot
6aac1cba28 Merge "Clean up BT stack log level preference controller and tests" into main 2024-07-23 02:45:25 +00:00
Treehugger Robot
2db5d1618f Merge "Show less secure warning in Network details settings" into main 2024-07-15 08:00:42 +00:00
Weng Su
05b28d24c3 Show less secure warning in Network details settings
- Show warning when device connected to WEP protocol

Bug: 331973632
Flag: EXEMPT bugfix
Test: Manual testing
atest -c WepLessSecureWarningControllerTest

Change-Id: I54a9bafb2c672db44d47259d6acc49c02046cb81
2024-07-15 14:51:25 +08:00
Vincent Wang
8d235a2fc8 Merge "Remove package biometric2 from AOSP settings" into main 2024-07-15 05:00:06 +00:00
Sal Savage
da2e2c3e4a Clean up BT stack log level preference controller and tests
Problem: These tests were failing because the resource ID used in the
test and its version of the R class resolved to a different integer
(and subsequently a different string array) than the R class used on
device. This was causing different string arrays with different lengths
and values to sometimes appear, especially when the source and tests
were builts separately.

Solution: Manually lookup the resource ID to use by name instead of
using the pre-baked R class and assuming its ID is correct. This allows
us to get the proper ID every time and trust the values in the array.
This trust allows for some clean up on the code and tests, such that now
our tests can iterate on values instead of relying on private constants
being made visible or even hardcoded values.

Flag: EXEMPT, test fix and minor refactor with no behavior change
Bug: 339148064
Test: atest com.android.settings.development.bluetooth.BluetoothStackLogPreferenceControllerTest
Change-Id: I8149bd06ed70589afb3797a9f453eb2a11c3c410
2024-07-11 15:11:06 -07:00
Chaohui Wang
cd4cf67422 Clean up SubscriptionInfoEntity unused fields
It's safe since MobileNetworkDatabase is in memory only.

Bug: 348118234
Flag: EXEMPT clean up
Test: manual - check Mobile Settings
Change-Id: If170c65f4d0dfdc42c1cec9a56e25c516db4f75e
2024-07-11 04:15:37 +00:00
Vincent Wang
e9c4adfaf1 Remove package biometric2 from AOSP settings
Flag: EXEMPT Remove legacy code from AOSP
Bug: 351977012
Test: Build pass
Change-Id: I2285ab8cc2776071c329d7432849aeffc28ed8ee
2024-07-11 00:06:41 +00:00
mxyyiyi
a954e914dd Add a flag to protect overwrite app optimization mode to restricted mode.
- Skip set app optimization mode to restricted if the flag disabled.

Bug: 348192536
Fix: 348192536
Test: atest
Flag: EXEMPT bug fix
Change-Id: I92d320ce1edfe9b7044afdcd058651b0d54bd6bd
2024-07-01 17:38:50 +08:00
Kyle Zhang
febb0822a0 Merge "Keep FakeFeatureFlagsImpl" into main 2024-06-28 05:25:10 +00:00
Chaohui Wang
b8ad25f8bd Clean up MobileNetworkInfoEntity unused fields
It's safe since MobileNetworkDatabase is in memory only.

Bug: 348118234
Flag: EXEMPT clean up
Test: manual - check Mobile Settings
Change-Id: I25141a87b9afb42b85d73cbcd7307b899b3f0a3b
2024-06-27 17:30:19 +08:00
Kyle Zhang
7dbe6517ec Keep FakeFeatureFlagsImpl
* Keep FakeFeatureFlagsImpl.
* Use EnableFlags and DisableFlags annotation
* Switch back from `assumeTrue` to `assert` when flag is enabled or disabled.
* Remove flag rollback test.

Bug: 342830919
Change-Id: Ic9b3438f3f0e31e64d5405ed81903b352195714a
2024-06-27 08:46:17 +00:00
Chaohui Wang
b70c805717 Fix unable to erase eSIM
Before this change,
- eSIM will be erased twice, one with result callback and one without
  result callback.
- During reset, ResetNetworkConfirm could interrupted by subscription
  invalid event, which happens during reset.

After this change,
- eSIM will be erased only once, result callback is registered
  separately.
- Explicit exit the page when reset finish, and ignore the subscription
  invalid event after reset started.

Bug: 328293508
Flag: EXEMPT bug fix
Test: manual - dry run the reset
Test: ResetNetworkConfirmTest
Change-Id: I51395a556b1c8775192d5897a87f13046c042578
2024-06-26 11:02:56 +08:00
Oleg Blinnikov
b3926bdf35 Merge "Added External Display settings page" into main 2024-06-25 15:01:01 +00:00
Oleg Blinnikov
a6016e6552 Added External Display settings page
Settings page to show rotation, resolution,
enable/disable display settings for
external and overlay displays. In case
persist.demo.userrotation.package_name
sysprop is set, then the virtual
display with this will also be shown.

In case there is only one allowed display
available, then this display will be
shown right away. When there are more
than 1 displays available, then the list
of displays will be shown.

Change-Id: I186667aaba94ed6befec3a98f4a87f2b2d1f1859
Test: atest ExternalDisplayUpdaterTest
Test: atest ExternalDisplayPreferenceFragmentTest
Test: atest ResolutionPreferenceFragmentTest
Test: atest ConnectedDeviceGroupControllerTest
Bug: 340218151
Bug: 294015706
Bug: 253296253
Flag: com.android.settings.flags.rotation_connected_display_setting
Flag: com.android.settings.flags.resolution_and_enable_connected_display_setting
2024-06-25 13:41:10 +00:00
Chaohui Wang
cfd401b04e Fix crash in RoamingPreferenceController
With new MobileDataRepository.isDataRoamingEnabledFlow() to provide
the data instead of MobileNetworkRepository.

Fix: 347224962
Flag: EXEMPT bug fix
Test: manual on Mobile Settings
Test: unit test
Change-Id: I2a994cb11c93296fb46558f566d6d4467ba4c846
2024-06-21 04:39:44 +00:00
Chun-Ku Lin
764f8d73a4 Don't show the QuickSetting tooltip when we stopped auto add qs tile for
the user

Bug: 348110750
Test: atest ReduceBrightColorsPreferenceControllerTest
Test: manual
- Go to Settings > Accessibility
- Turn on Extra dim for the first time
- Verify the QS tooltip prompt doesn't show up
Flag: android.view.accessibility.a11y_qs_shortcut

Change-Id: I6fecb818df3bb865ba81cbcda94149a98d8255ab
2024-06-20 23:36:03 +00:00
Rambo Wang
5ac9d9c8fa Fix Settings restart during Reset mobile nework settings flow
This CL avoids restarting Settings in the reset mobile flow when phone
process is restarted, by switching the usage of the stable content
provider connection to the unstable client.

The CL also arranges restarting phone process as the last reset
operation in the flow (later than RILD reset) to avoid any reset
operation get impacted by phone process restarting.

Since the permission to protect the TelephonyContentProvider has been
renamed, the CL also renames the requsted permision.

Bug: 347047105
Test: atest ResetNetworkOperationBuilderTest
Test: Reset mobile network feature test
Flag: EXEMPT resource update with minor refactoring
Change-Id: I7bfa79bc9d7451a4a03269704b0009a3730e287f
2024-06-19 14:41:19 +00:00
mxyyiyi
08907935df Add flag to force expire the app optimization mode event.
Bug: 347444433
Test: atest
Change-Id: Id502607ed6c07870d14346656a65ceccb756b78f
2024-06-17 17:04:05 +08:00
songferngwang
f462b0278d Fix test case failed
Bug: 342830152
Test: run atest SettingsUnitTests:com.android.settings.network.NetworkProviderCallsSmsFragmentTest
Change-Id: I4c3b065995de0b6c9935c34644d1f9fa47357749
2024-06-14 08:16:00 +00:00
Olivier Nshimiye
2dc4310630 Merge "Remove settings tasks on private space deletion" into main 2024-06-13 09:47:49 +00:00
Olivier Nshimiye
38a08fe98d Remove settings tasks on private space deletion
Bug: 342074934
Test: atest PrivateSpaceMaintainerTest
Test: Manual on device

Change-Id: Ic0555583ae0d7ea5650d819f1fccbd022b1d64c2
2024-06-12 15:40:43 +00:00
Rambo Wang
98920c3714 eSIM profile is not erased during Reset mobile network settings flow
The CL fixes the bug that eSIM profile is not erased even if user
choose to erase eSIM during Reset Mobile Network Settings flow.

The issue was introduced when adding background operations to
restart Phone process and RILD. Restart Phone process performed earlier.
It may interrup the previous reset operations (e.g. eSIM erasing).

The fix here is to arrange reset Phone and RILD in the end of the flow,
only performed after all other reset operations.

Bug: 345854350
Test: atest ResetNetworkOperationBuilderTest
Test: Manual regression test
Change-Id: If2bd492d417a07a7056bf9fd0d051f8811ba6369
2024-06-11 18:18:15 +00:00
Joshua Mccloskey
f567d19681 Merge "Biometrics Enrollment refactor (7/N)" into main 2024-06-07 18:23:56 +00:00
Weng Su
ca13280e56 Fix Wi-Fi calling test case
Fix: 337417499
Flag: TEST_ONLY
Test: atest passed
atest -c NetworkProviderWifiCallingGroupTest

Change-Id: I2d57287a85075685b0bdb35a59dc8b147e90d38c
2024-06-06 21:39:00 +00:00
Joshua McCloskey
584b6c9e96 Biometrics Enrollment refactor (7/N)
This cl moves the creation of repos and interactors to the
SettingsApplication.
Bug: 297082837
Test: atest

Change-Id: I9049da6f03bb1dc18d4186961444bf613d773d0e
2024-06-05 18:18:59 +00:00
YK Hung
8d6c004a7c Merge "Clear app optimized mode sharedpreferences when Reset all app preferences." into main 2024-06-05 15:52:53 +00:00
Jigar Thakkar
d9b417cd72 Merge "Hide private space settings app post setup" into main 2024-06-05 11:44:42 +00:00
mxyyiyi
35282888d9 Clear app optimized mode sharedpreferences when Reset all app preferences.
- Clear events when user click Settings > Apps > All apps > top-right button > "Reset app preferences"
- Update AppOptModeSharedPreferencesUtilsTest from robotest to unit test.

Bug: 338965652
Test: atest + manual
Change-Id: Ib0a1bd113ab31fea247e5a5430ab35b252c6e1f5
2024-06-05 18:43:41 +08:00
Jigar Thakkar
b48a4469ac Hide private space settings app post setup
Currently, the changes to disable private space settings app component
are located in SettiingsInitialize.java. These get triggered when
ACTION_USER_INITIALIZE is received by the settings app inside the
private profile user. However, we are stopping the private profile user
at the end of the setup flow. This can lead to a scenario wherein
ACTION_USER_INITIALIZE is relayed by the system server but not received
by the private space settings app, since it was stopped. To over come
this issue, we move the changes to disable the private space settings
app component inside the private space setup flow (right after the user
is created and started).

Bug: 342165140
Test: atest PrivateSpaceMaintainerTest#createPrivateSpace_psDoesNotExist_setsPrivateSpaceSettingsComponentDisabled
Flag: ACONFIG android.multiuser.enable_private_space_features NEXTFOOD
Change-Id: Ib9baac1e9d835ea5a27c15d499e10615b84cf97b
2024-06-05 10:11:33 +00:00
Quang Luong
665b2a586e Merge "Change hotspot security to WPA3-Transition when switching from 6GHz" into main 2024-06-05 07:34:34 +00:00
Treehugger Robot
e0bccf1d5c Merge "Revert "Revert "settings: Make use of ACTION_NETWORK_PROVIDER_SE..."" into main 2024-06-05 03:17:36 +00:00
David Jacobo
19a96c7cbd Revert "Revert "settings: Make use of ACTION_NETWORK_PROVIDER_SE..."
Revert submission 27518747-revert-27019285-ACTION_NETWORK_PROVIDER_SETTINGS-UWYYODXDGG

Reason for revert: per b/338527563#comment37, this was wrongly pointed out as culprit, looping folks conducting investigation as +cc

Reverted changes: /q/submissionid:27518747-revert-27019285-ACTION_NETWORK_PROVIDER_SETTINGS-UWYYODXDGG

Change-Id: Id3dfdac978227d0fd065f1eb59b525f041fad3d2
2024-06-04 22:35:00 +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
Julia Reynolds
15930b1b61 Reenable (no longer) failing test
Test: ApprovalPreferenceControllerTest
Fixes: 339550695
Flag: android.app.modes_api
Change-Id: Id71a17edd3fa1e9a03df3947c159161eee4dcd1a
2024-06-03 18:13:13 +00:00
Chaohui Wang
48e3f2a882 Merge changes Iccd209fd,Ia0c32882 into main
* changes:
  Refactor signal strength in SIM status
  Refactor SimStatusDialogRepository
2024-05-29 04:13:32 +00:00
Chun-Ku Lin
a384bb2cbc Merge "Use CheckFlagsRule when the test requires the device's implementation" into main 2024-05-29 03:10:17 +00:00
Joseph Vincent
9ebdedd2f6 Merge "Private space auto lock on device restart during setup" into main 2024-05-29 02:12:44 +00:00
Chun-Ku Lin
0122f8a1dc Use CheckFlagsRule when the test requires the device's implementation
Bug: 341699461
Test: atest com.android.settings.accessibility on next-userdebug build
Flag: TEST_ONLY
Change-Id: I348252519a8af4b7c890b4e8a03752c918c94b94
2024-05-29 01:35:09 +00:00
David Jacobo
7b986e7e45 Merge "Revert "settings: Make use of ACTION_NETWORK_PROVIDER_SETTINGS"" into main 2024-05-28 19:38:10 +00:00
Lucas Silva
8b13cd4b6d Fix CommunalPreferenceControllerTest
Migrate test to robolectric, as this test doesn't require a device to
run. This also speeds up the test, and allows for use of roboelectric
shadows.

Fixes: 337417918
Test: atest CommunalPreferenceControllerTest
Flag: EXEMPT fix broken test
Change-Id: I32b2760c98bf527b33a8ccbe46314395a03da1e0
2024-05-28 13:21:58 -04:00
josephpv
7ef9c46afa Private space auto lock on device restart during setup
After creation of private space value of auto-lock setting is explicitly
set to lock on device restarts. Just before the end of the setup flow
the auto-lock setting is changed to auto-lock on device lock before the
last screen of private space setup.

Bug: 342398315
Test: atest PrivateSpaceMaintainerTest
Change-Id: I8eeb0058c7ecb31d6e30b4cc78ec5877ed316f75
2024-05-28 16:27:09 +00:00
Treehugger Robot
9efdfafb9e Merge "Refer the SoftApCapability cache if getUsableChannels is unsupported" into main 2024-05-28 06:37:06 +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
Chaohui Wang
33d73862bf Refactor signal strength in SIM status
- Move data logic into repository for better testing
- Check carrier config first, if not shows some items, we don't need to
  load data
- Tests in SimStatusDialogControllerTest will be fixed in later cls

Bug: 337417520
Test: manual - on SIM status
Test: unit test
Change-Id: Iccd209fd455d66d4f6438652ee7481d2a0e72a99
2024-05-28 12:35:10 +08:00
Chaohui Wang
3b925a0cfe Refactor SimStatusDialogRepository
- Move data logic into repository for better testing
- Check carrier config first, if not shows some items, we don't need to
  load data
- Tests in SimStatusDialogControllerTest will be fixed in later cls

Bug: 337417520
Test: manual - on SIM status
Test: unit test
Change-Id: Ia0c32882f0b35ec9154b3da58ac6a7b98c879efc
2024-05-28 11:41:24 +08:00
Chaohui Wang
4520d1365f Fix CellDataPreferenceTest
Fix: 337417779
Test: unit test
Change-Id: I47ba4057a036e63809376a3a88c1a0b1e1767d0a
2024-05-27 16:26:53 +08:00
David Jacobo
1377be2323 Revert "settings: Make use of ACTION_NETWORK_PROVIDER_SETTINGS"
Revert submission 27019285-ACTION_NETWORK_PROVIDER_SETTINGS

Reason for revert: b/338527563 CL seems to be introducing jank for systemui tests somehow, reverting to get out of the way

Reverted changes: /q/submissionid:27019285-ACTION_NETWORK_PROVIDER_SETTINGS

Change-Id: I48bc0f4efc22dbff9f983b4606442b3ebd6d584c
2024-05-25 05:30:22 +00:00
Chaohui Wang
fa0c8d4fd1 Migrate to new ImsRegistrationCallback
Migrate from deprecated api, and use new api as flow.

Bug: 337417520
Test: manual - on SIM status
Test: unit test
Change-Id: I8f938c0ccb6e3e61f8d4f6cb72c293f564351d52
2024-05-22 10:51:00 +08:00
SongFerng Wang
f7425b9e32 Merge "Fix UiccSlotUtilTest's test case" into main 2024-05-21 06:38:22 +00:00
songferngwang
92d77ea26b Fix UiccSlotUtilTest's test case
The onReceiveSimCardStateChangeReceiver_receiveAction_timerCountDown
is failed since the action is wrong.

Bug: 337417975
Test: atest UiccSlotUtilTest (pass)
Change-Id: I0cb12432553155d69f985693e4ef911455c81652
2024-05-21 03:55:50 +00:00