Commit Graph

7 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
Sunny Goyal
3808a69a6c Storing BitmapInfo instead of icon and color directly in itemInfo
This will allow subclassing BitmapInfo to support custom icon/dynamic
icons which can be loaded on the background thread instead of going
through IconFactory which runs on UiThread

Change-Id: Ieced6e91330bdff1b505826d097a8df711dfe967
2019-10-28 11:12:47 -07: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
Sunny Goyal
e7b00128c7 Removing static instance of LauncherAppsCompat and unnecessary wrapper classes
Bug: 141376165
Change-Id: I8c1f1ab7d83ec50fe9c7bf39960ef9c360025ec7
2019-10-02 16:20:22 -07:00