Commit Graph

18578 Commits

Author SHA1 Message Date
Shamali P 00d4e05072 Move widget related listeners to widget picker data provider
The change listener on popup provider was for listening to widget
updates. With the widget now updated in widgets picker data provider,
 this moves over the listeners to it.

Test: Existing tests
Flag: EXEMPT minor refactoring
Bug: 353347512
Change-Id: I163529d207ea65044f8e3d6e77e87e0e674b82be
2024-07-22 23:58:04 +00:00
Shamali P 74d9fbd635 Define widget picker data provider separate from popup provider
Separate provider in ActivityContext and relevant implementations that
open widget picker

Bug: 353347512
Flag: EXEMPT BUGFIX
Test: Unit test
Change-Id: I55df3d9ce6ae9b7d0a310a8686b188618d229065
2024-07-22 23:58:04 +00:00
Shamali P 9e7d288f67 Create a separate class for widget related methods from popup provider
Child cl removes those methods from popup provider and updates its
references

Bug: 353347512
Flag: EXEMPT BUGFIX
Test: Unit test
Change-Id: Id559e8c8d32a40adab961e7c710ec835d5a92184
2024-07-22 23:58:04 +00:00
Fengjiang Li 2b5deb2fb9 Merge "[Test Week] Add VibratorWrapperTest" into main 2024-07-19 23:28:13 +00:00
Fengjiang Li 979adecc7b [Test Week] Add VibratorWrapperTest
Number of new tested methods: 9

Bug: 353303621
Test: This is the unit test
Flag: NONE - unit test
Change-Id: Id6dde920d6365823cf859e97c7c0cfbb25e7270d
2024-07-19 14:10:32 -07:00
Sihua Ma f2abd671d1 Merge "Add unit test for RoundedCornerEnforcement" into main 2024-07-19 17:13:08 +00:00
Fengjiang Li 74861537f6 Merge "[Test Week] Add ScreenOnTrackerTest" into main 2024-07-19 17:07:26 +00:00
Sebastián Franco 5217ae7fa3 Merge "Refactoring FolderPagedView to make it more testable" into main 2024-07-19 16:59:35 +00:00
Treehugger Robot 8bba516ca4 Merge "Align color resources in launcher projects." into main 2024-07-19 16:15:25 +00:00
Shamali Patwa 6babde40e3 Merge "Move out picker related methods from widgets model" into main 2024-07-19 15:46:00 +00:00
Marcelo Arteiro f38d98d1a6 Align color resources in launcher projects.
This is an effort to align/unify color usage across all launcher projects and the system itself.
This fix recreates all dynamic color attributes present in the OS since many launcher areas cannot access private attributes.
It is recomemnded to use these new local attributes in all launcher areas and avoid creating new color resources when these can be used directly.

Bug: 352690172
Test: Presubmits
Flag: EXEMPT bugfix
Change-Id: Ic36b8bf70ee37f2fdd32e459e66f0e2d001d6ba2
2024-07-19 14:22:21 +00:00
Fengjiang Li b7b3137261 [Test Week] Add ScreenOnTrackerTest
Number of new tested methods: 5

Bug: 353303621
Test: This is the unit test
Flag: NONE - unit test
Change-Id: Ieae1ed9bb215a52a12fef919c8dd407291c2b0f9
2024-07-19 00:49:58 -07:00
Andrew Cole 4a680b1374 Merge "Test Week - AccessibleDragLstenerAdapterTest" into main 2024-07-19 00:53:21 +00:00
Fengjiang Li abc4a9589a Merge "[Test Week] Add AllAppsRecyclerViewPoolTest" into main 2024-07-19 00:33:51 +00:00
Fengjiang Li a74d9d74c9 Merge "[Test Week] Add ViewPoolTest" into main 2024-07-19 00:33:38 +00:00
Sihua Ma cda4805e62 Add unit test for RoundedCornerEnforcement
Number of methods covered: 4

Test: atest NexusLauncherRoboTests:RoundedCornerEnforcementTest
Test: SysUI studio
Flag: TEST_ONLY
Bug: 353303621
Change-Id: I488ce4a6617b96d4937a7030cd25831bcefadca1
2024-07-18 23:57:09 +00:00
Sebastian Franco cda3427fea Refactoring FolderPagedView to make it more testable
Bug: 353588686
Test: FolderPagedViewTest.kt
Flag: TEST_ONLY
Change-Id: I2a2efd9f9b2a6ac32153f8102613a3af5afc1ecf
2024-07-18 23:33:21 +00:00
Fengjiang Li 5ad7a20e90 [Test Week] Add ViewPoolTest
Number of new tested methods: 3

Bug: 353303621
Test: This is the unit test
Flag: NONE - unit test
Change-Id: I13f1a7bad41c07368cff3d544120d1f41c92b603
2024-07-18 15:25:07 -07:00
Fengjiang Li 30d02c20bf [Test Week] Add AllAppsRecyclerViewPoolTest
Number of new tested methods: 2

