Commit Graph

15989 Commits

Author SHA1 Message Date
TreeHugger Robot
5cdebd798f Merge "Revert "Add primary switch for vibration settings screen"" 2022-01-19 05:03:10 +00:00
Arc Wang
7253d8ce61 Merge "Fix fail of AutomaticStorageManagerSwitchBarControllerTest" 2022-01-19 03:57:32 +00:00
Tsung-Mao Fang
47875a5dff Revert "Add primary switch for vibration settings screen"
This reverts commit fd54fc34c6.

Reason for revert: b/215275738

Change-Id: I93612df6493a2a4184a98b3f049e23aa888095f2
2022-01-19 03:40:40 +00:00
Arc Wang
aaa4c7c951 Fix fail of AutomaticStorageManagerSwitchBarControllerTest
initializingSwitchDoesNotTriggerView initializes mController
with a mSwitchBar which has already addOnSwitchChangeListener,
it will trigger onSwitchChangedon (and a dialog breaks the test)
of a mController initialized at setUp().

This change initializes a new mSwitchBar for the test.

Bug: 214907475
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AutomaticStorageManagerSwitchBarControllerTest
Change-Id: Iefe56387c56ca6b1c2520c050467d130182ccfdc
2022-01-19 10:36:48 +08:00
TreeHugger Robot
57c8c2e3bf Merge "Add primary switch for vibration settings screen" 2022-01-18 23:45:19 +00:00
Lais Andrade
fd54fc34c6 Add primary switch for vibration settings screen
Add primary switch that updates the VIBRATE_ON user setting.

Update all settings in this page to be disabled when this main toggle is
off.

Bug: 30028435
Test: VibrationMainSwitchPreferenceControllerTest
Change-Id: I752ca3b914c46678a1347034c5b6cf24fd40cc13
2022-01-18 22:31:30 +00:00
Weng Su
d2cdd60139 Fix Robolectric failures for new registerReceiver security design
- Security team add new interface to Context.registerReceiver() with a
third parameter.

- The new interface might have some issues in the test environment.

- Spy the registerReceiver() and unregisterReceiver() to avoid
unexpected issues.

Bug: 214938188
Test: manual test
make RunSettingsRoboTests
ROBOTEST_FILTER=WifiPrimarySwitchPreferenceControllerTest

Change-Id: I5bf9fc860a3de99145bc7535ba57cb514b403966
2022-01-18 17:48:28 +00:00
Lais Andrade
6b2e2e4cbb Merge "Introduce alarm and media vibration intensity settings" 2022-01-18 17:37:31 +00:00
Lucas Silva
38d0a7ca91 Rewrite dream settings.
The available dreams will now be shown in a grid, with a preview button
at the bottom.

Screenshot (white placeholder image used):
http://screen/6pe6EoACPoQN8TZ.png
http://screen/4nR6Wg5pN7pL6Wb.png

Phone (single column layout):
http://screen/4WFqzZR8Yf9H3VZ.png

Colors and margins will be finalized once final mocks are done.

Bug: 207681076
Bug: 214250590
Test: locally on device
Change-Id: Ie68bdc60e74e72dc3c3cee3f1ffd40f5613109b9
2022-01-18 16:06:34 +00:00
Lais Andrade
eaaf5331d6 Introduce alarm and media vibration intensity settings
Introduce toggles and sliders to configure the alarm and media
vibrations in the "Vibration & haptics" settings app.

Also update the multiple intensities configuration flag into a integer,
where the device can specify how many distinct levels are supported.
Follow existing implementation to map the intensities to higher setting
values.

Bug: 198346559
Bug: 207477604
Test: [Alarm|Media]Vibration[Intensity|Toggle]PreferenceControllerTest
Change-Id: Ie3d570b72ba1229e613ecf0c45fac81233529e32
2022-01-18 16:03:01 +00:00
Weng Su
1779bd43e4 Fix the Robolectric Tests Failures
- The ShadowWifiManager class is not working as expected
  - The getSystemService(WifiManager.class) return null when testing

- Use Mockito class instead of Shadow class

Bug: 214906101
Bug: 214938188
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=AllInOneTetherSettingsTest
make RunSettingsRoboTests ROBOTEST_FILTER=WifiTetherSettingsTest

