Commit Graph

166 Commits

Author SHA1 Message Date
Samuel Fufa
79f803888e Merge "Fix app crash on deep shortcut restore" into ub-launcher3-qt-future-dev
am: 4498241117

Change-Id: I10f1077df8f89c96f7ad3f35f333787568d238cd
2019-09-19 10:35:34 -07:00
Samuel Fufa
4498241117 Merge "Fix app crash on deep shortcut restore" into ub-launcher3-qt-future-dev 2019-09-19 17:15:22 +00:00
Samuel Fufa
f28f843d74 Fix app crash on deep shortcut restore
Although the recovery logic for app shortcuts and deep shortcuts are
mostly the same, in deepshortcut's case we don't care about the
component name. This CL fixes the bug where we reset the intent if the
activity a deepshortcut points to is not found. resetting the intent is
problematic as we'll need the shortcut id (which is stored as an
extra on the intent) to recover the deep shortcut using pinned shortcuts.

Bug: 140819317
Change-Id: I22f0266b98a9f6175303cc92a85397e240443250
2019-09-19 00:59:19 +00:00
Jon Miranda
1fb549727f Fix BindWidgetTests. am: 6ed680258e
am: 7cfab69b1c

Change-Id: Icaf64c61ccd354b41e5cd0ed84059147c157ad8b
2019-09-17 21:59:35 -07:00
Jon Miranda
7cfab69b1c Fix BindWidgetTests.
am: 6ed680258e

Change-Id: Ifca5fc650f88bd18985f264ccf4d0c33698faf52
2019-09-17 21:52:57 -07:00
Jon Miranda
6ed680258e Fix BindWidgetTests.
Broken by change I03c31bb308fc496b9fc633c2fde23ae4568f8c44.

Bug: 139281702
Test: Ran BindWidgetTest with 8/8 successful.
Change-Id: I6a03744c9cd919316ff27b12c50acc70c91d47fa
2019-09-17 19:18:02 -07:00
Jon Miranda
935cfb8633 Key by both package and user for list of active install sessions. am: c1322b6ac8
am: bf7371e510

Change-Id: I7b18a068f88ec3aef84d04d80b54f6252230bbc8
2019-09-17 12:06:21 -07:00
Jon Miranda
bf7371e510 Key by both package and user for list of active install sessions.
am: c1322b6ac8

Change-Id: I112298649de8f9abd0898fdf4feda02395b7a31c
2019-09-17 12:00:03 -07:00
Jon Miranda
c1322b6ac8 Key by both package and user for list of active install sessions.
This fixes the bug where items are left on the home screen for the wrong
user.

Bug: 139281702
Change-Id: I03c31bb308fc496b9fc633c2fde23ae4568f8c44
2019-09-17 11:20:35 -07:00
Pinyao Ting
2cfa8dc020 Merge changes from topic "cache-shortcut-image" into ub-launcher3-qt-future-dev
am: 570d9a1e9c

Change-Id: I3182c90a69d1c93daf8d33cfe7f15f613ac972fd
2019-09-17 09:54:17 -07:00
Pinyao Ting
0651614984 Merge "Revert "cache shourtcut image"" into ub-launcher3-qt-future-dev
am: 3463d1c5f9

Change-Id: Ic71994e9567e023666fb435c989c19362b41861f
2019-09-16 20:50:17 -07:00
Pinyao Ting
d13f0c5c45 Revert "Revert "cache shourtcut image""
This reverts commit f3d58f1f84.

Reason for revert: Rolling forward for development and fixes.

Bug: 140242324
Change-Id: I954cface2e50a5a9a5e143d2ea29fbcebb298ede
2019-09-16 20:20:38 +00:00
Pinyao Ting
f3d58f1f84 Revert "cache shourtcut image"
This reverts commit 050f9b1279.

Reason for revert: Test failure on ub-launcher3-master (b/140998509)

Possible Root Cause: This happens when fallback image or default icon was
used for shortcut icon, but shortcut caching logic do not have the logic
to create either fallback image or default icon. So upon updating icon cache,
the icon remains to be null, causing an NPE.

Change-Id: I1ee3bb7a3cab2af5730c2ee77d9370c1578a9ad6
2019-09-16 18:00:26 +00:00
Pinyao Ting
a186a1f7de Merge "cache shourtcut image Deep shortcuts now supports icon cache." into ub-launcher3-qt-future-dev
am: 52e551e734

Change-Id: Idb15f429647349b6f054d02b814ad9bab4b78fa5
2019-09-12 17:14:11 -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
050f9b1279 cache shourtcut image
Deep shortcuts now supports icon cache.

When workspace is being loaded, we will now attempt to load deep
shortcuts from memcache/db.

The icon for deep shortcuts loaded in the workspace is saved to
memcache/db after the workspace is loaded.

