Commit Graph

1155 Commits

Author SHA1 Message Date
Sebastian Franco
cc18ee380e Do not modify the original item info when adding a new item in Worksapce
Fix: 418114270
Test: NA
Flag: EXEMPT bug fix
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:dbd6f0d18f69d5d33862aaad015c4c8c5907fb46)
Merged-In: Ic0dd00da4f363868a1c2abeeb736b86f6f706631
Change-Id: Ic0dd00da4f363868a1c2abeeb736b86f6f706631
2025-06-25 21:04:11 -07:00
Sebastian Franco
136295f62a Moving AllApps device profile variables to their own class
Bug: 419264653
Flag: EXEMPT refactor
Test: DeviceProfileDumpTest
Test: All Image tests
Change-Id: I6490422d04f9f0aeaadf8271d4d11172f344660a
2025-05-30 09:56:01 -07:00
Sebastián Franco
e1d31e5406 Revert "Revert "Moving DeviceProfile properties into DevicePrope..."
Revert submission 33716851-revert-33672643-DataDeviceProfile1-XHYRAPLEBK

Reason for revert: Error is fixed

Reverted changes: /q/submissionid:33716851-revert-33672643-DataDeviceProfile1-XHYRAPLEBK

Change-Id: Ib86824134955903c11e51e52dbfd6368aba1cd50
2025-05-23 14:08:11 -07:00
Priyanka Advani (xWF)
7705e92d93 Revert "Moving DeviceProfile properties into DeviceProperties da..."
Revert submission 33672643-DataDeviceProfile1

Reason for revert: Droidmonitor created revert due to b/419867875. Will be verifying through ABTD before submission.

Fix: 419867875

Reverted changes: /q/submissionid:33672643-DataDeviceProfile1

Change-Id: Icb66aefbbcee24e05806b2139923e1f2ea1c65e3
2025-05-23 13:53:04 -07:00
Sebastian Franco
e1111e28c2 Moving DeviceProfile properties into DeviceProperties data class
Bug: 419264653
Flag: EXEMPT refactor
Test: DeviceProfileDumpTest
Test: All Image tests
Change-Id: I638f88cd76b926917965dbf9e70b5bdfff5971e0
2025-05-23 10:42:26 -07:00
Sunny Goyal
7a332e02aa Removing Smartspace as a widget flag
Bug: 300140279
Flag: EXEMPT removing dead code
Test: Presubmit
Change-Id: If24db0b4c2c119f5cbe1153e3d77599d12ff80a6
2025-05-01 16:00:04 -07:00
Sebastián Franco
d23b8fc142 Merge "Always change the container when dropping in icon" into main 2025-04-29 09:51:09 -07:00
Sebastian Franco
fea773a5c2 Always change the container when dropping in icon
I was being cautios on my previous fix for this same
isse, cautios because I'm modifying an object by reference
That's why I was only updating the container when the icon being
dropped was PendingAddShortcutInfo but we can change the container
on every icon (we don't need to in the Widget case which is the
other if statement), we can be sure it is a safe operation because
we later update the info anyway rendering the previous info invalid.

Fix: 413784315
Test: WIP
Flag: EXEMPT bug fix
Change-Id: I60ecdb52be1c7bf0584cb1c74ee15b85961e5012
2025-04-28 11:57:17 -07:00
Sunny Goyal
07cfe33533 Renaming CONTAINER_PREDICTION to CONTAINER_ALL_APPS_PREDICTION
This avoids confusion with CONTAINER_HOTSEAT_PREDICTION

Bug: 390572144
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: I0e110e2884dd0566bd2e621e60e7458605b9bad7
2025-04-28 09:30:12 -07:00
Sunny Goyal
007cfecf5e Merging update and modify model callbacks
Instead of the dispatcher specifying the type, the UI checks th diff. This
ensures that the UI is updated correctly in all paths

Bug: 390572144
Flag: EXEMPT refactor
Test: Manually verified folder edit path where these callbacks were getting dispatched