Change-Id: Ic54af8524fbff1b6ac916ca8e1bcac52f413663a
2022-01-18 14:27:54 +00:00
TreeHugger Robot
b81f2b77f0 Merge "Ignore/Fix broken tests" 2022-01-18 11:05:45 +00:00
Tsung-Mao Fang
aa19771a37 Ignore/Fix broken tests
Fix: 214943221
Fix: 215070875
Bug: 215071960
Bug: 215071948
Bug: 215072120
Test: run robo test
Change-Id: Id11c8461a2cb11cba96feebbfb0337b096eb3a17
2022-01-18 17:39:24 +08:00
TreeHugger Robot
35de64a646 Merge "Fix broken tests" 2022-01-18 09:21:26 +00:00
TreeHugger Robot
8613559120 Merge changes I74d84318,Ia5fb9bb8
* changes:
  Ignore tests in Battery package
  Ignore broken tests
2022-01-18 09:21:22 +00:00
TreeHugger Robot
85e8199c62 Merge "Ignore broken tests" 2022-01-18 09:21:17 +00:00
Tsung-Mao Fang
7be195f15a Fix broken tests
Test: Run robo test
Change-Id: I0d466e95c8d63703e05d5b6f0e2a81e43b468ed7
2022-01-18 15:37:30 +08:00
Tsung-Mao Fang
c6c9e2eb16 Ignore tests in Battery package
Bug: 215064709
Test: run robo test
Change-Id: I74d84318a1546e934579d23c79a6a43805880a99
2022-01-18 15:07:08 +08:00
Tsung-Mao Fang
13a3af7f07 Ignore broken tests
Test: run robo test
Bug: 215062934
Bug: 215062846
Bug: 215056068
Change-Id: Ia5fb9bb8d28bf745d69f3cc83cfeb07b982d029c
2022-01-18 14:53:34 +08:00
Hugh Chen
99000589be Fix broken settings tests
Bug: 214907472
Bug: 214907514
Test: make -j64 RunSettingsRoboTests
Change-Id: If87b1041f2e6357241963240efb5337ab31610bc
2022-01-18 05:50:28 +00:00
Tsung-Mao Fang
69a3271556 Ignore broken tests
Test: run robo tests
Bug: 215047192
Bug: 215047320
Bug: 215047319
Bug: 215046294
Bug: 215046609
Bug: 215047177
Bug: 215046603
Bug: 215046286
Change-Id: I6cfdcde663fa531754ee473421577357890ab540
2022-01-18 12:43:59 +08:00
TreeHugger Robot
1002473fc2 Merge "Ignore broken tests" 2022-01-18 02:58:04 +00:00
TreeHugger Robot
d1f8c2772e Merge "Ignore broken tests" 2022-01-18 02:57:45 +00:00
TreeHugger Robot
dd8e167a10 Merge "Ignore broken tests related to wifi tracker lib" 2022-01-18 02:57:23 +00:00
Daniel Solomon
76c18bae69 Update BrightnessInfo construction in tests
Update existing BrightnessInfo construction in
BrightnessLevelPreferenceControllerTest to account for a new
BrightnessInfo field.

Bug: 206857086
Bug: 212634465
Test: atest BrightnessLevelPreferenceControllerTest
Change-Id: I526c1b38f5aa8e048d98cf20af9717715ae39482
2022-01-17 18:24:13 -08:00
Jan Tomljanovic
9d2ec95c61 Call system service API instead of checking the phenotype flag directly.
Test: atest SettingsUnitTests
Bug: 208625216
Change-Id: Ib551cbaf0f09fe49bd81ef657037401263705521
2022-01-17 17:06:50 +00:00
Weng Su
cfe2804647 Merge "Enable Carrier-Config cache for Settings" 2022-01-17 14:24:50 +00:00
Tsung-Mao Fang
297fcb4031 Ignore broken tests
Test: Run tests
Bug: 214943221
Bug: 214944418
Bug: 214944992
Bug: 214944423
Bug: 214945263
Bug: 214945259
Change-Id: I958c003a15866a03b7d0c24210ae2c99f4ee2c47
2022-01-17 22:01:50 +08:00
Tsung-Mao Fang
6225be70dd Ignore broken tests
Test: Run robo test
Bug: 214941315
Change-Id: I986924465a391f4dc3f6196b84ebd36e76a14834
2022-01-17 21:43:30 +08:00
Tsung-Mao Fang
8498760b07 Ignore broken tests related to wifi tracker lib
Test: Run entire robo tests
Bug: 214938188
Change-Id: Ic23c758737786c2294c400fd2746583fef426f2f
2022-01-17 21:27:25 +08:00
Tsung-Mao Fang
99c4cabe14 Ignore broken tests
Test: Run all robo tests
Bug: 214906480
Bug: 214906101
Bug: 214906504
Bug: 214907514
Bug: 214907475
Bug: 214907472
Bug: 214907388
Bug: 214906107
Change-Id: I47dd81ee72f3a55b2f2a30a7a5cb5c68758fbc9a
2022-01-17 18:31:04 +08:00
Daniel Hsieh
0c229fdb4d Merge "Support following typing focus in window mode [3/n]." 2022-01-15 15:18:46 +00:00
Mady Mellor
28f18c4b0a Merge "Use hasSentValidBubble in settings" 2022-01-14 17:58:50 +00:00
Weng Su
7822750c31 Enable Carrier-Config cache for Settings
- Since the "Mobile-Data Details Settings" (NETWORK_OPERATOR_SETTINGS) will query Carrier-Config around 70 times during launching, use the Carrier-Config cache to reduce 69 times to speed up the launching time.

