1026 Commits

Author SHA1 Message Date
Sunny Goyal
572aca4ce2 Moving some common functionality to IconLoaderLib
Bug: 183641907
Test: Manual
Change-Id: Icfc7ebb140e4e1678b0715beee2e0e513e707b9e
2021-03-25 10:06:53 -07:00
Patryk Michalik
fedd0906b2 Correct application ID to app.lawnchair 2021-03-21 18:22:24 +01:00
Patryk Michalik
ff5ae4ba57 Change application ID to com.lawnchair 2021-03-21 18:18:42 +01:00
Zak Cohen
f19300e479 Return empty, not null, a11y node in Workspace
It's not valid to return a null accessbilitynode.

Test: local
Bug: 182529089

Change-Id: I94245fb33128c68e33ce388284f64e5ac3bb23dc
2021-03-18 20:48:45 -07:00
Steven Ng
93c29bff5b Merge "Apply local color extraction during drag-n-drop" into sc-dev 2021-03-18 12:37:19 +00:00
Steven Ng
30dd1d65f6 Apply local color extraction during drag-n-drop
Test: Drag a test widget around and observe local extract color
      is applied.

Bug: b/182282587, b/182816217
Change-Id: If63a9d91ceb2102d5d913bca85997b8be07b1adf
2021-03-17 18:10:51 +00:00
Alex Chau
1e024358ad Merge "Two panel & two page swipe & currentPage fixes" into sc-dev 2021-03-17 13:47:01 +00:00
Andras Kloczl
8e57cce4ee Two panel & two page swipe & currentPage fixes
- Pagespacing set to 0 to have similar design to figma
- Added padding to left side of left panel and right side of right panel to match figma
- getPageScrolls changed to support two page scrolling
- validateNewPage changed so that only even indexed pages can be switched to
- getPageWidthSize added for measurements, it returns half screen width when two panel is active
- onMeasure changed to use getPageWidthSize
- panelCount has been increased from 1 to 2 when two panel is active
- add feature flag for two panel home
- shouldConsumeTouch changed so not only currentpage is checked but currentpage+1 screen as well
- add one more extra check for setDropLayoutForDragObject for currentpage + 2, next to right panel
- using new grid option for two panel home screen

Test: manual
Bug: 174464115
Change-Id: I1bad7eecc67f65fb833608744a5aa5aca65373b4
2021-03-17 12:19:02 +01:00
Steven Ng
f61949803a Merge "Replace DragView bitmap with drawable" into sc-dev 2021-03-16 21:51:07 +00:00
Steven Ng
0226d1ad79 Replace DragView bitmap with drawable
This is a preliminary work for local color extraction. In order to
apply local colors extracted from wallpaper to AppWidgetHostView
during drag, we need to hold a reference of the dragging
AppWidgetHostView.

In this CL, the following changes are made:
1. Instead of using bitmap image directly for icons, folders, shortcuts,
   legacy widget drawable preview, a BitmapDrawable wrapper is
    introduced.
2. Introduce a WidgetHostViewDraggableDrawable which draws
   LauncherAppWidgetHostView directly to canvas. No more bitmap
   generation overhead.
3. Remove drag outline from the drag logic because this will be replaced
   by a new grid color hint UI: https://screenshot.googleplex.com/7jBEVeuxFecFKKT.png

Test: Add: add widgets, shortcuts from widgets tray.
           add icons from all apps.
           create folder.
      Drag: drag existing widgets, shortcuts, folders and icons around

Bug: 182282587
Change-Id: Ia45ff756ea5bb80cf0761f0727a9453d50c204c0
2021-03-16 00:02:38 +00:00
Tony Wickham
9f9787ad76 Merge "Remove insets due to Taskbar, except on workspace elements" into sc-dev 2021-03-15 23:41:55 +00:00
Patryk Michalik
3fec1d33e5 Finish migrating Settings to Jetpack Compose 2021-03-13 11:18:17 +01:00
Tony Wickham
145b7fd68c Remove insets due to Taskbar, except on workspace elements
Test: go to all apps, ensure no bottom insets/limited nav bar
protection; go to overview, ensure no extra bottom padding

