Commit Graph

8667 Commits

Author SHA1 Message Date
Sunny Goyal
58fa4b66ea Removing some redundant resource definitions
Change-Id: I68ae602116e6eb334dfce2a013fcc42068c464bf
2019-03-22 16:24:16 -07:00
Tony Wickham
8cfe0fe091 Merge changes If11fea2d,Ia7e1eebe,Iafa89db1 into ub-launcher3-master
* changes:
  Remove redundant resumeLastTaskForQuickstep() and use resumeLastTask() directly
  Fix some state issues with home and quick switch gestures
  Apply spring forces to animate to the final position for swipe home
2019-03-20 21:37:07 +00:00
TreeHugger Robot
5d6b7f4517 Merge "Replace translationYFactor with just translationY" into ub-launcher3-master 2019-03-20 20:46:26 +00:00
Tony
bfc9dde03e Replace translationYFactor with just translationY
Now that we don't have quick scrub, the only state that has a non-zero translation is all apps,
which just uses that to have a slight parallax. This is much simpler to define in terms of pixels
like other states do.

Change-Id: I108c8505d85591399256b3475f7566ff51e2c5ad
2019-03-20 15:36:31 -05:00
Tony
cded01bea9 Fix SpringObjectAnimator not sending onAnimationEnd()
We only send onAnimationEnd() if both object animator and spring animator have
ended. However, we also initialized mSpringEnded = false to begin with, which
meant we would never send onAnimationEnd() if the spring animator was never
started. Now we treat the animators as ended until they are started.

Example test:
0: Enable SWIPE_HOME and QUICKSTEP_SPRINGS flags
1: Swipe up and hold on home to go to overview
2: Tap outside overview to go home
3. Swipe up to all apps
4. Swipe down

Expected: animates to home, not overview. Before this change, however, it went
to overview because the state manager never got onAnimationEnd() and therefore
never set the last stable state to NORMAL instead of OVERVIEW.

Change-Id: I7add42eedbc15b3a6a08ac69570da4edd57b5417
2019-03-20 12:45:54 -05:00
TreeHugger Robot
a761a0d585 Merge "Stop using magic constant 0.1 for switching from home to all apps" into ub-launcher3-master 2019-03-20 02:55:52 +00:00
vadimt
174a330d5d Stop using magic constant 0.1 for switching from home to all apps
Bug: 123904290
Change-Id: Ide4561adb2bb59c805cd9fd48f25440e68d91c7b
2019-03-19 19:17:40 -07:00
TreeHugger Robot
2692dccdf2 Merge "Do not show Style & Wallpaper if the corresponding apk does not exist." into ub-launcher3-master 2019-03-19 23:44:38 +00:00
TreeHugger Robot
bc2b330528 Merge "Move overlay monitoring logic out of config monitor Bug: 126417894" into ub-launcher3-master 2019-03-19 23:32:30 +00:00
Hyunyoung Song
e11eb47c4e Move overlay monitoring logic out of config monitor
Bug: 126417894

Change-Id: I5b474a2a41bbd951fa0a99673fa8bf4342adade5
2019-03-19 15:46:09 -07:00
vadimt
6fe4e93d4a Stop using magic constant 0.6 for returning from all apps to overview
Bug: 123904290
Change-Id: If1b6caf562484649ee107532ffe21d25deff4b97
2019-03-19 12:16:39 -07:00
Hyunyoung Song
9e54c29821 Do not show Style & Wallpaper if the corresponding apk does not exist.
Bug: 128681467
Change-Id: Iff2b1dc5618dda61356203f0b33b4d6efcaaebfb
2019-03-18 14:43:47 -07:00
Tony
0d447c88b8 Apply spring forces to animate to the final position for swipe home
Now instead of an incorrect hack that simulated accelerating to the target,
we actually apply spring forces to make it feel realistic and work no matter
where the target is.

Added two helper classes for this:
- FlingSpringAnim handles the fling, applying friction until reaching the target,
  then a spring to pull towards the final position (also applies if fling wasn't
  in the right direction or strong enough to reach the target).
- RectFSpringAnim uses 2 FlingSpringAnims (x + y) to animate from a starting rect
  to a target rect. It also has an animation to scale from the start rect to the
  target rect, sending progress update callbacks to the caller.

Bug: 123900446
Change-Id: Iafa89db1d55c42816acfa9f1bb84a7519b69ff12
2019-03-15 17:38:41 -05:00
Tony
d5a3df7b83 Don't close popup container if touch came from nav bar
Moved EDGE_NAV_BAR from quickstep package to launcher3

Bug: 127917144
Change-Id: Ic619ea49896ca8e49a9a539b7dc7d682291241b7
2019-03-15 17:08:51 -05:00
TreeHugger Robot
d082129ef8 Merge "Switching swipe-up to overview to using test info provider" into ub-launcher3-master 2019-03-15 18:52:25 +00:00
vadimt
d64b4f44da Switching swipe-up to overview to using test info provider
Also moving test provider to Quickstep to have access to the new info;
and now Launcher3 doesn't have it.