- It takes about 3ms to query a Carrier-Config each time.

- Create a singleton class to share the Carrier-Config for all
sub-settings.

Bug: 204135235
Test: manual test
atest -c ApnPreferenceControllerTest \
         AutoSelectPreferenceControllerTest \
         BackupCallingPreferenceControllerTest \
         CarrierConfigCacheTest \
         CarrierPreferenceControllerTest \
         CarrierSettingsVersionPreferenceControllerTest \
         DataServiceSetupPreferenceControllerTest \
         Enable2gPreferenceControllerTest \
         EnabledNetworkModePreferenceControllerTest \
         Enhanced4gBasePreferenceControllerTest \
         MobileNetworkUtilsTest \
         NetworkProviderBackupCallingGroupTest \
         NrAdvancedCallingPreferenceControllerTest \
         PreferredNetworkModePreferenceControllerTest \
         TelephonyTogglePreferenceControllerTest \
         WifiPickerTrackerHelperTest
make RunSettingsRoboTests \
     ROBOTEST_FILTER=ContactDiscoveryPreferenceControllerTest
make RunSettingsRoboTests \
     ROBOTEST_FILTER=VideoCallingPreferenceControllerTest

Change-Id: I26f9ac115a754910b5d59e820703f1a0e701bb7f
2022-01-14 23:28:50 +08:00
Xinyi Zhou
a099e411a7 Merge "Add Fast Pair to System Settings" 2022-01-14 10:56:13 +00:00
Xinyi Zhou
7871ccff33 Add Fast Pair to System Settings
Test: manual - took a screen capture https://photos.app.goo.gl/YgkVkAqxib4DwFs49 unit tests passed.
Bug: 203579197

Change-Id: Ie15ede111f7cdd1fc635fb9c475fe210d3f7f91b
2022-01-13 23:26:35 -08:00
Daniel Hsieh
6f4fb88538 Support following typing focus in window mode [3/n].
There are 3 milestones in this feature.
1. Refactor the callbacks for Accessibility in WindowManagerInternal.
2. Implement this feature in such new architecture.
3. Implement the setting choice in preference page.

This CL is for the 3rd milestone.

We add a preference key "magnification_follow_typing" to access and
update the ACCESSIBILITY_MAGNIFICATION_FOLLOW_TYPING_ENABLED value
which controls its corresponding preference page UI.

Bug: 194668976
Test: make RunSettingsRoboTests ROBOTEST_FILTER=
	MagnificationFollowTypingPreferenceControllerTest
	ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: Ib2602c997a535c1acca6a7ddd7bb2c25921f9280
2022-01-14 07:11:05 +00:00
Eric Biggers
d8639ee7d0 Merge changes from topic "remove-fde"
* changes:
  Remove FDE support from accessibility settings
  Rename crypt_keeper_* strings that are still used
  Remove CryptKeeperSettings
  Remove CryptKeeper
2022-01-13 22:17:13 +00:00
Yasin Kilicdere
d9281c887a Make sure activity for adding a supervised user is opened full screen.
Add supervised user activity only covers the right hand side of the
screen in large screen devices. This CL makes sure it is always
started from Settings with correct flags to be shown full-screen.

Bug: 214401383
Bug: 205101183
Bug: 199868785
Test: croot && make RunSettingsRoboTests -j40 ROBOTEST_FILTER="com.android.settings.users.UserSettingsTest"
Change-Id: If81e0cce91a5295eb2b93b12f68b70fd1240c953
2022-01-13 18:46:19 +00:00
Etienne Ruffieux
70c9f89e6f Replaced use of Bluetooth resource by SystemApi
Bluetooth resources are moved to the Bluetooth module,
we need to clear all existing usages of these resources.
Updated existing tests.

