summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/model/WidgetsModel.java
Commit message (Collapse)AuthorAgeFilesLines
* Adding some utility methods for thread verificationSunny Goyal2016-04-151-2/+2
| | | | Change-Id: I3fb6a1b860bba8a6efe413dd2698f972dc3e2506
* Creating WidgetCellItem to wrap LauncherAppWidgetProviderInfo and resolveInfoSunny Goyal2016-03-181-61/+49
| | | | | | | In PackageItemInfo,, using the user of the first item in the sub-list Bug: 27585511 Change-Id: I8243f0e5c831af65661ae815489e53e9fcade837
* Changing the widget loading strategySunny Goyal2016-03-091-1/+39
| | | | | | | | | 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
* Manual revert due to conflict:Hyunyoung Song2016-02-231-32/+1
| | | | | | | | Revert "Load label in bg thread to prevent ANR b/27238970" This reverts commit b62fd0957607ae54c7bca7ce64eed288a11f0f2f. Change-Id: Ia751e3414fb24a18bb8bb9ca09dcd93d0e4249f6
* Load label in bg thread to prevent ANRHyunyoung Song2016-02-231-1/+32
| | | | | | | b/27238970 Change-Id: Ic5d77df7d5276cee07861d59427a94fb19691d9c (cherry picked from commit 72a9953cf463e0e7a8d24903f1692828ffe5b017)
* Preventing nullpointer exception when cloning rawListSunny Goyal2015-09-221-9/+11
| | | | | Bug: 24299525 Change-Id: I92018a3da7d75afc2c6997302f8e0492eb78e62f
* Calculating widget minSpans and spans statically/independent of orientationSunny Goyal2015-08-031-4/+24
| | | | | | | | | > 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
* Fixing minor memory leak with name comparator.Winson Chung2015-07-271-2/+3
| | | | | | | | | | | | - 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
* Query the title and icon for app using correct user handle.Hyunyoung Song2015-07-161-5/+10
| | | | | | | | | | > 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
* Hide spammy WidgetModel log behind a DEBUG flagHyunyoung Song2015-07-131-1/+3
| | | | Change-Id: I0119855655516d9fdc114334a974b8766aabf674
* Widgets model should respect AppFilter.Hyunyoung Song2015-06-171-6/+26
| | | | | | | | | > This pattern is already used in AllAppsList > mBgWidgetsModel variable cleanup inside LauncherModel. b/21739736 Change-Id: I03a05064ce3c3e5effb09055af9f4d4de2811c95
* Updating widget list when iconCache updatesSunny Goyal2015-06-041-1/+0
| | | | | | | | | > 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
* Consistent scrolling experience for All apps and widget trayHyunyoung Song2015-06-041-0/+7
| | | | | | b/21375339 Change-Id: I8362b3ca94b7c4e75932d42cd09a989e0e3919c0
* Fix widget tray crash on screen rotation introduced byHyunyoung Song2015-05-221-9/+21
| | | | | | | | ag/694693 b/21402209 Change-Id: Idae97fca971d90f5fbba658411491147cb023c8d
* Load PackageItemInfo in background thread to prevent ANRHyunyoung Song2015-05-211-0/+125
- 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