Commit Graph

14 Commits

Author SHA1 Message Date
Sunny Goyal
4ddc40130a Creating WidgetCellItem to wrap LauncherAppWidgetProviderInfo and resolveInfo
In PackageItemInfo,, using the user of the first item in the sub-list

Bug: 27585511
Change-Id: I8243f0e5c831af65661ae815489e53e9fcade837
2016-03-18 11:06:01 -07:00
Sunny Goyal
2e1efb480a Changing the widget loading strategy
Widget is loaded only when the user enters the overview mode and we keep
the list updated as long as the user is in the overview mode. Once the user
leaves the overview mode, we stop responding to widget updates

Bug: 26077457
Change-Id: I9e4904b8f1300bfe0d77e2bc5f59aa6963fad8d1
2016-03-09 20:21:22 -08:00
Hyunyoung Song
d31dcbcc7c Manual revert due to conflict:
Revert "Load label in bg thread to prevent ANR b/27238970"

This reverts commit b62fd09576.

Change-Id: Ia751e3414fb24a18bb8bb9ca09dcd93d0e4249f6
2016-02-23 11:36:21 -08:00
Hyunyoung Song
b62fd09576 Load label in bg thread to prevent ANR
b/27238970

Change-Id: Ic5d77df7d5276cee07861d59427a94fb19691d9c
(cherry picked from commit 72a9953cf4)
2016-02-23 00:45:56 +00:00
Sunny Goyal
6a706b1dd7 Preventing nullpointer exception when cloning rawList
Bug: 24299525
Change-Id: I92018a3da7d75afc2c6997302f8e0492eb78e62f
2015-09-22 16:56:55 -07:00
Sunny Goyal
233ee964a9 Calculating widget minSpans and spans statically/independent of orientation
> Filtering the widget list and excluding widgets which dont fit the grid
 > setting minSpans for the widget item when binding.

Bug: 22541314
Bug: 22559137
Change-Id: Ieda48b56c95bee0c7ec71dd691af7e23e2d43db6
2015-08-03 16:39:49 -07:00
Winson Chung
eea0225304 Fixing minor memory leak with name comparator.
- WidgetsAndShortcutNameComparator was using the actual widget and shortcut resolve
  infos as the key to the label cache.  Neither of these classes override hashCode()
  and we were retrieving a new set of widgets and shortcuts whenever packages changed
  so we would end up creating more and more entries in the cache.  This isn't a huge
  leak, but could lead to problems if Launcher is used for long periods without being
  killed.
- Now, we use a ComponentKey as the key, so that we don't keep a reference to the
  widget/shortcut infos and also ensures that they should hash to the same labels.

Change-Id: I91347ee72363adbc2b075b67dba331e35ab1fe34
2015-07-27 18:35:28 -07:00
Hyunyoung Song
f63dda5e15 Query the title and icon for app using correct user handle.
> Note: when there are corp and regular user profile widget providers,
it is guaranteed that regular user profile widget provider is always
queried first. Thsi is guaranteed because inside AppWidgetManagerCompat.getProviders(),
regular user always takes prescedence when iterating thru different providers
associated to different users.

Change-Id: I5e38e1fb30925ccba7e1e2925fd3e77c44a14901
2015-07-16 17:24:30 -07:00
Hyunyoung Song
f56513f6ba Hide spammy WidgetModel log behind a DEBUG flag
Change-Id: I0119855655516d9fdc114334a974b8766aabf674
2015-07-13 10:26:22 -07:00
Hyunyoung Song
eaf291b9fe Widgets model should respect AppFilter.
> This pattern is already used in AllAppsList
> mBgWidgetsModel variable cleanup inside LauncherModel.

b/21739736

Change-Id: I03a05064ce3c3e5effb09055af9f4d4de2811c95
2015-06-17 21:12:44 -07:00
Sunny Goyal
091f0ffd92 Updating widget list when iconCache updates
> Fixing bug where items were not getting removed from the memcache
> Fixing bug where package entries were not getting removing because
of component mismatch.

Bug: 21612532
Change-Id: Ie56f3272f7fb7e1a37c5ff9bfa523d814edc1a02
2015-06-04 15:21:23 -07:00
Hyunyoung Song
ec84728b27 Consistent scrolling experience for All apps and widget tray
b/21375339

Change-Id: I8362b3ca94b7c4e75932d42cd09a989e0e3919c0
2015-06-04 11:37:46 -07:00
Hyunyoung Song
9110d485fa Fix widget tray crash on screen rotation introduced by
ag/694693

b/21402209

Change-Id: Idae97fca971d90f5fbba658411491147cb023c8d
2015-05-22 14:49:23 -07:00
Hyunyoung Song
2bd3d7d1cb Load PackageItemInfo in background thread to prevent ANR
- Decoupled widget model from widget view, and placed the
creation to LauncherModel.
- As a result packagemanager operation, iconcache retrieval is all done inside
LauncherModel on background thread
b/21311085
b/21325319

Change-Id: I294698527db58b89f3da558090a367530c058776
2015-05-21 13:04:53 -07:00