Bug: 353303621
Test: This is the unit test
Flag: NONE - unit test
Change-Id: Ic210b5ad7988c9e8d060c959fb2a425068c82511
2024-07-18 15:19:42 -07:00
Brandon Dayauon 3188bd08ae Merge "Don't add floatingMaskView if it will not fit." into main 2024-07-18 20:53:14 +00:00
Andrew Cole 6ace1c0d3a Test Week - AccessibleDragLstenerAdapterTest
Refactored AccessibleDragListnerAdapter to kotlin for null safety and removed a explicit call to Launcher. Added tests for all public methods
* Refactored 1 class
* Tested 1 class previously untested
* Tested 4 public methods

Bug: 353303621
Test: AccessibleDragListnerAdapterTest
Flag: TEST_ONLY

Change-Id: I7db70330f5e76b8f7298304314584e88e067c139
2024-07-18 12:34:17 -07:00
Shamali P 54bd36ef81 Move out picker related methods from widgets model
* The WidgetsBaseEntry and related types are specific to picker UI.
So, moved them to a entry builder class.

Bug: 353347512
Flag: EXEMPT BUGFIX
Test: Unit test
Change-Id: I42b3083b42ee03dc8d548e7464689ea270a36f22
2024-07-18 18:35:19 +00:00
Sebastián Franco 45bad7252e Merge "Refactoring FolderPagedView to make it more testable" into main 2024-07-18 17:02:54 +00:00
Sihua Ma e2dde4e468 Merge "Add unit test for CustomAppWidgetProviderInfo" into main 2024-07-18 15:47:32 +00:00
Sihua Ma b648a0f386 Merge "Add unit test for CustomWidgetManager" into main 2024-07-18 15:47:15 +00:00
Shamali Patwa 1407aeca8d Merge changes from topic "ls-picker-filter" into main
* changes:
  Consider the widget option menu choice in search results
  Show only filtered / default widgets in standalone activity by default
  Add a 3 dot vertical menu and styles (child cl makes it functional)
  Set default widgets and all widgets separately from standalone activity
  Update the widget picker activity theme for popup menus styling
2024-07-18 14:14:42 +00:00
Sebastián Franco 0eafdad0f5 Merge "Adding testin for Utilities.java" into main 2024-07-18 03:05:44 +00:00
Sebastián Franco 51c8ae668d Merge "Remove unused methods" into main 2024-07-18 03:05:15 +00:00
Brandon Dayauon 1710cbeb6e Don't add floatingMaskView if it will not fit.
See this screenshot for math explanation: https://screenshot.googleplex.com/9x256x5uk7qNZDg
We use the Y values of the views to determine if the header will be clipped by the
floating mask view.

Also added logs for private space.

bug:343478928
Test manually before: see bug.
after: https://drive.google.com/file/d/1FZXDQG-hV-V3wErVR0-nVCMgjUDk910Z/view?usp=sharing
Flag: com.android.launcher3.enable_private_space

Change-Id: I025e4e62f9ba60e8493d2aceb139d2c4ed6a84dd
2024-07-17 17:12:34 -07:00
Brandon Dayauon ef81b5c630 Merge "Remove enableLayoutTransitions for private space." into main 2024-07-17 23:54:59 +00:00
Sihua Ma 1f3f951b70 Add unit test for CustomAppWidgetProviderInfo
Number of methods covered: 2

Test: atest NexusLauncherRoboTests:CustomAppWidgetProviderInfoTest
Test: SysUI studio
Flag: TEST_ONLY
Bug: 353303621
Change-Id: I4235569878a9f1c1b2ec040b26190f97d9734679
2024-07-17 23:38:33 +00:00
Sebastian Franco c794aca69f Refactoring FolderPagedView to make it more testable
Bug: 353588686
Test: Compiles
Flag: NONE refactor
Change-Id: I612523282a57beac90b14a890a333a1670ab0d48
2024-07-17 23:32:17 +00:00
Shamali P 6211e86009 Consider the widget option menu choice in search results
Makes the search related code separate from popup provider.

Bug: 347288851
Flag: EXEMPT flag in sysui
Test: Unit tests
Change-Id: I4534d5f70876ec0cf4e2d78030864f78a8bfabb9
2024-07-17 22:56:58 +00:00
Shamali P 9aabb9a9cb Show only filtered / default widgets in standalone activity by default
Bug: 347288851
Flag: EXEMPT flag in sysui
Test: b/339716822 to set it up
Change-Id: I71baac8897ce600f3c588eb3d48b9677e507145b
2024-07-17 22:56:49 +00:00
Shamali P 8654ff0116 Set default widgets and all widgets separately from standalone activity
Bug: 347288851
Flag: EXEMPT standalone picker
Test: Manual
Change-Id: I4eaeb7cb44b8b9c4187f7cf8fdc1b80143bb322e
2024-07-17 22:56:30 +00:00
Shamali Patwa 45b5acef28 Merge "Cleanup widgetsModel and add tests" into main 2024-07-17 22:55:01 +00:00
Sihua Ma 71a48d9ac5 Add unit test for CustomWidgetManager
Number of methods covered: 5