Change-Id: Ib73eed5da87a847753a78453a48ab4fc495c1199
2025-04-21 12:31:23 -07:00
Sunny Goyal
613db2b609 Removing flag enable_smartspace_removal_toggle
Test: Presubmit
Flag: EXEMPT cleanup
Bug: 303471576
Change-Id: Iae8cc3afbf15c66612589fd1e19377e4339af7fc
2025-04-16 10:54:45 -07:00
Sebastian Franco
04b0a4a0d8 Use correct container for predictive icons
Fix: 408280336
Test: Manual Testing
Flag: EXEMPT Bug Fix
Change-Id: I20432ee13247bd4dbd089fc936476333900150e6
2025-04-11 14:51:29 -07:00
Sunny Goyal
0479ff832c Using ItemInflator for inflating Folder instead of duplicating code
Bug: 406668365
Flag: EXEMPT refactor
Test: atest FolderTest
Change-Id: I63186ba620b5380edfc5e8cded253a85379a5d82
2025-03-27 09:48:46 -07:00
Sunny Goyal
ca1f87d8f5 Update Launcher UI when model changes are made outside of Launcher UI
Bug: 305877212
Flag: EXEMPT bugfix
Test: Verified manually by modifing folder in taskbar
Change-Id: I513dcfbc9e4ffcd970766ce8352815571e576461
2025-03-26 13:52:53 -07:00
Sunny Goyal
1ac78b6ec6 Removing listeners from FolderInfo
Folder and FolderIcon are UI objects and can talk to each other directly.
FolderInfo changes are already propogated via model callbacks, and doesn't need a separate listener pattern.

Bug: 398791288
Flag: EXEMPT bugfix
Test: atest FolderTest

Change-Id: Iefd47b8ea12a8ecaf34211a3d908220a0e999187
2025-03-13 10:28:07 -07:00
Treehugger Robot
57cab7794a Merge "Simplifying some view iteration methods" into main 2025-03-04 18:42:06 -08:00
Sunny Goyal
476d926972 Simplifying some view iteration methods
Bug: 393703968
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: Ieffa3a66fbf8595d542995c348df578a3aec9083
2025-03-04 10:39:55 -08:00
Treehugger Robot
b43cae24a4 Merge "Fix home screen page description when removing an existing page." into main 2025-02-28 21:26:35 -08:00
Shamali P
94e276c1c5 Fix home screen page description when removing an existing page.
When we remove an in-between or last empty page, we manually set the
current page but don't update the description that's set on the
accessibility view. Due to which, when talkback focuses on it, it sees
the stale page count in the description.

This fix ensures to keep the state updated during removal.

Bug: 390360063
Fix: 390360063
Test: Talkback
Flag: EXEMPT BUGFIX
Change-Id: Idd9a54d3a1ee43e56f51db78e614776eca6a12f7
2025-02-27 12:16:23 -08:00
Sunny Goyal
39063bf167 Merging some notification dots implementation
Bug: 393703968
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: Ie02311afba85f06fbafd265a5015cd23bd356a36
2025-02-27 08:50:26 -08:00
Fengjiang Li
e0553d7da3 [Memory Leak] Fix leak of LauncherAppWidgetHostView via StateManager.StateListener
Rather than register a StateListener for each LauncherAppWidgetHostView, just register one StateListener which, upon launcher state is changed to NORMAL, iterate over all child views under Workspace and perform a11y action if view tag is set.

Fix: 397978703
Test: presubmit
Flag: EXEMPT bug fix
Change-Id: I044d012b74eaa5356196c5503318fa8ab389ec46
2025-02-20 22:05:02 -08:00
Anushree Ganjam
7128c6fcfb Refactor TestEmitter and it doesn't need to be MainThreadInitializedObject
Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger

Change-Id: I30e7c3c165db698785e9e4d7e2256ab061ff71a2
2025-02-13 15:20:17 -08:00
Treehugger Robot
821572007d Merge "Revert^2 "Unifying various model update callbacks into one"" into main 2025-01-30 15:45:47 -08:00
Sunny Goyal
dfbbebc9e3 Revert^2 "Unifying various model update callbacks into one"
72f9943f64

Change-Id: I38901714947a2b7926723ea25df4a2b8216303e4
2025-01-30 13:19:32 -08:00
Priyanka Advani (xWF)
da2e19a821 Merge "Revert "Unifying various model update callbacks into one"" into main 2025-01-30 13:12:33 -08:00
Pechetty Sravani (xWF)
72f9943f64 Revert "Unifying various model update callbacks into one"
Revert submission 31445615-model-callbacks

