Commit Graph

21392 Commits

Author SHA1 Message Date
Elliot Sisteron
c20d8d2977 Merge "Enable Safety Center & Security unit tests on presubmit." into main 2024-02-08 18:06:32 +00:00
Elliot Sisteron
185542bd96 Enable Safety Center & Security unit tests on presubmit.
See b/323650746 and b/323649900 for issues that should’ve been caught by pre-submit.

Bug: 323649900
Bug: 323650746
Change-Id: I77d664b6fce6a3f76a4c9a6b39202f6e9d47da33
Test: atest SettingsUnitTests
2024-02-08 16:08:40 +00:00
Prabir Pradhan
7db25ab210 Merge "Stylus: Introduce Show Stylus Hover Pointer Setting (2/2)" into main 2024-02-07 22:49:21 +00:00
Omer Ozer
d91824db27 Disable nfc foreground tests when the role flag is disabled.
Bug: 315194263
Test: SettingsRoboTests:com.android.settings.nfc.NfcForegroundPreferenceControllerTest
Change-Id: I21037ac3323d4a0322c10450be0dfbb8c9d0d3a0
2024-02-07 19:04:03 +00:00
Arnab Sen
e221abaa48 Stylus: Introduce Show Stylus Hover Pointer Setting (2/2)
Currently, the stylus hover icon can only be shown when
config_enableStylusPointerIcon is set to true. This means that the
users do not have a choice of turning the feature on or off.

This CL introduces the capability to do the same. This CL adds the
toggle in the StylusDevicesController to be shown when stylus is
connected. The toggle is mapped to the STYLUS_POINTER_ENABLED secure
setting which InputManagerService listens to turn on and off the stylus
pointer icon.

Test: manual
Steps:
1. Change the value of config_enableStylusPointerIcon as true.
2. Build the images and flash it to a stylus supporting device.
3. After the device is booted, hover over the screen, the stylus
   pointer should appear.
4. Go to Settings > Connected Devices > Stylus and tap on
   "Show pointer while hovering" toggle.
5. Try hovering over the screen, check no pointer icon is shown
6. Repeat Step#4, check that stylus pointer appears.

Run
- make RunSettingsRoboTests \
      ROBOTEST_FILTER=StylusDevicesControllerTest
- atest SettingsProviderTest

Change-Id: Idfff9b4307370cc510a5f94bd57777c30c96e854
2024-02-07 17:46:18 +00:00
YK Hung
ca4565083f Merge "Add AOSP smart battery entries" into main 2024-02-07 15:23:43 +00:00
Matías Hernández
67484c2791 Merge "Fix cast of RestrictedSwitchPreference to SwitchPreference" into main 2024-02-07 11:00:03 +00:00
Zoey Chen
6368895adf Merge "[ToA] Metrics in Settings" into main 2024-02-07 08:07:13 +00:00
Wesley Wang
ffcce1e7cf Add AOSP smart battery entries
- Revert "Cleanup smart battery entries (1/3)" patch only instead whole topic, updated part of codes to resolve the conflicts

This reverts commit 742e506d13.

Reason for revert: b/315401539

Bug: 315401539

Change-Id: I75a4e4f75b624c90aae18288c77214c0238e43eb
2024-02-07 07:29:48 +00:00
Wu Ahan
3bea5fcc98 Merge "Increase test coverage for fps pause enrollment feature" into main 2024-02-07 07:28:54 +00:00
Zoey Chen
7dc497dfcc [ToA] Metrics in Settings
Bug: 323462103
Test: atest TermsOfAddressNotSpecifiedControllerTest
Test: atest TermsOfAddressNeutralControllerTest
Test: atest TermsOfAddressMasculineControllerTest
Test: atest TermsOfAddressFeminineControllerTest
Change-Id: I09c3ad4c92275ba48b810b1971a4e98e54e5136d
2024-02-07 05:46:16 +00:00
SongFerng Wang
5b716c2c6b Merge "SIM Onboarding flow completed" into main 2024-02-07 04:48:55 +00:00
Becca Hughes
3aa7212b26 Merge "Fix enterprise settings bug" into main 2024-02-06 22:35:07 +00:00
Wu Ahan
5e577c03e5 Increase test coverage for fps pause enrollment feature
Bug: 288155127
Test: atest SfpsEnrollmentFeatureImplTest
Change-Id: I1a067d78262daf4903dd7a8b8c60b582c0945719
2024-02-06 15:15:15 +00:00
songferngwang
f1ea484425 SIM Onboarding flow completed
- Add the setup flow for switching sim and rename and setup primary sim
  items
- Add the bottom sheet and progress dialog.
Bug: 318310357
Bug: 298898436
Bug: 298891941
Test: build pass. Will upload another cl for testing

