Commit Graph

18242 Commits

Author SHA1 Message Date
Winson Chung
bb32b7e0de Migrate PackageManagerHelper to MainThreadInitializedObject
- This is in preparation for other things that can be loaded with
  PMH initialization and prevents duplicate temporary helpers from
  loading this many times.
- Most calls in PMH can use the app context, but one call requires
  starting activities/showing toasts so that one needs to take the
  context and can be made static instead.

Bug: 323112914
Test: atest NexusLauncherTests
Change-Id: Id11c780955880cf49c022cbf2744c41e1b696355
2024-04-22 12:35:03 +00:00
Shamali Patwa
a80e199798 Merge "Keep rounded corners while scrolling in right pane & fix scrollbar size." into main 2024-04-19 22:43:39 +00:00
Stefan Andonian
f22011a51c Merge "Use ItemInfo with correct position when adding to Workspace via Accessibility." into main 2024-04-19 21:13:11 +00:00
Shamali Patwa
4ee10f33ee Merge "Use same margins for widgets bottom sheet as all apps." into main 2024-04-19 21:08:24 +00:00
Anushree Ganjam
093ef5fa30 Merge "When AllAppsSearchBarController's mInput edit text focus is false, we should hidekeyboard." into main 2024-04-19 19:59:44 +00:00
Stefan Andonian
86d3c8814b Use ItemInfo with correct position when adding to Workspace via Accessibility.
Bug: 332651703
Flag: NA
Test: Verified that the issue isn't reproducible with the fix. The issue
was 100% reproducible before.
Change-Id: I01207396e19b4f7d14d6a147e5e5fb98bae9ea99

Change-Id: I81aad9758ee33b8acc2d6a1242e54f2a47124374
2024-04-19 16:22:39 +00:00
Fengjiang Li
7d80f801b1 Merge "[Predictive Back] AbstractSlideInView#mViewToAnimateInSwipeToDismiss can be private" into main 2024-04-19 16:22:30 +00:00
Charlie Anderson
299e42cf8d Merge "Fix NPE for where intent.package is null but targetpkg is not." into main 2024-04-19 15:10:20 +00:00
Brandon Dayauon
715059a1e3 Merge "Make settings cog animate back to original button" into main 2024-04-19 10:07:36 +00:00
Brandon Dayauon
24db282ed4 Merge changes Ied2efcf6,I07579635 into main
* changes:
  Polish workFAB with updated spec.
  Fix workFAB alignment.
2024-04-19 00:59:19 +00:00
Anushree Ganjam
d169cb3667 When AllAppsSearchBarController's mInput edit text focus is false, we should hidekeyboard.
The searchEditText has focusableInTouchMode = true, See https://source.corp.google.com/h/googleplex-android/platform/superproject/main/+/main:vendor/unbundled_google/packages/NexusLauncher/res/layout/typeahead_search_input.xml;l=47;drc=199723c3c6db539cce4c03b5b612015fe040b202

See https://developer.android.com/reference/android/view/View#attr_android:focusableInTouchMode which says "Boolean that controls whether a view can take focus while in touch mode. If this is true for a view, that view can gain focus when clicked on, and can keep focus if another view is clicked on that doesn't have this attribute set to true."

So when external keyboard is connected and we come out of all apps in touch mode, the edit text still has focus in touch mode and continues to keep focus even though clearFocus() is called. So we hide the keyboard so that input connection is not established with edit text anymore.

Before: https://b.corp.google.com/issues/317742889#comment22

After: https://b.corp.google.com/issues/317742889#comment23