Bug: 171917176
Change-Id: I09dc589e1cb8d3b673bf2b38e42284557413e011
2021-03-12 16:46:54 -08:00
Patryk Michalik
2e1b4f1b39 Add option to allow empty home screen pages 2021-03-11 18:59:14 +01:00
Pierre Barbier de Reuille
ab33b76dce Launcher changes to support dynamic coloring on static widgets.
Bug: 179783721
Test: By hand using the AppWidgetDynamicColors widget
Change-Id: I27863cac31f2f6c29f5a717ff8d4492325f936fb
2021-03-10 22:04:35 +00:00
Tony Wickham
39938cbc94 Initiate Hotseat drag from long pressing corresponding Taskbar item
When you long press on the taskbar hotseat item, the following happens:
- We start a system drag and drop with an invisible drag shadow
- We create a new DragOptions with the simulatedDndStartPoint set to the
  drag down position, and tell Launcher to use that for the next drag
- We perform a long click on the equivalent Hotseat item in Launcher
- We pass the drag events of that operation to Launcher's DragController

This allows Launcher to handle the entire drag operation, including the
pre-drag (with popup), and taskbar already hides when the drag starts.

Test: Long press items in taskbar hotseat, able to drag them to workspace

Bug: 179886115
Bug: 171917176
Change-Id: I576b80cb1bd0225cdc91cf7689fdee0481265109
2021-03-06 03:39:54 +00:00
Sunny Goyal
befaad269e Merge "Fixing empty page not removed when drag ends" into sc-dev 2021-03-05 06:29:33 +00:00
Sunny Goyal
97c2e513b3 Fixing empty page not removed when drag ends
Bug: 179550470
Test: Verified on device
Change-Id: Ie9b20dfde1a64b385041f6e4d32fe47e3c6e5a7d
2021-03-02 13:00:22 -08:00
Alex Chau
b794ea64c7 Show TaskView as grid in large screens
- Introduced gridProgress to RecentsView/TaskView ofr animating into grid
- Introduced gridProgress dependant translation and scale properties in TaskView
- Animate running task into grid with TaskViewSimulator
- Remove overview actions (for now) but keep clear all button in large screens
- Adjust ClearAllButton translation to acoomodate for grid
- Use screen width +-50% to calculate task visibility
- Use the position where TaskView is on screenEnd as pageScroll
- TODO: Handle separate recents activity

Doc: go/foldables-launcher-overview
Video: http://dr/file/d/107Aydii1LoFCwP63nWG3Twr2PBDE5ZgD/view?resourcekey=0-aUjdnx8ezimS9tmAgao9ag
Test: Test Launchering overview and launching overview from apps with folloiwng combination:
- large / small screen sizes
- portrait / landscape
- thumbnails from different screen sizes / orientations
Bug: 174464863
Fixes: 181509346

Change-Id: I4b691cde774f2e37532b68ba83c6eed399f2332e
2021-03-02 17:10:45 +00:00
Yogisha Dixit
741fae9ea2 Move widget files into widget folder + add tests.
I will use the newly created LauncherAppWidgetProviderInfoTest in a follow-up CL to add tests for the newly added widget sizing APIs.

Test: Automatic: Ran all robolectric tests in launcher3,
      Manual: Added a widget, edited the widget, removed the widget
Bug: 179807199
Change-Id: I540b2dbe284c6eb5aa2466a1d13a9581ee59425b
2021-03-01 13:59:52 +00:00
Adam Cohen
12e547f2a8 Merge "Draw the workspace scrim in the LauncherRootView instead of DragLayer" into sc-dev 2021-02-10 23:33:06 +00:00
Adam Cohen
501e139c6e Draw the workspace scrim in the LauncherRootView instead of DragLayer
=> The entire DragLayer is translated during the -1 transition which creates a janky looking edge at the top of the screen

=> By bumping the scrim up a level, we avoid this