Change-Id: Ie9680f0a67afe453c1449c0f2b59e98fd627e215
2024-02-06 10:56:59 +00:00
Yiyi Shen
ac869a57ad Merge "[Audiosharing] Avoid dialog flickering for same bt device group." into main 2024-02-06 06:26:30 +00:00
Yiyi Shen
10bddfd334 [Audiosharing] Avoid dialog flickering for same bt device group.
Before this change, the dialog will dismiss and show up again if the
second bud of the same group is connected.

In this change, StopDialog and JoinDialog will only update the message
and event listener when the dialog is triggered by another device with the same group id or the new bt device with different group id. (No dismiss and show); DisconnectDialog will only dismiss and show again when a new bt device with different group id is connected and update the event listener when another device with the same group id connected.

Also dismiss the dialog when the triggering device disconnect or join
the sharing.

Test: atest
Bug: 305620450
Change-Id: I798812101cefb24185d76d56f78eae27712dd7a6
2024-02-06 11:52:58 +08:00
Fan Wu
27301f68b5 Fix test failure caused by ag/26108859
Bug: 293405483

Test: atest
Change-Id: I980d71bf31d63013cdeefb90aa3701851f038600
2024-02-06 03:25:06 +00:00
Becca Hughes
401ebcb53d Fix enterprise settings bug
This fixes a bug where the picker
is not using the correct user id
and also ensures that the settings
activity uses the correct user when
launched.

Test: flash & test w/ work profile
Bug 322071206

Change-Id: I846593ff9ae320d9bb774e3e79ed9ef41f101ff5
2024-02-05 10:58:09 -08:00
Richard MacGregor
9ed6467714 Merge "Add developer option for screenshare protections" into main 2024-02-05 18:34:50 +00:00
Elliot Sisteron
8d89dbc5ae Merge "Fix tests for SecurityAdvancedSettings." into main 2024-02-05 16:59:23 +00:00
Elliot Sisteron
5418e292c9 Fix tests for SecurityAdvancedSettings.
It seems these tests have been failing for a while (probably they were never passing in the first place; as the issue appears to be with the tests and not the prod code).

Are they not being run on pre and/or post-submit?

Bug: 323650746
Change-Id: I97db7183898930792d1ff0d2de592f26f8b78b01
Test: atest SecurityAdvancedSettingsTest
2024-02-05 12:58:30 +00:00
Elliot Sisteron
f26e541e86 Fix tests for BiometricsSafetySource and LockScreenSafetySource.
It seems these tests have been failing for a while (probably they were never passing in the first place; as the issue appears to be with the tests and not the prod code).

Are they not being run on pre and/or post-submit?

Bug: 323649900
Test: atest LockScreenSafetySourceTest && atest BiometricsSafetySourceTest
Change-Id: Ie75241455317da6749ccf648dae71c49ea9f766f
2024-02-05 11:56:53 +00:00
Matías Hernández
41367eab25 Fix cast of RestrictedSwitchPreference to SwitchPreference
The class was changed to extend SwitchPreferenceCompat instead in ag/25160408.

Fix: 323649099
Test: atest ChannelListPreferenceControllerTest
Change-Id: I0d9fd82d0087dd11eb7c3d6c6912788725b18b43
2024-02-05 12:28:42 +01:00
Mark Kim
6b64e92fc8 Merge "Use a separated flag for archiving feature in Settings" into main 2024-02-05 10:55:37 +00:00
Chaohui Wang
2222ab9438 Merge "Use collectAsCallbackWithLifecycle" into main 2024-02-04 05:52:59 +00:00
Ze Li
b47d077dd0 Merge changes from topic "exclusive-manager" into main
* changes:
  [Hide DCK devices] Hide DCK devices from settings app (other devices section).
  [Hide DCK devices] Hide DCK devices from settings app (saved devices page).
2024-02-04 03:22:24 +00:00
Yiyi Shen
94e7399979 Merge "Fix CallsAndAlarmsPreferenceControllerTest" into main 2024-02-04 03:19:54 +00:00
YK Hung
d7ac64555d Merge "Fix failed test case for BatteryTip in Settings" into main 2024-02-04 02:13:34 +00:00
Yiyi Shen
4e0315d2a3 Fix CallsAndAlarmsPreferenceControllerTest
Test: atest
Fix: 323634491
Change-Id: I627a3b6926c86f5e90dcfb27ed794ffb09aa4cfa
2024-02-03 21:53:16 +08:00
Jason Hsu
2eba5be9b4 Merge "Fix corss-link hearing device settings" into main 2024-02-03 09:57:04 +00:00
Pajace Chen
4af6ae88a4 Fix failed test case for BatteryTip in Settings
- Replace the deprecated mocktio rule with MockitoJUnit.rule
- Fix the failed test cases
- Update the testing convention