Test: atest NexusLauncherRoboTests:CustomWidgetManagerTest
Test: SysUI studio
Flag: TEST_ONLY
Bug: 353303621
Change-Id: I69c9567391d3a874c7b2abcd473887194ec2dcfc
2024-07-17 22:21:40 +00:00
Andrew Cole f0bdb71e38 Merge "Test Week - FolderAccessibilityHelperTest" into main 2024-07-17 20:16:39 +00:00
Sebastian Franco 3780e096d6 Adding testin for Utilities.java
Happy testing week.

Bug: 353588686
Test: LauncherUtilitiesUnitTest
Flag: TEST_ONLY
Change-Id: I321aa9197a53801282591198aef0229d44da60d3
2024-07-17 11:28:24 -07:00
Charlie Anderson 7dc0ce4019 Merge "[Test Week] Add tests for each operation in PackageUpdatedTask" into main 2024-07-17 17:55:45 +00:00
Brandon Dayauon 0e5640376e Remove enableLayoutTransitions for private space.
Get rid of layoutTransitions as they are not reliable, see here: https://docs.google.com/document/d/1ExSemBvzzVv-I9tUCVzdLeN-lDb2hTSOM886UYSH-Qk/edit?usp=sharing&resourcekey=0-aBCCLnrB7KtkhIeyUOkKyw
Instead use actual animatorSet to do the animating.
- This also fixes the timings so that the pill transition happens at the same time of the icon alpha animation.
Made member variable for lockText and settingButton.

bug:346298256
Test:
before: See bug
after manually- video: https://drive.google.com/file/d/1B7PIgrGWMJTphc1b5CvCkyg-QYx3TTN3/view?usp=sharing
Flag: com.android.launcher3.enable_private_space

Change-Id: I049b84dbe1279a0becb090db8660975dc5c5961e
2024-07-17 10:35:53 -07:00
Andrew Cole 6ce5c66356 Test Week - FolderAccessibilityHelperTest
Adding unit tests for FolderAccessibilityHelper. In order to write these tests we have also included a refactor of DragAndDropAccessibilityDelegate to get mDragLayer and the accessibility delegate from ActivityContext instead of Launcher. This allows us to pull that from test context in ActivityContextWrapper during testing.

* Tests 1 class previously untested
* Tests 3 methods
* Includes 1 class refactor

Bug: 353303621
Test: FolderAccessibilityHelperTest
Flag: TEST_ONLY

Change-Id: I8d13113fc09d3ee902faecc426deb80bcbae0b0d
2024-07-17 09:48:30 -07:00
Charlie Anderson 98c3cafcaf [Test Week] Add tests for each operation in PackageUpdatedTask
Bug:353303621
Test: unit test
Flag: TEST_ONLY

Change-Id: Ic2194fd1506c4ff5a542eac62a492f395d12886e
2024-07-17 11:06:38 -04:00
Shamali P 3ae39c72de Cleanup widgetsModel and add tests
1. Removes unused method `getAllWidgetComponentsWithoutShortcuts`
2. Exposes widgets either as component map or package item map - to
eliminate the duplicate logic around widget sections.
3. Add tests that validate that each package is unique - to help
cover the redirect issue seen in past.
4. In follow up cls, other methods that deal with picker specific data
types like WidgetsListBaseEntry will also be moved out - leaving the
model to only be responsible for providing all widgets map or widgets
by package.

Bug: 341611976
Flag: EXEMPT BUGFIX
Test: Unit test
Change-Id: Ife70874d312b51c66025a6ec678480f2b5c41793
2024-07-17 14:29:31 +00:00
Charlie Anderson db7b6a0104 Merge "Add new Cloud archived app icon and support for inline icons for BubbleTextView" into main 2024-07-17 13:57:38 +00:00
Sebastian Franco c275326e40 Remove unused methods
Bug: 353303621
Test: compiles
Flag: NONE Removing code
Change-Id: Ibfdc983c5d29d8e928e4277dac285d4e62bdc1fd
2024-07-16 19:10:32 -07:00
Charlie Anderson d5acd6a016 Add new Cloud archived app icon and support for inline icons for BubbleTextView
- Can now set start drawable for BubbleTextView title with setTextWithStartIcon()
 - App Archiving cloud overlay icon will be disabled when flag on

Bug: 350758155
Test: locally tested B&R with pre-archiving
Flag: com.android.launcher3.enable_new_archiving_icon

Change-Id: I4d395a7ea7dc5ee11259f897d45b83eabdabb766
2024-07-16 19:39:03 -04:00
Stefan Andonian f50dca1138 Merge "[Test Week] Unit test for WidgetManagerHelperTest." into main 2024-07-16 23:07:40 +00:00
Stefan Andonian 19c5f7ae71 [Test Week] Unit test for WidgetManagerHelperTest.
6 public methods covered.

Bug: 353303621
Test: Unit Test
Flag: EXEMPT unit test
Change-Id: I549d97f5b57f0e6e9af44bd1695d94ebfa0538f2
2024-07-16 20:58:11 +00:00
Stefan Andonian 9fb11f4d95 Merge "[Test Week] Move ListenableHostView into it's own class for ease of unit testing." into main 2024-07-16 18:51:55 +00:00