Bug: 140242324
Change-Id: I49da8319ad203476fe1e45683e2848dbde3473f2
2019-09-12 09:14:43 -07:00
Samuel Fufa
ca37b8afe5 Add support for searchwidget in layout files.
Test: Manual
Bug:139703885
Change-Id: I86b36187d95bb5db59dbf6ae2e20373d23e55aa1
2019-08-23 10:58:13 -07:00
Sunny Goyal
6fe3eec95c Moving various common executors to a single location
Change-Id: I44bca49b8adb6fa22c3b48d10f674e42c28d792c
2019-08-20 14:36:17 -07:00
Sunny Goyal
934ebd087b Adding support for storing keywords in iconCache
Change-Id: I1183e63a6556ebfb3eee5df23d149e09728193a9
Merged-In: I1183e63a6556ebfb3eee5df23d149e09728193a9
(cherry picked from commit e529a86fbd)
2019-08-14 22:12:49 +00:00
Sunny Goyal
11a50747ed Refactoring some folder binding logic:
> Moving grid calcutation in a separate class
> Moving content saving logic to folder instead of relying on item bind

Bug: 139051851
Change-Id: I81b226dbebe13652482a767c992e8cc8f4f35a60
2019-08-14 12:03:09 -07:00
Sunny Goyal
e529a86fbd Adding support for storing keywords in iconCache
Change-Id: I1183e63a6556ebfb3eee5df23d149e09728193a9
2019-08-07 15:51:25 -07:00
Sunny Goyal
87dcde6d6c Separating apps list callback from model callback and simplifying various events
Bug: 137568159
Change-Id: I4d8bb5c01cabe642731ebd3f57fe15bdc5a569b7
2019-07-25 11:29:16 -07:00
TreeHugger Robot
37d8437c60 Merge "Moving some utilities methods to separate class" into ub-launcher3-master 2019-07-18 00:27:53 +00:00
Sunny Goyal
31ab19f71d Removing global state from DeepShortcutManager
This makes DeepShortcutManager thread-safe and avoids any locks

Change-Id: If4593b3541da6259591ff7a607efa58158006481
2019-07-17 15:16:33 -07:00
Sunny Goyal
9dbb27c09c Moving some utilities methods to separate class
Change-Id: I5094b22ddc77c45590cea1a5f5dead0dc7580abf
2019-07-17 15:15:07 -07:00
Sunny Goyal
6bbf6004f8 Removing ShortcutInfoCompat and directly using ShortcutInfo
Change-Id: I2842689e192a206c0d31558c8126eae1c7904598
2019-04-22 15:39:40 -07:00
Sunny Goyal
9589916418 ShortcutInfo renamed to WorkspaceItemInfo
Will get rid of ShortcutInfoCompat in a follow up cl

Change-Id: I7d7d9c938635f59b216290ba28bea9d0e0721a7d
2019-04-16 00:08:24 -07:00
Sunny Goyal
a7962a4d99 Fixing restore flag not getting persisted
Bug: 127766994
Change-Id: I8e887232b9fc31a850f7675c79b329ce8897db71
2019-04-09 14:22:00 -07: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
TreeHugger Robot
3663b314fa Merge "Removing diagnostics" into ub-launcher3-master 2019-01-30 18:43:08 +00:00
Sunny Goyal
8c48d8bea6 Changing min sdk to 25
Change-Id: I0d28069967854357ca755bf25dec19d4979bdecf
2019-01-29 11:29:52 -08:00
vadimt
3f8591f003 Removing diagnostics
Now that b/117332845 is fixed

Bug: 117332845
Change-Id: If8c137b9c7cc386dfc5b5af4b81a3efbfa33f770
Tests: None
2019-01-25 10:35:53 -08:00
Sunny Goyal
c3f4dc6c6a Fixing workspace screens not including page 0
Instead of maintaining a workspace screen array, calculating it from
the current set of items as needed.

Bug: 122262946
Bug: 119500058
Change-Id: I85bb0e55a4442ab9bcac390a601da0cb2583c26a
2019-01-07 12:14:06 -08:00
Sunny Goyal
b2061daa56 Remove widgets which have invalid size in DB
Bug: 120638555
Change-Id: I23746af44e4390da7b09869e181919e7eac26e58
2018-12-27 12:57:05 -08:00
Sunny Goyal
c5939393a9 Bye bye workspace screens table
Removing a separate table for workspace screens. List of screens are
automatically parsed using the items in the favorites DB. Order of the
screen based on the screen id and rearranging screens is no longer
supported. In case the screens need to be rearranged, all the items
in the favorites db will need to be updated with new screen ids.

This makes backing up the DB (in the same database) easier as only
one table needs to be duplicates.

Change-Id: I8ba947a898f637d780e2f49925e78604263126e8
2018-12-10 11:43:35 -08:00
Sunny Goyal
b891eebbb5 Fixing shortcut icons are not getting correct color extraction.
> Avoiding color extraction for icons which have already be evaluated
> Fixing color extraction from hardware bitmaps

