Commit Graph

9 Commits

Author SHA1 Message Date
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
Sunny Goyal
18204e4eea Various icon cache fixes
> Multiple instances of LauncherIcon created when
    LauncherIcons refers IconCache which in turn creates new LauncherIcons
> Widget icons are never cached as they were using low res icons
> Shortcut drag icons are not loaded synchronously
    when using PinItemRequest flow
> Wrong lastUpdatedTime is used in iconCache for shortcuts
> IconUpdateHandler does not ignore managedUser promise icons

Change-Id: Ie7eed68a30fad11d1861b6c70c380953a15ae1cf
2020-02-06 14:16:34 -08:00
Pinyao Ting
c1a1ced33a Add IconCache support for deep shortcuts, loads deepshortcut on
background thread.  Added a feature flag to toggle on/off this
feature.

Bug: 140242324
Test:
  1. (Custom Shortcut) Long click on google maps -> widgets -> drag
     driving mode to workspace.

  2. Open chrome -> add to home screen -> add -> add automatically.

  3. InstallShortcutReceiver
     In Launcher.completeAddShortcut, commend out the code that
     calls PinRequestHelper.createWorkspaceItemFromPinItemRequest,
     then open chrome -> add to home screen -> add -> add
     automatically.

  4. ShortcutDragPreviewProvider
     qdb -> long press on suggested app that has deep shortcut
     -> drag to workspace.

Change-Id: If7babe4eddf5434909bf686b4e9bde15e444d9fd
2019-11-05 11:27:28 -08:00
Pinyao Ting
01c80d7a00 Revert "fetch and update shortcut icons in background thread"
This reverts commit 4ec390e490.

Reason for revert: the code change introduces significant delay when saving deep shortcut icons in cache.

Bug: 142514365
Change-Id: If7a69844aba7f32690ff347f2db11f0a8041b9e4
2019-10-16 20:51:22 +00:00
Pinyao Ting
4ec390e490 fetch and update shortcut icons in background thread
Bug: 141568904
Test: Manually verified use cases from following call-site (with and
without delay)

LauncherAppsCompatVO
  1. (Custom Shortcut) Long click on google maps -> widgets ->
     drag driving mode to workspace.
  2. Open chrome -> add to home screen -> add -> add automatically.

InstallShortcutReceiver
  Removed the line that trigger above flow for android O and above,
  then open chrome -> add to home screen -> add -> add automatically.

ShortcutDragPreviewProvider
  qdb -> long press on suggested app that has deep shortcut -> drag
  to workspace.

Change-Id: I59a4d004913a8df697af1fcfe0a080b6da01eefd
2019-10-15 09:54:09 -07:00
Pinyao Ting
c59116a677 resolve merge conflicts of 8a739f9511 to ub-launcher3-master
Bug: None
Change-Id: Ieb5ae70464d4fa964622310c67e0dd4b58660cc3
Test: I solemnly swear I tested this conflict resolution.
2019-09-12 16:04:56 -07:00
Pinyao Ting
8a739f9511 Fix the issue deep shortcuts cannot be added to workspace via
voice/switch access

Bug: 140405990
Change-Id: Ie54d9c738fc51445f3aa49458ff4fc1dd6e4fc67
2019-09-12 12:05:54 -07:00
Sunny Goyal
3e3d759db2 Removing flag overrides. All flags should be defined as togglable flags instead.
Change-Id: Ia7b9ff84413096cd5b0c4a9a81a232019f2522d2
2019-09-12 10:17:14 -07:00
Pinyao Ting
49a3e699f9 show dot in deep shortcuts when notification contains exactly identical
set of person

Bug: 132336512
Change-Id: I975524e28168c10a186cdc24b188c161faf433cf
2019-08-05 20:41:58 -07:00