Bug: 123904290
Change-Id: I653376610e83839d102beb9c0604950dd314e8ba
2019-03-15 11:42:06 -07:00
Jon Miranda
7143ba6fec Make QSB_ON_FIRST_SCREEN a boolean.
Bug: 118140522
Change-Id: Ic8e47e71f538b0b0caff6f630566665d05a65522
2019-03-15 09:11:54 -07:00
Vadim Tryshev
aaffa2385f Merge "Creating provider for test gesture dimensions." into ub-launcher3-master 2019-03-14 17:29:34 +00:00
TreeHugger Robot
c7a89b0bfd Merge "Revert "Use GestureDetector in WorkspaceTouchListener"" into ub-launcher3-master 2019-03-14 04:29:55 +00:00
Siarhei Vishniakou
e7a1e25906 Revert "Use GestureDetector in WorkspaceTouchListener"
This reverts commit 7c8fb786fa.

Reason for revert: Chatted with Sunny, the concern was brought up that this is risky and will create potential for dogfood confusion with the new gesture navigation that is getting rolled out soon. So we can try to reland this in a few weeks.

Change-Id: I4f09cc9982164195dc42cd6e4714ede767cce786
2019-03-14 01:16:28 +00:00
vadimt
09df0831da Creating provider for test gesture dimensions.
Start with answering only whether the provider will answer any other
questions.

Bug: 123904290
Change-Id: I7b3ba8c7689f937d8bc1d470b00574ab4340130d
2019-03-13 17:52:42 -07:00
Sunny Goyal
1e6641fc74 Merge "Removing fade animation on swipe up" into ub-launcher3-master 2019-03-13 22:05:27 +00:00
Jon Miranda
87beed6404 Handle other SystemShortcut view types.
Bug: 127807969
Change-Id: Ifcc24e9261ddc730bcddd5724a230910daafce17
2019-03-13 10:02:59 -07:00
Jon Miranda
5bc0dd0708 Fix bugs related to swipe up to home animation.
- Added ConstantState support for FolderAdaptiveIcon and
  ShiftedBitmapDrawable.
- Quick fix for NPE in Workspace#mapOverCellLayout while I investigate
  further.

Bug: 128460496
Change-Id: I5ec02e25dcf9f17aeb37928e675a033bdc8819ae
2019-03-12 17:43:49 -07:00
TreeHugger Robot
46e4d78774 Merge "Use GestureDetector in WorkspaceTouchListener" into ub-launcher3-master 2019-03-12 23:45:54 +00:00
Sunny Goyal
58ddac1d09 Removing fade animation on swipe up
Fade animation is no longer required as the transform is also handled on
the main thread. So we will get the RecentsAnimaiton always after Launcher
has drawn

Change-Id: Ieb05406c9a5b9132b0518155bdbda16c1f73a6ec
2019-03-12 16:24:05 -07:00
Jon Miranda
270d29c43e Only get drawable on the background thread, everything else on main thread.
Bug: 128259687
Change-Id: I6230bfdc292e9a43ab935cfb6debb7a6fac4d4f7
2019-03-12 14:59:04 -07:00
TreeHugger Robot
f820d5d817 Merge "Fixing launcher UI not reapplied properly when IDP changed as a result of display changes" into ub-launcher3-master 2019-03-11 23:07:07 +00:00
Jon Miranda
93e0594b3d Fix crash when trying to load SystemShortcut drawable.
Bug: 127807969
Change-Id: I9d7e8bf5b6b45fe6ad61984ab2c0326926076d75
2019-03-11 14:05:41 -07:00
TreeHugger Robot
a7c2fa9013 Merge "Add landscape support for DeviceProfile#getItemLocation." into ub-launcher3-master 2019-03-11 19:00:21 +00:00
Jon Miranda
0bd63d11e8 Add landscape support for DeviceProfile#getItemLocation.
Also updated to use better estimates for portrait.

Bug: 123900446
Change-Id: I39d9ccec9a936bc0b5800ae77e7f88c4cfec1372
2019-03-11 11:50:07 -07:00
Tony Wickham
0aa0e2737e Merge "Quickly fade in QSB when swiping up when SWIPE_HOME = false" into ub-launcher3-master 2019-03-11 17:21:54 +00:00
Tony Wickham
836602e313 Quickly fade in QSB when swiping up when SWIPE_HOME = false
Now that the "hook" gesture is supported for old quickstep to switch
apps, we need to fade out the QSB so it doesn't overlap the TaskView we
are switching to.

Bug: 111926330
Change-Id: Ie04c7909f6b96d12c810b438db89eedf8ea5bdeb
2019-03-11 08:46:49 -07:00
Jonathan Miranda
ecd891b689 Merge "Fix bug where folder items preview remain in low res state." into ub-launcher3-master 2019-03-11 15:07:02 +00:00
Sunny Goyal
c1edfa7328 Removing unnecessary system RPC for checking flags on every touch event
Change-Id: I8116bef952dbd49d1bad6c8844149538a6d0fa6b
2019-03-08 17:20:00 -08:00
Siarhei Vishniakou
7c8fb786fa Use GestureDetector in WorkspaceTouchListener
Replace the current callback logic in WorkspaceTouchListener with the
use of GestureDetector.
That means, platform api is now going to be used for detecting long
press.