Tag: #feature
Test: make RunSettingsRoboTests
Bug: 211570675
Change-Id: I0f76df5043e69ed33cca40af3c32ac5b922b79ef
2022-01-13 17:22:35 +00:00
PETER LIANG
e26c0ec801 Merge "New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (4/n)." 2022-01-13 14:57:06 +00:00
Peter_Liang
93668d6002 New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (4/n).
- Extending the interface of AppGridView to be flexible. It will be used
in the TextReadingPreferenceFragment.
  1. Add a new attribute "appCounts" into the view.
  2. Default app counts as 6 if not set the attribute.

Bug: 211503117
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER=AppGridViewTest
Change-Id: I94a5f1d037551f6faba0300a176feb11fba1f203
2022-01-13 18:56:16 +08:00
Lais Andrade
54ed73ae6c Merge "Update Settings to use intensity settings as main preference keys" 2022-01-13 02:45:41 +00:00
TreeHugger Robot
a1c550650b Merge "Implement Tooltips widget for QS panel" 2022-01-13 00:11:03 +00:00
Lais Andrade
141b5bb3bc Update Settings to use intensity settings as main preference keys
Updating the Settings app to allow setting the value off for key
HAPTIC_FEEDBACK_INTENSITY. This setting state is also copied onto
HAPTIC_FEEDBACK_ENABLED setting, so both should be in sync after this
change.

Similar logic is applied between RING_VIBRATION_INTENSITY and
VIBRATE_WHEN_RINGING.

This will not disable the hardware feedback since that one is controlled
by a separate setting key now.

The "vibrate for calls" was also removed and the single toggle for
"vibrate first then ring gradually" was moved into the "Vibration &
haptics" page.

Bug: 185351540
Test: [HapticFeedback|NotificationVibration|RingVibration][Intensity|Toggle]PreferenceControllerTest
      and manual testing of the AOSP settings app
Change-Id: I9c94cef331a1500a1272a601ba32667ca995ddab
2022-01-12 22:59:29 +00:00
Mady Mellor
f9fc2e0d1e Use hasSentValidBubble in settings
This change makes it such that bubble settings will only be available once
the app has sent a bubble notification.

Test: atest BubbleSummaryPreferenceControllerTest
Bug: 178387292
Change-Id: I459ffcedc4194d953e8b7170937e2eb5334d1422
2022-01-12 14:10:34 -08:00
Oli Lan
13adae672e Merge "Add config flag in Settings to control whether restricted profiles are offered." 2022-01-12 17:40:09 +00:00
menghanli
e9f9985e95 Implement Tooltips widget for QS panel
- Show the illustration and QS tile label text
- Dynamic update popup window width by content
- Support the auto close timer API

Bug: 210353709
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AccessibilityQuickSettingsTooltipWindowTest
Change-Id: I8e0d3ff4ef6a48a54ef1e80724002d2cd28d7ac3
2022-01-12 11:07:51 +00:00
Eric Biggers
6552bdd0ef Rename crypt_keeper_* strings that are still used
Some strings used in the Settings UI have "crypt_keeper" in their names,
but they aren't specific to FDE, which is no longer supported.  They are
still used to report the encrypted status of the device on devices that
use FBE, or the unencrypted status of the device on devices that don't
have encryption enabled at all.  Rename these strings appropriately.

Test: On Cuttlefish with and without encryption enabled, tested visiting
      the "Encryption & credentials" settings.
Bug: 208476087
Change-Id: Ic63910c870837f5b37e4407ba5b3c7629e925c17
2022-01-11 18:53:51 -08:00
Eric Biggers
36609c18d1 Remove CryptKeeperSettings
FDE support has been removed in favor of FBE, so remove the FDE settings
from the "Encryption & credentials" page of the Settings app.

For now I didn't change the way the page appears on devices that don't
use FDE; as before, it still lists "Encrypt phone", followed by either
"Encrypted" or "Phone not encrypted" with no changeable settings.  Note
that the strings used for this have "crypt_keeper" in their names but
aren't specific to FDE; the next CL will rename them.

Test: On Cuttlefish with and without encryption enabled, tested visiting
      the "Encryption & credentials" settings.
Bug: 208476087
Change-Id: I3ce9894291ea1f1886f21980a86a92bfce38038a
2022-01-11 18:53:51 -08:00