Reason for revert: <Droidmonitor crested revert due to b/393222548. Will be verified through ABTD for stanadard investigation.>

Reverted changes: /q/submissionid:31445615-model-callbacks

Change-Id: If6893a125756e5abfbb215af377576429bb1c91b
2025-01-29 22:46:55 -08:00
Treehugger Robot
473bd5c0a0 Merge "Unifying various model update callbacks into one" into main 2025-01-29 16:05:25 -08:00
Treehugger Robot
1cbb8fefe6 Merge "Fix errorprone warnings" into main am: 8a281b4ef8 am: b6e2e21180
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/3464325

Change-Id: Ibaff978fb28561a2743e989cf7817277f7defcf6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2025-01-28 20:03:07 -08:00
Sunny Goyal
36c3112abf Unifying various model update callbacks into one
Making the BubbleTextView.applyItem stateless so that it does not depend on the order of events

Bug: 390572144
Flag: EXEMPT refactor
Test: atest LauncherBindableItemsContainerTest
      atest BubbleTextViewTest
Change-Id: Ib9c0ac6c330d6f4e08c3db5772d35787fa056b65
2025-01-28 16:03:01 -08:00
Cole Faust
42fc2058e6 Fix errorprone warnings
https://errorprone.info/bugpattern/BadInstanceof
https://errorprone.info/bugpattern/CompareToZero

Bug: 253827323
Test: Presubmits
Flag: EXEMPT refactor
Change-Id: If28f8f7f407b5b1e58911c58bb7d1b80f08c6114
2025-01-27 09:54:02 -08:00
Treehugger Robot
47b4339df5 Merge "Fix Talkback Announcement for Workspace Pages" into main 2025-01-16 17:21:33 -08:00
Stefan Andonian
e73541c30c Fix Talkback Announcement for Workspace Pages
Bug: 379649357
Test: Verified manually that the fixes work for announcements.
Flag: EXEMPT bug fix
Change-Id: I0a2e989eb34adbd975a7211d8334d264d64b3933
2025-01-16 15:19:04 -08:00
Stefan Andonian
6284b233bf Maintain Talkback / Voice Access / etc. focus after moving item in Workspace.
Bug: 383456105
Test: Verified this works well manually.
Flag: EXEMPT bug fix
Change-Id: I35377443c4800a53cfa539c7061d5ef1b8b27837
2025-01-07 09:57:43 -08:00
Sihua Ma
67db76e847 Merge "Change home screen state description to manifest page change" into main 2025-01-06 10:37:20 -08:00
Stefan Andonian
fa8e3f9292 Call AccessibilityDragListener immediately after Workspace's OnDragListener.
This ensures that the dragInfo has not been set to null before the AccessibilityDragListener's
onDragEnd is called. Previously, this was breaking long accessibility moves.

Bug: 387563703
Test: Verified locally that this fixes the issue.
Flag: EXEMPT bug fix.
Change-Id: I8d25c3865a0a025a9dad341ea39062cb3658a763
2025-01-03 16:19:34 -08:00
Sihua Ma
2bad402275 Change home screen state description to manifest page change
Bug: 383247157
Test: Manual
Flag: EXEMPT bug fix
Change-Id: I1c2d3aa90d2b4ee9a1beaa4fbe7db57e79ae49dc
2025-01-03 00:00:48 +00:00
Sihua Ma
4ccf8e2957 Remove disruptive home screen announcement when scrolling
Test: Manual
Flag: EXEMPT bug fix
Fix: 383247157
Change-Id: I8470740af2720b328a358a21507270a4735a53a4
2024-12-20 19:07:56 +00:00
Juan Sebastian Martinez
a91fbb2efd Adding MSDL haptics for dragging app icons in Workspace and Hotseat.
The feedback occurs when an icon hovers over an empty available space in
Workspace and Hotseat, as well as over other icons to create folders.
This is now compliant with the Multi-sensory Design Language spec.

Test: manual. Verified haptics while dragging icons over Workspace and
  Hotseat.
Test: manual. Verified haptics with adb shell dumpsys of Launcher and
  checking the MSDL token history.
Flag: com.android.launcher3.msdl_feedback
Bug: 371314631