There now are some unused variables and unneeded code in this file. It
will be cleaned up in a follow-up CL.

Test: long press on empty home screen
Bug: 126596502
Change-Id: I57302b403f7d7118f2156166d8c707ab3f9ccefd
2019-03-08 17:06:52 -08:00
Jon Miranda
e6f3fa47d6 Fix bug where folder items preview remain in low res state.
- We update the ranks of all folder items after loading, to ensure there are
  no gaps caused by removed folder items. This also ensures that we load
  the high resolution icons for all preview items.
- FolderIconPreviewVerifier#setFolderInfo was not always called
- Init mGridSize with [1, 1] to prevent divide by zero error in case
  setFolderInfo is not called

Bug: 126268196
Change-Id: I856489968665a39303e2922c78cf90f2b3ee6ebb
2019-03-08 12:43:09 -08:00
Jon Miranda
2bc6b934ac Add launcher support for restoring work profile items onto workspace.
Bug: 111301511
Change-Id: I40decf4c763401c97afcc2bfa7954a1f3a03f536
2019-03-07 18:55:16 -08:00
Sunny Goyal
371ea051d1 Fixing launcher UI not reapplied properly when IDP changed as a result of display changes
> Removing unnecessary check when binding model data as its safe to bind old data,
  we should just not persist it (that check is already there in model writer)
> Adding additional check in model bind to skip old bind if there are multiple binds

Bug: 126259547
Bug: 118441555
Change-Id: Ic250d2af13797d3e70c6e1fc70da65ebe6ab8d70
2019-03-06 15:41:29 -08:00
Jon Miranda
4334874f1f Updates to app to icon animation, and turns on ADAPTIVE_ICON_WINDOW_ANIM flag.
- getFirstMatchForAppClose now only looks at the current page, since switching
  pages is disruptive and the animation for app closing to an icon on a
  different page is unclear.
- Searches for package name and user id (in case of work profile app)
  instead of component name to handle shortcuts and trampoline activities.

- Adaptive icon background drawable is now always centered

- Fix crash that occurs when ADAPTIVE_ICON_WINDOW_ANIM is off. We were trying
  to set FolderAdaptiveIcon as the background drawable. Simplest solution is
  to not use folder as a search criteria when the flag is off.

- Similar to DragView, FloatingIconView now uses BubbleTextView icon when
  adaptive icon support is not available. This handles legacy-treated apps.

Bug: 123900446
Change-Id: Idaf292bb39d78db511cf2ee04a16b191454846b3
2019-03-06 13:25:22 -08:00
TreeHugger Robot
cde9f450c4 Merge "Fixing some Launcher crashes because of using old model data even after launcher has reloaded" into ub-launcher3-master 2019-03-05 21:59:31 +00:00
TreeHugger Robot
55f6416748 Merge "Using a single array instead of a list of array for trcking events" into ub-launcher3-master 2019-03-05 21:44:11 +00:00
Winson Chung
e09f47cd1f Merge "Fix issue with flashing on overscroll" into ub-launcher3-master 2019-03-05 21:32:40 +00:00
TreeHugger Robot
111213b0f8 Merge "Fix app to folder icon animation." into ub-launcher3-master 2019-03-05 21:25:17 +00:00
Sunny Goyal
5654949bd0 Using a single array instead of a list of array for trcking events
In case events come out of order, the list is not properly initialized
which can lead to missing invalid states

Bug: 127282292
Change-Id: I3b4784b8e3eec890e80e62c2ea613e1ba84b6c95
2019-03-05 12:45:23 -08:00
Sunny Goyal
2db5342f04 Fixing some Launcher crashes because of using old model data even
after launcher has reloaded

Bug: 126289691
Bug: 124288578
Change-Id: Id7fb29716241a13f4e03ee0fc0e879523de4f878
2019-03-05 12:43:50 -08:00
Jon Miranda
69b35e0195 Fix app to folder icon animation.
- Needed to account for the preview bounds (similar to BubbleTextView icon
  bounds)
- Also needed to update the bitmap shift amount so that it is re-centered
- Moved ShiftedBitmapDrawable to its own class in graphics package

Bug: 123900446
Change-Id: Ifa9e3f688e55d017cf86a0285f5cdb1b014f01e6
2019-03-05 12:23:28 -08:00
Jonathan Miranda
78499e708d Merge "Fix bug caused by trying to set background to AdaptiveIconDrawable." into ub-launcher3-master 2019-03-05 19:22:17 +00:00
TreeHugger Robot
b67ea2a0e9 Merge "Removing dependency on XmlResourceParser in default layout parsing" into ub-launcher3-master 2019-03-05 19:18:53 +00:00
TreeHugger Robot
36382cb4af Merge "Changed assistant debug flag to global" into ub-launcher3-master 2019-03-05 18:41:15 +00:00