=> Separated WorkspaceAndHotseatScrim into two separate scrims, since only part of the scrim needed to be bumped up to a level. Further, it was an overloaded class.

=> We had previously been implicitly relying on the fact that the scrim was rendered in the Workspace parent; we need to make sure to propagate workspace inavlidations to the container of the scrim. While things would still work without this change, it's more correct to leave it, as we no longer assume a hierarchy for functinoality.

Bug: 178215332

Test: manual verification. See video in bug.

Change-Id: I0a76ddf35ceea8c9635367f69380ef24f42e9479
2021-02-10 19:16:26 +00:00
thiruram
7823402ec9 Fixes wrong container for LAUNCHER_ITEM_DROP_COMPLETED log event.
Bug: 179532038
Change-Id: Idfa1b82c35338a7472ff80d94fb20c69e498a028
2021-02-10 10:30:03 -08:00
Sunny Goyal
bfc0c38157 Updating ItemInfoMatcher to work with java streams
Adding support for bulk removing items from a folder icon.
This fixes workspace item removal when a folder gets replaced
to an icon during the delete operation.

- Lets say user has a folder with the same app twice.
- User disables that app.
- Launcher removes all shorcuts of that app

However, because we call "replaceFolderWithFinalItem" during
this removal, we end up creating a new shortcut that does
not get tracked by the removal, so the user is left with
an enabled icon of the disabled app.

Bug: 162378169
Test: manual test, repo steps in bug
Change-Id: Iaf6550894c156b3b5ec2a5aa58bab76a4a28819e
2021-01-27 15:19:56 -08:00
Schneider Victor-tulias
6a5f431a7b Revert "Revert "Add UI updates for incremental app installs.""
This reverts commit 229497d182.

Reason for revert: Patching bugs

Fixes: 176901235, 176992421, 176884453

Test: manual

Change-Id: I57e13a15e72284564a10761966732ee31d15fd08
2021-01-12 12:22:33 -08:00
Schneider Victor-tulias
229497d182 Revert "Add UI updates for incremental app installs."
This reverts commit 84269d349d.

Reason for revert: causes b/176884453 and b/176992421

Change-Id: I3398674a0acbad8329df5d341ae074ac073a6bf9
2021-01-07 19:44:44 +00:00
Schneider Victor-tulias
84269d349d Add UI updates for incremental app installs.
1. Changed Preload Icon UI to be grayscale while the app is not startable.
2. Added progress bar for when app is installed but still ownloading.
3. Updated Preload Icon progress and click handling to use new incremental api.

Progress bar color updates will follow in a separate CL.

Demo: https://drive.google.com/file/d/1H1EvtTorLeJwC1eiq10tm-TT81YZ6osk/view?usp=sharing

Bug: 171008815

Test: manual

Change-Id: I5874a5146d79a8c91d7d90ff0b9c1c427a3c95dd
2021-01-05 15:17:26 -05:00
TreeHugger Robot
f9317597ef Merge "Add a feature flag to expand smartspace to three rows" into ub-launcher3-master 2020-10-26 18:37:26 +00:00
Andy Wickham
70e8b15721 Minor stylistic changes in Workspace.java.
Change-Id: Ib07611f27cbc427d11abccd8b74ea144485752f7
2020-10-20 15:36:18 -07:00
alexmang
6c666fb196 Add a feature flag to expand smartspace to three rows
In order to experiment with presenting more predicted content to the
workspace I have added a flag to expand smartspace to two rows.

This CL does not include any app relocation. If an app lives in a space
the expanded smartspace will occupy, it will be removed from workspace.

Change-Id: I38354dc81a34a495828cf7a69ddb04cc137e2e4e
2020-10-20 09:32:29 -07:00
Hyunyoung Song
95786e077d Good riddance UserEventDispatcher
Bug: 165675920
Bug: 161381246

TL;DR;;
- nano -> lite proto
- add all the missing logs to WW
- pin item related logging fix
- Removed logging for assistant

sgrep "com.android.launcher3.userevent.nano." | cut -f1 -d: | xargs sed -i -e 's/userevent\.nano\./userevent\./g'