Change-Id: I7d039ddf9d05faa39a6e6e3f9a84217d8916adc0
2024-11-22 10:31:18 -08:00
Matthew Mourgos
450fb42e0f Close any open widget resize frames when changing pages.
When a widget is added while talkback is enabled, the widget resize
frame does not automatically close when subsequently changing workspace
pages. This is because touch events which usually would cause the
widget resize frame to close, get intercepted by talkback before they
get to the resize frame.

Bug: 374044529
Test: manual - activate talkback, add new widget, and change page
Flag: EXEMPT bug fix
Change-Id: I2b8db22fa237a188c6705e9c6e57b12c1a7cd2f6
2024-11-12 06:06:53 +00:00
Fengjiang Li
a7e357e339 [-1] Show toast when user trys to swipe to -1 on extreme battery saver mode
Fix: 355485335
Flag: com.android.launcher3.use_activity_overlay
Test: manual - record a video
Change-Id: I79a3ece2fb2c0d1eddac0e4f91274ffe222e317f
2024-09-09 19:06:17 -07:00
Stefan Andonian
fb34891ba6 Add logs to check if onLayout is ever not called.
Bug: 349929393
Test: Verified locally that the logs are shown in a bugreport.
Flag: EXEMPT logs
Change-Id: Ie5b759a2616456db9e232efcb0cfd21fdd4cc291
2024-08-15 18:22:25 +00:00
Sebastian Franco
224f67a046 Moving ReorderWidgetsTest to an integration test instead of E2E
Flag: TEST_ONLY
Test: IntegrationReorderWidgetsTest
Bug: 324261526
Fix: 343761044

Change-Id: I9bfe8b587e1024260ddeeb48157c3d204f2d58f2
2024-07-10 04:20:41 +00:00
randypfohl
176ce85d27 Abstracting StatefulActivity from StateManager
Flag: NONE - abstraction with no logic changes.

Test: Built and ran locally, for launcher3 and third party launchers

Bug: 224595066

Change-Id: I9da15bdd649d3a20e98c6552bb9e9abaec72f97f
2024-06-13 10:26:12 -07:00
Sunny Goyal
15949163a6 Merge "Removing disabled color extractor from Widgets" into main 2024-04-30 03:51:37 +00:00
Federico Baron
c113ce9f9f Merge "Migrate smartspace as a widget and smartspace removal toggle flags to aconfig" into main 2024-04-29 21:46:03 +00:00
Sunny Goyal
277ef4868c Removing disabled color extractor from Widgets
Bug: 266941872
Flag: None
Test: Presubmit (removed dead code)
Change-Id: Ie45cf08c694652266af6c95dab0eac5b9dd138f6
2024-04-26 15:46:04 -07:00
Sunny Goyal
638a687fc8 Converting IconShape to mainThreadInitializedObject instead of
keeping it a process static

Bug: 297950111
Flag: None
Test: Presubmit
Change-Id: Id66100e0cb300659c6017c287eb38ab04290477b
2024-04-25 15:56:30 -07:00
fbaron
9d08e0fe70 Migrate smartspace as a widget and smartspace removal toggle flags to aconfig
Bug: 336823684, 336823681
Test: none
Flag: ACONFIG enable_smartspace_as_a_widget DISABLED
Flag: ACONFIG enable_smartspace_removal_toggle DISABLED
Change-Id: I4cba42e09f58365f761ab866b15a494817e6bb0f
2024-04-25 14:26:30 -07:00
Jeremy Sim
05617cb11f Update app pair icon colors when switching containers
This CL updates the color for the app pair background, and adds a way for an app pair icon to redraw as a different color when switching containers.

Bug: 315731527
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual
Change-Id: I615cb95d51f7c4c120ad306246d9491bf4452229
2024-04-04 15:07:30 -07:00
Jeremy Sim
a596f589c4 Allow app pairs in folders
This CL substantially refactors folders to be able to take contents of type AppPairInfo. App pairs can now be moved in and out of folders, and launch from folders.

This CL contains only logic and model changes; animation and style changes (for dropping items into folders, color changes to app pair surfaces, etc.) will be in a following CL. Another CL (hopefully) will contain tests. I'm planning to submit them together, but this patch should also be able to stand alone with no issues (except janky transitions).

Bug: 315731527
Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD
Test: Manual, more to follow in another CL.
Change-Id: I73732fcaefbdc61bf6e02a5be365962b8bbc3e41
2024-04-03 16:47:42 -07:00