Bug: 323627875
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batterytip
Change-Id: I25a39c8e7ad07482352c1e2152d8e16555429ab1
2024-02-03 17:24:42 +08:00
Chaohui Wang
213c998557 Use collectAsCallbackWithLifecycle
Instead of observeAsCallback, since isAllowed is a flow now.

Bug: 322916468
Test: manual - on Toggle Permission page and switch between apps
Test: unit test
Change-Id: Ic33a7d6cd7c71c7cf6cd4a6e353505fa12cf0046
2024-02-03 04:12:39 +00:00
Richard MacGregor
dc15244a5d Add developer option for screenshare protections
Add developer option that allows disabling screenshare protections to
allow for better bug reports and debugging.

Bug: 320757744
Bug: 316955558
Bug: 316954829
Flag: ACONFIG com.android.server.notification.sensitive_notification_app_protection DISABLED
Flag: ACONFIG com.android.server.notification.screenshare_notification_hiding DISABLED
Test: atest SensitiveContentProtectionPreferenceControllerTest
Change-Id: Ibcb9f886aa599fe2442e755653c49f44cfa1830f
2024-02-02 19:33:35 -08:00
Pajace Chen
32587dbdcf Merge changes from topics "low_battery_tip", "new_settings_card" into main
* changes:
  [BatteryTip] Implement new CardPreference to apply new style
  [BatteryTips] Separate the low battery tips
2024-02-03 01:45:21 +00:00
Becca Hughes
d8a82105e0 Merge "Fix settings flakiness bug" into main 2024-02-03 00:15:57 +00:00
Becca Hughes
7df4f0f4bd Fix settings flakiness bug
The flakiness was caused by mVisibility
being out of sync and resulting in the
preference being hidden / shown incorrectly.

Test: manual & unit tests
Bug: 322072349
Change-Id: I588da2100b8f2cea38f2bdb63af4e8d19d0efd0b
2024-02-02 22:43:30 +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
Hao Dong
cdf34b66cb Merge "Show split screen dialog on the introduction and enrolling page." into main 2024-02-02 18:30:46 +00:00
Mark Kim
7adac0459c Use a separated flag for archiving feature in Settings
The new flag will replace the current PM-flag eventually, once they reach the same rollout status. Until then both flags are kept concurrently, to avoid a rollback of the feature.

This is done to reduce risk and potentially enable an isolated rollback
of Settings related logic, while keeping system logic intact.

Additionally, fix bug by replacing `System.getProperty("pm.archiving.enabled")` to `SystemProperties.getBoolean("pm.archiving.enabled", false)`

Test: InstalledAppCounterTest, AppButtonsTest, HibernationSwitchPreferenceTest
Bug: 323164382
Change-Id: I44a41d6a43a12134c4e3aa5df8ad6a9eb91758d4
2024-02-02 17:16:47 +00:00
pajacechen
d171a8b946 [BatteryTip] Implement new CardPreference to apply new style
- Implement a new CardPreference to apply SettingsCard
- Apply CardPreference on battery tips

Bug: 315748218
Test: atest SettingsSpaUnitTests:com.android.settings.widget.CardPreferenceTest
Test: atest SettingsRoboTest:com.android.settings.fuelgauge
Change-Id: I9a57e7739275854278b2c586793af718b0680d23
2024-02-02 22:27:16 +08:00
pajacechen
5dd8460c3e [BatteryTips] Separate the low battery tips
Bug: 315748218
Test: atest SettingsRoboTestStub:com.android.settings.fuelgauge.batterytip.detectors.LowBatteryDetectorTest
Change-Id: Id973be37012da414d6125a4dd29ec4522ab80e95
2024-02-02 22:16:58 +08:00
Yiyi Shen
d8d977d442 Merge "[Audiosharing] Fix tests when flag is on." into main 2024-02-02 10:23:53 +00:00
Yiyi Shen
769f9ae45e [Audiosharing] Fix tests when flag is on.
Test: atest
Bug: 305620450
Change-Id: I85e8be4aef84a550bd4fe556848f3627b0f29fa6
2024-02-02 16:05:13 +08:00
Yiyi Shen
3b0d829152 Merge "[Audiosharing] Handle fallback device for calls and alarms." into main 2024-02-02 07:36:48 +00:00
Fan Wu
63a9d21e26 Merge "Remove redundant cast" into main 2024-02-02 06:43:24 +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
Yiyi Shen
e96833943a [Audiosharing] Handle fallback device for calls and alarms.
Test: atest
Bug: 305620450
Change-Id: I1c7a49b6aed7d47b7fdbcc6b475b8e99edc52443
2024-02-02 13:32:50 +08:00
Joanne Chung
8541c6c4ef Merge "Allow uninstallation of current home app" into main 2024-02-02 05:02:50 +00:00
Fan Wu
148640e72d Remove redundant cast
Bug: 313569889
Test: atest
Change-Id: Idad218e3722f29063b6c357139f7120414dea09e
2024-02-02 02:35:53 +00:00