Bug: 317742889
Flag: NA
Test: Manual
Change-Id: Ib297b4cdf376d41e244d2b798a101e4255de5108
2024-04-18 15:32:48 -07:00
Shamali P
5f7eb1f2ee Keep rounded corners while scrolling in right pane & fix scrollbar size.
[demo](http://screencast/api/gif/NDU4MTQ5ODE3Mzc4NDA2NHxhYmUzMDcxNy04MA/image)

Bug: 333734241
Test: screencast
Flag: N/A
Change-Id: Ifb522ca2c0a1092bf41c630e336b19c81d504c26
2024-04-18 22:32:30 +00:00
Shamali Patwa
1b8fcf4371 Merge "Revert "When getting a widget provider by name, check all categories"" into main 2024-04-18 22:14:29 +00:00
Charlie Anderson
ce255ff6fd Fix NPE for where intent.package is null but targetpkg is not.
- Also update WorkspaceItemProcessorTest with a new test and to use real intent instead of mock

Bug: 330250727
Test: unit tests
Flag: N/A
Change-Id: I77e17901f4754c301ca20b3c6f93bbe29bead59b
2024-04-18 17:48:27 -04:00
Brandon Dayauon
20a6ffd04b Merge "Fix install apps button" into main 2024-04-18 21:42:59 +00:00
Brandon Dayauon
baf5f6ec3d Polish workFAB with updated spec.
Updating the workFAB to the new spec: https://docs.google.com/presentation/d/1tTODboxGqJ3ypEyYnr0-bUpSXcvX1cl6Sj8y0Nut5hU/edit?resourcekey=0-9GT8EJG43kTT4aKPWVWRig#slide=id.g2c8f3ae8e02_0_0
Have the background endPadding to be 4 and icon have an endMargin of 12 and the text endMargin of 16.
So that when the text is disappeared, the space between the icon and the right bound is 16dp to spec.

bug:332761814
Test manually:
after LTR expanded:https://drive.google.com/file/d/1NZQW0CF9VFZBoM3673LFiUknqW2nf4r8/view?usp=sharing
after LTR collapsed: https://drive.google.com/file/d/1NRpdTuYQntSs5-yeRL1fJIJy2ETDOYLM/view?usp=sharing
after RTL collapsed: https://drive.google.com/file/d/1NE51MIsS5Fk0DwAuzCehEQzTa42OGj_o/view?usp=sharing
after RTL expanded: https://drive.google.com/file/d/1NPgiPfzw3DOa_xbB_TtlwK-G1Y5WCi53/view?usp=sharing
Flag:None

Change-Id: Ied2efcf6b1bd19c191d80e47bae4f8f6e3794803
2024-04-18 14:40:42 -07:00
Brandon Dayauon
4e68d3992d Fix workFAB alignment.
The calculation to find how much the FAB should shift is outdated as using the
method from deviceProfile#getAllAppsIconStartMargin() gives a better value.

bug:332761814
Test manually:
after LTR expanded:https://drive.google.com/file/d/1NZQW0CF9VFZBoM3673LFiUknqW2nf4r8/view?usp=sharing
after LTR collapsed: https://drive.google.com/file/d/1NRpdTuYQntSs5-yeRL1fJIJy2ETDOYLM/view?usp=sharing
after RTL collapsed: https://drive.google.com/file/d/1NE51MIsS5Fk0DwAuzCehEQzTa42OGj_o/view?usp=sharing
after RTL expanded: https://drive.google.com/file/d/1NPgiPfzw3DOa_xbB_TtlwK-G1Y5WCi53/view?usp=sharing
Flag:None

Change-Id: I07579635d6176553d27497cb73b81799648fb014
2024-04-18 14:40:41 -07:00
Brandon Dayauon
120838b04d Make settings cog animate back to original button
Provide the appropriate itemInfo so that launcherBackAnimation would play correctly.

bug:324569690
Test manual video: https://drive.google.com/file/d/1GfjL4PhdGOxs2KfDpieTNiFiKQ61aCgh/view?usp=sharing
Flag: ACONFIG com.android.launcher3.Flags.enable_private_space trunkfood

Change-Id: I1a9458643e932b279bf4ba4ea33e3dc0a2c121c2
2024-04-18 14:32:33 -07:00
Fengjiang Li
aa64c04ed8 [Predictive Back] AbstractSlideInView#mViewToAnimateInSwipeToDismiss can be private
Bug: 335467443
Test: presubmit
Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TRUNKFOOD
Change-Id: Ibf4b6f04d829daa6a109724c927bf466c25160d5
2024-04-18 13:37:34 -07:00
Shamali Patwa
7e5ed568b9 Revert "When getting a widget provider by name, check all categories"
This reverts commit 1f69351310.

Reason for revert: Testing odd behavior between google app and pixel weather and duplicate items issue

Change-Id: If181aa3e86969e8821b7e1cc765c3801f04489d2
2024-04-18 18:16:38 +00:00
Brandon Dayauon
fe791d11aa Fix install apps button
- Setting the button's user via iteminfo to the privateprofile user
doesn't let the user to go into the play store. This was initially done so that
we can check the itemInfo to see if item is private space instead of just checking
if the item has a decorationInfo for collapse animation.
- The itemInfo change is reverted and we can check that case by checking with instanceOf PrivateSpaceInstallAppButtonInfo

bug:335600922
Test manually video: https://drive.google.com/file/d/1N2zOHvPmBptBaBf8SCqjBAM6UhV0lQBI/view?usp=sharing
Flag: ACONFIG com.android.launcher3.enable_private_space TRUNKFOOD

Change-Id: I09f22c9df5b4f9408eea6995eafea83e30c93a0d
2024-04-18 16:59:49 +00:00
Shamali P
50bf021b02 Use same margins for widgets bottom sheet as all apps.
* Per UX discussion with jane and david, the full width looks too large
for the app info -> long press -> widgets bottom sheet.
* Earlier during POR, we decided to match them all, but after trying it out, we think smaller is better for the app specific bottom sheet.

* http://screencast/cast/NTg1Njk1MDUxOTU5NTAwOHxiMDU0YWJhMi04MQ
* http://screencast/cast/NjU0NjQyODgwMDI3MDMzNnw4NDNhMGVjMy0yMg


Bug: 328812171
Test: screencast
Flag: N/A
Change-Id: I9b0a996f80bac2639bcadf85480468ac886c7093
2024-04-18 16:58:39 +00:00
Sunny Goyal
a82ce1feda Merge "Making moving getDisplayType to DisplayController so that it can be accessed without IDP" into main 2024-04-18 05:51:58 +00:00
Fengjiang Li
240dbab022 Merge "[Predictive Back] Swipe back within taskbar all apps should only scale down content view, rather than whole all apps sheet" into main 2024-04-18 03:20:59 +00:00
Fengjiang Li
1529052dcf [Predictive Back] Swipe back within taskbar all apps should only scale down content view, rather than whole all apps sheet
Bug: 335467443
Test: manual - took a video
Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TRUNKFOOD
Change-Id: I45980329f70ac1a8a8fc0e84be007f3385e40f58
2024-04-17 16:09:21 -07:00
Brandon Dayauon
ef051ce98d Merge "Instead of popup to show letters, show private space icon on fast scrolling" into main 2024-04-17 22:32:59 +00:00
Brandon Dayauon
a1af2cee1c Instead of popup to show letters, show private space icon on fast scrolling
Use spannableString to show the icon instead of regular letters for the private space icons.

bug:304752744
Test manual: https://drive.google.com/file/d/1LFy4-bu69Kuo8eV4erjJOsbkiQJs09kC/view?usp=sharing
Flag: None

Change-Id: I149d7aba6b0a4fdafacd2684e56827c7e1b9d724
2024-04-17 12:37:38 -07:00
Sunny Goyal
25c4276ba9 Making moving getDisplayType to DisplayController so that it can be accessed without IDP
Bug: 335280439
Test: Presubmit
Flag: None
Change-Id: Ib1ef3c970a56044c81e36c4af67981715fe50a9e
2024-04-17 10:39:50 -07:00
Fengjiang Li
34f2c92e39 Merge "[Predictive Back] If back swipe while widget picker is in search mode, we should scale down the content view, rather than the bottom sheet" into main 2024-04-17 16:53:54 +00:00
Sebastián Franco
f0c030380a Merge "When getting a widget provider by name, check all categories" into main 2024-04-17 16:24:21 +00:00
Fengjiang Li
85a495f066 [Predictive Back] If back swipe while widget picker is in search mode, we should scale down the content view, rather than the bottom sheet
This will help indicate that we will be navigating within widget picker's bottom sheet.

Fix: 333524244
Test: manual - took a video
Flag: aconfig com.android.launcher3.enable_predictive_back_gesture TEAMFOOD
Change-Id: If29806a474d35c0fdd5789cb67fa62dfbb313313
2024-04-16 17:13:22 -07:00
Sunny Goyal
f15a96608a Merge "Moving developer settings to xml overrides instead of code swap" into main 2024-04-16 21:27:04 +00:00
Willie Koomson
f01687ab5a Merge "Scroll to show WidgetCell when it is tapped." into main 2024-04-16 20:42:12 +00:00
Federico Baron
6188ec4157 Merge "Make hotseat column span responsive" into main 2024-04-16 17:17:55 +00:00
Winson Chung
ad82df4d37 Merge "Migrate WorkspaceItemInfo non-resizeable flag to runtime status flag" into main 2024-04-16 16:41:42 +00:00
Brandon Dayauon
31e713ee4c Merge changes If93e3975,Ifed45f06 into main
* changes:
  Fix views being visible after closing private space.
  Set attach consumer after animation finished
2024-04-16 15:14:26 +00:00
fbaron
e4b0b71faa Make hotseat column span responsive
Flag: NONE
Test: DeviceProfileDumpTest, DeviceProfileAlternativeDumpTest, HomeScreenImageTest
Bug: 325084912
Change-Id: Ifa9e8066662a1ab053f66b8800b739d813d2dab8
2024-04-16 06:19:16 +00:00
Winson Chung
240956e7d8 Merge "Use shared method for updating the runtime status flags for an item info" into main 2024-04-16 02:59:54 +00:00
Stefan Andonian
0d2cc9e87c Merge "Revert^2 "Remove Unused parts of LauncherPrefs causing cyclical dependency."" into main 2024-04-16 02:42:04 +00:00
Sebastian Franco
1f69351310 When getting a widget provider by name, check all categories
Some widgets have different categories for special cases for Pixel
widgets and because of that, some times we can't find the provider,
so we need to go through all of the categories.

Flag: NA
Test: Manaul testing =(
Test: All widgets in widget_section.xml with alsoKeepInApp set to false will previously dissapear on the preview.
Fix: 331628371
Change-Id: Iffbb788cbb27c79a215d06d21c9d623462d6f7e6
2024-04-15 19:21:21 -07:00
Priyanka Advani
7d92102140 Merge "Revert^3 "Wait for LauncherModel loaded in waitForLauncherInitialized"" into main 2024-04-16 00:46:24 +00:00
Willie Koomson
dcc2d82d4e Scroll to show WidgetCell when it is tapped.
Scroll to show WidgetCell when it is tapped in a widget sheet.
Otherwise, the add button may show/hide without the user seeing
it if the bottom is clipped.

Bug: 329861721
Test: manual- tap WidgetCell when top or bottom is scrolled out of view
Flag: ACONFIG com.android.launcher3.enable_widget_tap_to_add TEAMFOOD

Change-Id: Ie21730c193e845cb1c1fa447b7c0a7e719984a8f
2024-04-15 22:32:48 +00:00
Priyanka Advani
4e97c94559 Revert^3 "Wait for LauncherModel loaded in waitForLauncherInitialized"
This reverts commit 503ce966ef.

Reason for revert: Culprit for test breakages in b/334995023. Will be verifying through ABTD for confirmation and before submitting the revert.

Change-Id: Id8707cb2074b4f00ec332ebb14deb7d143ff1bbb
2024-04-15 22:18:31 +00:00
Brandon Dayauon
14ec21748b Fix views being visible after closing private space.
Its possible views are still being binded before the app list is refreshed.
So instead make the views gone in that case (by making sure private profile is disabled).

Fixes:
- install app icon still showing because it is not identified as a private space item
- Divider still containing a decorator when collapsing before app list is refreshed.

bug: 334868779
Test video manualy:
before:https://drive.google.com/file/d/1IWdGsTSq7-xRZKOJso-5p9g-j7RTEkas/view?usp=sharing
after:https://drive.google.com/file/d/1IVNTksryFi5o4uHzZtzNC0Yz7-rxrje3/view?usp=sharing
Flag: ACONFIG com.android.launcher3.Flags.private_space_animation trunkfood

Change-Id: If93e39753352741fb6f0728f717a67b7f9315d0b
2024-04-15 14:40:58 -07:00
Schneider Victor-tulias
9d4fb2b5be Merge "Revert^2 "Wait for LauncherModel loaded in waitForLauncherInitialized"" into main 2024-04-15 19:30:38 +00:00
Sunny Goyal
2eeee631aa Moving developer settings to xml overrides instead of code swap
Bug: 330920490
Test: Verified on device
Flag: None
Change-Id: Ibba96a57c8eb7347399ab32577a0e395ae886e91
2024-04-15 11:29:22 -07:00
Stefan Andonian
1a626d2d05 Revert^2 "Remove Unused parts of LauncherPrefs causing cyclical dependency."
This reverts commit a80997d9eb.

Bug: 324670265
Test: Locally tested this, as well as ran it through post-submit via go/abdt with the fix.
Flag: NA
Reason for revert: Root-caused the issue with this, and will push the fix along with this revert.

Change-Id: I4bda53d94dfdb865883fef6ceec9dacd0b87f015
2024-04-15 18:28:25 +00:00
Andy Wickham
e0b23658d8 Merge "Cancel manual animation if LauncherState changes during drag." into main 2024-04-15 18:14:45 +00:00
Brandon Dayauon
a271511240 Set attach consumer after animation finished
Its possible after the animation that attached view's alpha can still be stuck at 0 and never change.
This only happens when the view isn't in range to animate and after onBind() is already called.

Also added flag guarding to the animation as it seems to be forgotten since the big CL change moving
everything to privateProfileManager.

bug: 333506236
Test locally: https://screenshot.googleplex.com/8Kk6rLaczMPwr49 and https://screenshot.googleplex.com/9wXHeNuiCVFEMp6
manually: before https://drive.google.com/file/d/15hSqaUVjwE-lLp6IIv_mqwYbn_ITzR7s/view?usp=sharing
after: https://drive.google.com/file/d/15m7Al5H3vldFgIaQfFyulm1h92_Mgd0H/view?usp=sharing
Flag: ACONFIG com.android.launcher3.Flags.private_space_animation trunkfood

Change-Id: Ifed45f065b536bca5e8878b1bb95d16caf136ed6
2024-04-15 10:12:08 -07:00
Andrew Cole
f2ae4d309f Merge "Removing Shrink Adaptive Icons" into main 2024-04-15 16:19:33 +00:00