Commit Graph

8644 Commits

Author SHA1 Message Date
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
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
Sunny Goyal
0d74231fec Removing dependency on XmlResourceParser in default layout parsing
This is allow support for generating and parsing default layout at
runtime by a different app.

Change-Id: Id3bfcf1d353417102429ab137402ccfedc4e6cc5
2019-03-05 10:22:57 -08:00
Jon Miranda
3145839f65 Fix bug caused by trying to set background to AdaptiveIconDrawable.
Solution is to flatten the drawable when useDrawableAsIs is true.

Bug: 123900446
Change-Id: I3b86db201ef4fccf10ac42ec367c0538573b7ad8
2019-03-04 20:54:53 -08:00
Tony Wickham
57e489c8b5 Fix hotseat translated upwards when dragging from all apps
Before, we just didn't scale or translate when entering spring loaded
state. That worked when dragging from home, but when dragging from all
apps it meant that the hotseat kept its translation from the transition
to all apps. Now we always move the hotseat to scale 1 and translation 0
when going to spring loaded mode.

Change-Id: I0630d5bb899e37e2ab01516adfc1b7e6f8a9e42a
2019-03-04 14:57:07 -08:00
Tony
4bb4b89b9a Scale and translate hotseat with workspace instead of all apps
- Move the hotseat alongside workspace instead of on top of all apps in xml layout
- Set pivot point of hotseat to match the workspace's, and apply the same scale
- Translate the hotseat with the workspace instead of all apps
- SpringLoadedState does not scale or translate the hotseat

Change-Id: Ic45fe99f83f0e0012afa78073d9577e65da444e2
2019-03-03 15:43:50 -08:00
Matthew Ng
3ab13c9de1 Changed assistant debug flag to global
Bug: 112934365
Test: manual
Change-Id: Ibf5f02d41d879f35ba7ee011dc35e264606b751b
2019-03-01 16:21:32 -08:00
TreeHugger Robot
9db9d62b27 Merge "Removing the home button press check" into ub-launcher3-master 2019-03-01 23:07:18 +00:00
Sunny Goyal
9df474ab53 Removing the home button press check
When home key is pressed, we skip the schedular check as it comes
in onNewIntent (explicitIntent).

Bug: 118441555
Change-Id: I934bb14e4d188cf61faed0360c3f6d7cac8d2fed
2019-03-01 14:09:34 -08:00
TreeHugger Robot
6d2bb0b548 Merge "Added assistant gesture swipe up right side region on nav bar" into ub-launcher3-master 2019-03-01 22:02:23 +00:00
Matthew Ng
077c29e091 Added assistant gesture swipe up right side region on nav bar
Bug: 112934365
Test: manual
Change-Id: I467e71f13da4afba3a556fafb0bfdf01650ab4bf
2019-03-01 13:53:13 -08:00
Winson Chung
1942d5a54a Fix issue with flashing on overscroll
- Apply the bounded current scroll to the overscroll instead of assuming
  the max scroll (on the last tick, the overscroll amount can be zero,
  causing us to shift to the max scroll until the next draw)

Bug: 126767319
Change-Id: Ia60ecb0c3f18e68d0c91620aa79b21df72c213cf
2019-03-01 13:32:32 -08:00
TreeHugger Robot
dd79438ee9 Merge "Reapply the current state after onCreate" into ub-launcher3-master 2019-03-01 21:25:53 +00:00
Sunny Goyal
bbece869eb Reapply the current state after onCreate
In case of normal restart we were never applying the NORMAL state and
so various state properties didn't start with correct default values.
We generally get insets after start which reapplies the state and
fixes this issue but that is not always the case.

Bug: 126416861
Bug: 118441555
Change-Id: Iaa178556618f8a49197187d0820d8b8afdc73378
2019-03-01 13:16:29 -08:00
Jon Miranda
1a49fb5733 Transform closing window to icon on workspace using adaptive icons.
With adaptive icons, we can have FloatingIconView match the shape
and size of the closing window, regardless of the icon shape.