Change-Id: Ie2a49fdd891cacbd7ef40a1dc9e41ff0574c7517
2020-09-27 13:41:49 -07:00
Tony Wickham
ca23b981d9 Allow touches on Workspace during transition from Overview
Previously we only allowed touches on the hotseat (due to it being
in the shelf in Overview); now we allow touches anywhere if we are
not in an overview state.

Test: enter overview, swipe up to home and scroll workspace or tap
a workspace icon during the transition

Bug: 169052350
Change-Id: I59ee695ba9cb6f5fddd8e41c5796cdba6b3d2112
2020-09-21 11:56:04 -07:00
Andy Wickham
1ca1d6343f Merge "Delays removal of extra screen when dropping an app." into ub-launcher3-master 2020-08-28 23:24:24 +00:00
Andy Wickham
0f12b6013d Delays removal of extra screen when dropping an app.
This prevents a conflict between the scroll animation
and layout transition caused by removing the screen.
Since the extra screen is at the end of the workspace,
this most commonly (only?) causes issues in RTL, as
everything shifts to the left to fill the void of the
empty screen. See bug for example video of the issue.

With this change, the removal of the empty screen
happens after Launcher finishes transitioning back
to NORMAL state after dropping an icon/widget,
rather than in onDragEnd.

Note: There is a similar issue when placing a widget
in RTL (even if not switching screens), but it's not
made worse by this CL. Filed b/166531479.

Demo:
https://drive.google.com/file/d/1JTP81syjoBFe3_N2SOZHP5r5_RoCUWan/view?usp=sharing

Fixes: 163382092
Change-Id: I55ed5af8e1d80dcc0d1b6502c3c5b068dc6f8722
2020-08-27 17:26:02 -07:00
Hyunyoung Song
516da83f62 Merge "Good riddance UserEventDispatcher [1/n]" into ub-launcher3-master 2020-08-25 09:25:55 +00:00
Hyunyoung Song
6b670d62df Good riddance UserEventDispatcher [1/n]
Bug: 165675920
Change-Id: I237ed4243e1724b3c370c5660673bb3966bf4811
2020-08-24 21:19:09 -07:00
TreeHugger Robot
3cc22175e9 Merge "Moving hotseat predictions to ModelDelegate" into ub-launcher3-master 2020-08-24 18:42:01 +00:00
Tony Wickham
1fbab3ad2c Update worksace page indicator during HINT_STATE transition
Test: Scroll to workspace page 2, then swipe up from the nav bar;
ensure that the page indicator fades in and scrolls to page 1

Change-Id: Ie0157c8e67b94509d3817f7e160d26f505185bbb
2020-08-18 15:12:56 -07:00
Sunny Goyal
0fc3d1275a Moving hotseat predictions to ModelDelegate
Bug: 160748731

Change-Id: I8db7856a17e0b6ca45b4d5ec3513f788f22db11a
2020-08-17 08:43:07 -07:00
Hyunyoung Song
45c0918f47 Merging ub-launcher3-rvc-qpr-dev to rvc-qpr-dev
Bug: 162366734
Test: system image builds

Change-Id: I6675431b180976798afacc7a99251ae36764a50a
Merged-In: Ibff46b3ef7ff89accb459db323f31179adb4ef21
2020-07-30 00:26:39 -07:00
Hyunyoung Song
0a4a4d920e Revert "Merging from ub-launcher3-rvc-qpr-dev @ build 6690853"
Revert "Merging from ub-launcher3-rvc-qpr-dev @ build 6690853"

Revert "Merging from ub-launcher3-rvc-qpr-dev @ build 6690853"

Revert submission 12190253-merge_ub-launcher3-rvc-qpr-dev_6690853

Reason for revert: Build ID picked from ub-launcher3-master and not ub-launcher3-rvc-qpr-dev

