Commit Graph

95 Commits

Author SHA1 Message Date
vadimt
2e1e0d6bff Removing tracing for "Launcher didn't initialize" flake
The flake had disappeared, perhaps because of this logging, or,
hopefully, for some other reason.

Bug: 148313079
Change-Id: I636783d5fc71474dd443c143289c3ff74651835e
2020-02-10 12:47:42 -08:00
Tracy Zhou
d880f0bc09 Merge "Setup infrastructure (multi-db support) for the new grid migration algorithm" into ub-launcher3-master 2020-02-07 00:00:26 +00: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
Tracy Zhou
7df93d28d4 Setup infrastructure (multi-db support) for the new grid migration algorithm
We'll have a db for each grid option and a db for back up / restore.

TODO(pinyaoting): support back up / restore using the new infrastructure, particularly calls to GridBackupTable should use different DBs when the feature flag (NEW_GRID_MIGRATION_ALGORITHM) is on.

Bug: 144052802
Test: N/A

Change-Id: I644a3e70148bd78204a747a337446a3c038f616f
2020-02-05 19:55:05 -08:00
TreeHugger Robot
89321dde65 Merge "Tracing for another "Launcher didn't initialize" failure" into ub-launcher3-master 2020-01-29 18:38:49 +00:00
Hyunyoung Song
1ae42423ca Load folder names during LoaderTask
Bug: 147359653

Change-Id: I4d1b53c3a72d0773d4bc8819ee8118fc719944ad
2020-01-28 22:06:05 -08:00
vadimt
c8b09709ff Tracing for another "Launcher didn't initialize" failure
This simply restored logging used for one of earlier investigations

Bug: 148313079
Change-Id: Idafed13208dc5610d577986fc487d1d44bc0ef5e
2020-01-27 17:48:49 -08:00
Sunny Goyal
fa39536570 Removing static reference of deep shortcut manager
Bug: 141376165
Change-Id: Ie60b82be63a8926825598c681d8b2a1b2ace6413
2020-01-02 20:13:12 +00:00
Sunny Goyal
73b5a27b14 Updating some non-final static objects
Updating various static objects to use a standard pattern so that
it is easier to track and cleanup those objects

Bug: 141376165
Change-Id: Ia539cbfa338d544dddad771c5027b6748762768b
2019-12-11 13:22:58 -08:00
TreeHugger Robot
4f37a5e268 Merge "Removing static instances of UserManagerCompat and AppWidgetManager" into ub-launcher3-master 2019-12-11 18:41:04 +00:00
Sunny Goyal
337c81f664 Removing static instances of UserManagerCompat and AppWidgetManager
> Changing the lifecycle to follow other static objects in Launcher
> Removing compat interface and inlining everything to helpers

Bug: 141376165
Change-Id: I82bd5db1969101de9a7eac77f32728d70195bb35
2019-12-11 10:03:19 -08:00
Tracy Zhou
44fa2940cd Render user's actual workspace in ThemePicker preview (Part 1)
This change takes care of icon rendering. Further work still needs to be done for folders and widgets.

Test: Go to grid options, choose a different grid option, and see user's workspace rendered in the preview
Bug: 144052839
Change-Id: I696153dec1d1f08c5ac82d0c75be5740325c0fc4
2019-12-09 14:06:38 -08:00
Sunny Goyal
4b5b0eb60d Moving some tests to robolectric
> Adding support for simulating model load

Bug: 130562632
Change-Id: I1de8c0abe2e74d4e7e47e18914316c339920609a
2019-12-09 11:17:12 -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
vadimt
23c8341096 Removing tracing and @Stability for a fixed bug
Bug: 142514365
Change-Id: I147850db274c465fb964eca30b97b3ebaaa2ccf6
2019-10-25 11:21:33 -07:00
Pinyao Ting
7242db1a7c Revert "Revert "Revert "Revert "Revert "cache shourtcut image"""""
This reverts commit 28dc8de660.

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

Change-Id: I5d67ac0c4c867a40e882b7a46be446f8f7f63ac7
2019-10-16 14:52:28 -07:00
Winson Chung
5cc62c7d0b Fix a couple trace issues
- Adding trace tokens since we can be starting/ending traces out of order
- Fixing issue with draw hitting twice causing the trace stack to be
  popped twice
- Fix issue with endFlagOverrides not removing from the stack

Bug: 142803200

Change-Id: I8649b94249910a352f00f2f2c2459c355d2bab00
2019-10-16 12:34:58 -07:00
vadimt
6c484bc9bf More logging for a lab-only bug
Bug: 142514365
Change-Id: I9936415fc4f3bfd4676d607f2dfff44070409c0c
2019-10-15 10:55:58 -07:00
Pinyao Ting
28dc8de660 Revert "Revert "Revert "Revert "cache shourtcut image""""
This reverts commit 52908c9adc.

Reason for revert: roll-forward and fixes the crash due to access icon cache on main thread

Bug: 141568904
Change-Id: I1274db349c4f508d9cf59735b5f15180bb0ec033
2019-10-15 09:54:09 -07:00
vadimt
54e0c9e49c Tracing to determine why the model doesn't load
Bug: 142514365
Change-Id: I30ecaec5a5d0868db10157c61a2a8d7dd12872ca
2019-10-14 18:39:10 -07:00
Sunny Goyal
17c72fbb60 Unifying various tracing calls
Change-Id: Iedf6662ad1d7281b850bdc43b3a1e373ce535ac6
2019-10-14 14:23:19 -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
Sunny Goyal
1456522cab Merge "Removing static listeners from PackageInstallerCompat" into ub-launcher3-master 2019-10-02 18:27:45 +00:00
Pinyao Ting
44151960bf Revert "Revert "Revert "cache shourtcut image"""
am: 52908c9adc

Change-Id: I597a9e3a314887b668f482e74a4d2f548cca1da9
2019-10-01 10:09:11 -07:00
Pinyao Ting
52908c9adc Revert "Revert "Revert "cache shourtcut image"""
This reverts commit d13f0c5c45.

Reason for revert: app crashes when adding widgets automatically b/141568904

Change-Id: I5b97f440716c93b1bd93c899e3e1d40e8bbd2885
2019-10-01 09:44:11 -07:00
Sunny Goyal
045b4fab76 Removing static listeners from PackageInstallerCompat
Bug: 141376165
Change-Id: I2b49d53a05a04c622ed5a7b723109a6cc230d230
2019-09-30 23:17:15 -07:00
Pinyao Ting
977726f7a1 Exclude shortcuts in popup from IconCache.
am: ddd0ff44ba

Change-Id: I47f58f3bcaf5ae7b738e13763a55d41e52869a87
2019-09-20 10:05:07 -07:00
Pinyao Ting
ddd0ff44ba Exclude shortcuts in popup from IconCache.
We want to load from/save icons to icon cache for pinned shortcuts only
to reduce memory footprint.

Bug: 140242324
Change-Id: I25c7d59e29c6e27752b36c2c3c226849d4e177af
2019-09-20 15:24:22 +00:00
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