FloatingIconView starts off as a rounded rect (same corners as task view)
and then morphs into the icon shape using FolderShape#createRevealAnimator
in reverse.

Decided to add FeatureFlag.ADAPTIVE_ICON_WINDOW_ANIM since there are still
some issues with folders, badges, and a visible jump when swapping the
FloatingIconView with the original icon.

Bug: 123900446

Change-Id: I94969eea6d5f4b932a84a11eb403611276042b46
2019-03-01 12:48:25 -08:00
Jon Miranda
69e03dd082 Revert "Add remote animation for unlocking device."
This reverts commit 55a32272be.

Reverting until we can revisit this animation.

Bug: 123906429
Change-Id: Ic2d6e5a8198900fb15abd60dd140091681f828dd
2019-02-28 20:37:03 -08:00
Tony
573c3e1712 Make TouchInteractionService direct boot aware
- Add directBootAware="true" to TouchInteractionService manifest component
- Add DeviceLockedInputConsumer which just sends a home intent on touch down

Test:
- Reboot
- Swipe up anywhere to get to bouncer (pin/password/pattern)
- Click "Emergency" to launch dialer while still in direct boot
- Swipe up from the nav bar to exit/bring up bouncer

Test:
- Lock screen
- Double press power to launch camera
- Swipe up from nav bar to exit/bring up bouncer

Bug: 125364936
Change-Id: I7a4cd2dc3a635daf4bb9a643a1e5251ca4e91e33
2019-02-28 14:39:27 -08:00
Winson Chung
1de3c5078c Fix small issue with overscroll not being dampened on the left edge.
Change-Id: I113425e6bae2ff6f6f143526a7e06363fb8d4320
2019-02-25 18:56:21 +00:00
Sunny Goyal
238124eb17 Ensure that icon and cached display size is always non-zero
Bug: 119290867
Change-Id: If9309df2f62f707b7ebd0c5808d4d872f6d63c61
2019-02-22 22:22:03 +00:00
TreeHugger Robot
9c5b0ed372 Merge "Passing all events to RecentsView instead of passing the calculated velocity" into ub-launcher3-master 2019-02-20 21:54:49 +00:00
Sunny Goyal
4bb8b06ef3 Passing all events to RecentsView instead of passing the calculated velocity
Velocity tracker is able to calculate the velocity using cached copy of motionEvent
as long as the event as correct timeStamp

Change-Id: I2b0f612e010fdfcf144d5bed928c5a96b36f3ac7
2019-02-20 13:45:27 -08:00
Miranda Kephart
1a359a261d Add hints in Overview
If the ENABLE_HINTS_IN_OVERVIEW flag is enabled, pulls chip hint
data (currently from the NavBarHint plugin; eventually from AiAi)
and shows the chips between the task view screenshot and the QSB.

Screenshot: https://screenshot.googleplex.com/Ww05W13XjBv

BUG:124390101

Change-Id: I7686673b705257eca31f2fa40e2744e197153c7c
2019-02-20 15:17:03 -05:00
Tony Wickham
39b6378255 Merge "Only stabilize tasks during quick switch session" into ub-launcher3-master 2019-02-20 00:01:47 +00:00
Tony
60ac5d2b34 Only stabilize tasks during quick switch session
- A stabilization session starts when going to a new task via a quick switch
- A stabilization session ends after 5 seconds on the same task or when completing
  a gesture to go to home or overview
- We track the system task order and copy it for the duration of the stabilization session
- After the session ends, we switch back to the system task order
- Remove ENABLE_TASK_STABILIZATION flag (and also QUICK_SWITCH)

Bug: 111926330
Change-Id: I2c18dff2d20ad02b73a4935ac534e9fc9f5f49c0
2019-02-19 14:54:23 -08:00
TreeHugger Robot
06ed106de2 Merge "Some live tile and state fixes" into ub-launcher3-master 2019-02-19 20:24:21 +00:00