Reverted Changes:
I9e658ece0:Merging from ub-launcher3-rvc-qpr-dev @ build 6690...
I2a47fe180:Merging from ub-launcher3-rvc-qpr-dev @ build 6690...
Ie86b0a2e0:Merging from ub-launcher3-rvc-qpr-dev @ build 6690...
Id3ca76da6:Merging from ub-launcher3-rvc-qpr-dev @ build 6690...
Ib6a63da0f:Merging from ub-launcher3-rvc-qpr-dev @ build 6690...
Bug: 162366734


Change-Id: Ie81853a34c9a48d5b3fd922c65483a9ff639e0ce
Merged-In: Ibff46b3ef7ff89accb459db323f31179adb4ef21
2020-07-28 23:43:43 +00:00
Sunny Goyal
52e2545a66 Removing arrow indicator from homescreen and
adding a separate view for various accessibility actions

Bug: 159247871
Change-Id: I14536844929e03d36a6a5f294d4f5daad8c82d15
2020-07-28 14:21:31 -07:00
Sunny Goyal
28f5075eb0 Adding support for storing container based item list in the model
These items get updated automatically during various model tasks.
Also simplifying the pinned shortcut state, by calculating the
list of ppined shortcut on demand, instead of storing a refCount.

Bug: 160748731
Change-Id: I3169d293552b05b4f4d6c529397fbc761887a282
2020-07-23 15:27:50 -07:00
Sunny Goyal
faea66fe88 Ensuring workspace pages are offset properly in waterfall cutout
Bug: 149224750
Change-Id: I523b09aa4cbe7710e3fd89bc716bacbafd4eadc8
2020-07-08 18:39:42 +00:00
Hyunyoung Song
801f81fba5 Log Launcher transitions to WW
- ONRESUME / ONSTOP
- HOME_GESTURE
- OVERVIEW_GESTURE
- QUICKSWITCH
- SWIPELEFT/SWIPERIGHT

Bug: 156875719
Bug: 148822714
Bug: 137777105

Debug log: go/launcher-log-parity

Change-Id: I64a0deab4996b5be36320fbe0339f320891c53e0
2020-06-22 12:09:06 -07:00
thiruram
b53764bd4b Fixes folder logging.
Only LAUNCHER_FOLDER_LABEL_UPDATED events will have FromState, ToState
and FolderLabelInfo. Other folder events such as OPEN, DRAG etc will have
basic fields only populated.

Sample Log: https://paste.googleplex.com/5468394805526528
Screencast: http://rcll/hSUQjtQXfQM5i9DjjAQTf2/Zn5FeiVDONaQj0mK1JNjg

Bug: 159164315
Change-Id: I903fc7b62bcee748aa3ef695453be3e14d388712
2020-06-19 17:06:46 -07:00
thiruram
c6a38ba5d8 Replaces StatsLogManager.log with StatsLogManager.logger()
Bug: 159170445
Change-Id: Ice6c8a9ae30d8e6b3843bfe42926053849bf9fe0
2020-06-17 17:32:54 +00:00
Hyunyoung Song
13c2bc7303 LAUNCHER_APP_LAUNCH_TAP should log correctly for icons inside folder
Bug: 137777105

Change-Id: I5c1552481fc1b788ba41c57bfe97f126f55e5b16
2020-06-11 23:51:17 -07:00
Tony Wickham
fe54c36822 Apply PendingAnimation#mDuration to all added anims
Doing this at the root instead of individually for all added
animators ensures none fall through the cracks.

Fixes: shelf moving too quickly in 2 button mode
Change-Id: I0de1ba9cee3fb8f1d6161371625d97e4b2305129
2020-06-09 18:35:07 -05:00
thiruram
62c7b5c8f7 Adds WW logging for QSB search results & all-apps predicted row.
SearchResultContainer represents apps rows displayed within QSB search results for both default scenario(without search term) and actual search result(with search term).

SearchResultContainer is used for both homescreen QSB and all-apps QSB.

Follow up CLs will add searchOrigin and queryLength in SearchResultContainer

Bug: 152978018
Change-Id: Id5f96490686c4141e3e6b2516907ac0505a777e6
2020-05-27 20:29:40 -07:00