Bug: 111343544
Change-Id: I624866e892465684871fbc130003e32945d86460
2018-11-30 01:41:56 -08:00
Sunny Goyal
1a9cbd3c88 Moving BaseIconCache to icon lib
Change-Id: I4fb56dcd6231a848d152e690edaf8885efbc995a
2018-11-08 15:18:25 -08:00
Sunny Goyal
678f47c0c9 Removing some launcher cross dependency in BaseIconCache
so that it can eventually be moved to icon library

Change-Id: I65e3ad34322a10695c1ba114f5e60c4418747f05
2018-11-05 17:22:09 -08:00
Zak Cohen
658c67a609 Deepshortcuts - only keep the per package shortcut count in memory.
Change to only keep the per Activity shortcut count in memory, not
the list of ids.
The full shortcuts are loaded at long press time so saves memory.

Bug:117239104
Test:Manual and ran instrumentation tests
Change-Id: Iee974ecba2c977216be4f078396ceed22b931f5d
2018-10-22 11:38:09 -07:00
Hyunyoung Song
cda96a5b43 Setup make icon-loader library
Bug: 115891474

Test: make -j10 icon-loader
Next step: Launcher will depend on icon-loader in next CL

Change-Id: I797ddb857cf8be79f3be6ca2f174c593ca3713a5
2018-10-19 14:33:46 -07:00
Sunny Goyal
efb7e84242 Converting long item IDs to int
> Items ids were already being typecasted to int when being bound on the UI
> Using a consistent type allow better use of platform data-structures
> Adding IntArray and IntSet as a replacement for various Collection classes

Change-Id: Id3c650ed2420c2bfca3bd7671d2b705b56112371
2018-10-08 14:52:39 -07:00
Vadim Tryshev
c052e4e68a Adding temporary logging to diagnose testPendingWidget_autoRestored
This test fails

Bug: 117332845
Test: running Launcher
Change-Id: I300c856992b3d1f559c4c31525a45e2c4a960f11
2018-10-05 17:37:01 -07:00
Sunny Goyal
ac8154a23d Caching widget labels in icon cache to avoid lookup at startup
Change-Id: Ie026ee47905454bd70e774d422cd7fe142aec7e2
2018-09-28 16:36:33 -07:00
Hyunyoung Song
48cb7bc7a4 Move IconNormalizer/ShadowGenerator/LauncherIcons to icons package
Bug: 115891474

Sending out the package name changing CL first before I make
LauncherIconsHandler and tests around it.

Change-Id: Ic10479a06333e1435b392a7072cd08782e710cbd
2018-09-26 11:57:37 -07:00
Sunny Goyal
0b3053c9fc Extracting icon caching logic into a base class.
This will allow using the cache cache for other type of objects,
like shortcuts and widgets.

Change-Id: I38616d031cb051f93e724d9cc0e8fe9a822b9e3a
2018-09-25 16:36:06 -07:00
Sunny Goyal
f840f10d50 Removing additional rpc due to icon cache update
When launcher loads, it fetches the list of apps twice, once for
loading all-apps and again for updating icons. Instead reusing
the previously fetched apps list.
Also moving the icon loading in a separate package for further
generalization

Change-Id: Ibd2dae56e6027a31b633da030bc6b43a90b27e1b
2018-09-21 15:27:03 -07:00
Tony Wickham
f9d9df7d3a Gracefully fallback to new ComponentName if one is renamed/removed
Previously, if a developer renamed their launcher activity, we removed
all instances of their icon from the home screen, since technically the
activity they pointed to no longer exists. However, in the vast majority
of cases, the developer simply renamed their activity and nothing should
change from a user's perspective. So instead of removing icons that no
longer point to a valid activity, we now redirect them to point to the
first activity in the manifest (or remove them if there is none).

Test:
- Install app with Activity A and place on home screen
- Rename A to B and reinstall - verify home screen icon remains
- Add new launcher activity C - verify icons still go to B
- Force stop launcher and rename B to A - verify icons go to A (same activity)
- Remove activity A - verify icons go to C
- Remove activity C - verify icons are removed

Bug: 28907647
Change-Id: If9da251bd588908c4c425e7dd32e38fcbe54bab2
2018-09-05 18:23:54 -07:00
Sunny Goyal
2b787e5bd6 Using a placeholder icon shape instead of low-res/blurry icon
Bug: 111142970
Change-Id: I867224464ae9c026f4dcb5256ef14fc39c8e751d
2018-08-27 10:43:46 -07:00
Sunny Goyal
83fd25e3af Moving some abstract classes to interfaces, to better use java-8 features
Change-Id: I862af4931c95cbde052130d8b7d4ac3375db782f
2018-07-09 17:01:28 -07:00