summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/WidgetPreviewLoader.java
Commit message (Collapse)AuthorAgeFilesLines
* Update cache version based on new icon sizes.Jon Miranda2017-06-271-1/+1
| | | | Change-Id: Ia82edd366cba19efbec0c1764484c51a976c5aa1
* Landscape grid changes for Workspace/All Apps.Jon Miranda2017-06-231-1/+1
| | | | | | | | This is the just first CL to get eyes on the changes. Next CL will update the All Apps to be full width. Bug: 37015359 Change-Id: I2d7ec6851fdc13b8fa654e7e2be3152330243ccc
* Merge "Do not apply legacy treatment on shortcuts Bug: 62617041" into ↵TreeHugger Robot2017-06-221-1/+1
|\ | | | | | | ub-launcher3-dorval-polish
| * Do not apply legacy treatment on shortcutsHyunyoung Song2017-06-221-1/+1
| | | | | | | | | | | | Bug: 62617041 Change-Id: I56a04536fe1bcba9912c5da3ce5a9c9b75bc3506
* | Rafactoring shadow generator logic to allow customizing various parametersSunny Goyal2017-06-201-8/+11
|/ | | | Change-Id: I38f8ac4352cb9e23d377832ffe2f4923a4df7a70
* Portrait grid changes for Workspace/All Apps.Jon Miranda2017-06-191-1/+1
| | | | | Bug: 37015359 Change-Id: Ifbdd0e71c36e532b189e02283e3eeb562ebe2654
* Refactoring some shadow generator logic into common methodsSunny Goyal2017-05-021-20/+7
| | | | Change-Id: I25fc3248be5148fb1c14944eb4ddeec5bd4125b2
* [MANUAL] resolve merge conflicts of 59c0e0e91 to ub-launcher3-dorval-polishHyunyoung Song2017-04-271-6/+6
| | | | Change-Id: I7c80b665b5216e99284f5b04b8500fc35d916985
* resolve merge conflicts of 128b7e59a to ub-launcher3-masterTony Wickham2017-04-051-1/+15
|\ | | | | | | | | Test: I solemnly swear I tested this conflict resolution. Change-Id: I927373593dfb1b67b504a76b1ad013357b363a6e
| * Add support for getting widgets/shortucts for a particular package/userTony Wickham2017-04-041-1/+15
| | | | | | | | | | | | Bug: 34940468 Bug: 33553066 Change-Id: I5d0131df206c6a13d4227ad28c5b094bbf1343df
* | resolve merge conflicts of 26b174659 to ub-launcher3-masterTony2017-03-301-4/+7
|\| | | | | | | | | Test: I solemnly swear I tested this conflict resolution. Change-Id: Ifb24f291b096b979044e5c87ec58c24e9c479728
| * Add support for system shortcuts in popup containerTony Wickham2017-03-301-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | - Currently the system shortcuts are just widgets and app info - As shortcuts, they live in ShortcutsItemView - They are populated either as icons only (if there are deep shortcuts) or as icons + text - Widgets are disabled until binding them is complete (we request for them to be bound on long-press now). We should revisit this. Bug: 34940468 Change-Id: Ia51d002c3b3ede87658bdab57abfc3eeca1ed242
* | Adding support for showing the widget preview based on the provided RemoteViewsSunny Goyal2017-03-171-38/+30
|\| | | | | | | | | | | am: c65a0085d7 Change-Id: Iabea96bb74294e2775a08427c17e154020d9bc40
| * Adding support for showing the widget preview based on the provided RemoteViewsSunny Goyal2017-03-171-38/+30
| | | | | | | | | | Bug: 35811129 Change-Id: I336e48cd00cfec2e617ac73bd8a81419b0944aa7
* | Defining HomeScreenElementTheme for elements which appear on top ofSunny Goyal2017-02-171-4/+5
|/ | | | | | | | | wallpaper > Using HomeScreenElementTheme for workspace items > Fixing view inflation where wrong layout inflater was being used Change-Id: I92e278dbfb609ad7af9c2f47351f23f03cf12049
* Updating the shortcut preview generation logicSunny Goyal2017-02-161-53/+53
| | | | | | | | Drawing a shortcut icon on a white round-rect with shadow Also center aligning the preview Bug: 34819119 Change-Id: Ic25be6bf301aeb11315a5050f009259b26c6134a
* Updating the default widget preview generation logicSunny Goyal2017-02-081-43/+54
| | | | | | | | | We draw a while round rect box which is divided into the cells to represent the widget size. The app icon is drawn in the center for this white box. Bug: 34819119 Change-Id: Ie4d83712577f21b276c6744a55993f71da368398
* Using WidgetCell in the Pin Item confirmation prompt for a consistent UISunny Goyal2017-01-201-1/+4
| | | | | | | Also fixing some platform API changes in PinItemRequestCompat Bug: 33584624 Change-Id: I255829f0079f1a3967bf8d6a337da12c890eb7ec
* Merge "Adding support for new APIs in O related to configurable shortcuts" ↵Sunny Goyal2017-01-201-4/+4
|\ | | | | | | into ub-launcher3-master
| * Adding support for new APIs in O related to configurable shortcutsSunny Goyal2017-01-191-4/+4
| | | | | | | | | | | | | | | | > Config activities can now return PinItemRequest which can be used to pin deep shortcuts Bug: 33584624 Change-Id: Ic0df436bd79e069615b9d60d24eb7594b824b2da
* | Updating widget preview generation to not embed any badge.Sunny Goyal2017-01-191-11/+12
|/ | | | | | | | | Instead drawing badge in the view directly. This will allow us to reuse the same preview when we do not want to draw badges. This also simplified badging of shortcut config activities. Change-Id: I9c07c33bf9c2b8ef81a00026b1d42587868c906f
* Adding support for requesting addition of shortcut/widgetSunny Goyal2017-01-181-4/+4
| | | | | | | on the workspace. Bug: 33584624 Change-Id: I664366822fe8088742faff2cce006239ab0771bc
* Removing all compatibility code below LollipopSunny Goyal2016-12-161-2/+2
| | | | | Bug: 32745285 Change-Id: I62971908e3e4402941fab627bbdfd47be64473a3
* No more UserHandleCompatSunny Goyal2016-12-151-5/+5
| | | | | Bug: 32745285 Change-Id: I762fb4e268c1afe48a1860ab12a4ccb3f626aa95
* Merge "Catching OOM during widget preview generation" into ub-launcher3-masterSunny Goyal2016-10-271-1/+8
|\
| * Catching OOM during widget preview generationSunny Goyal2016-10-271-1/+8
| | | | | | | | | | Bug: 32365481 Change-Id: Ifc49b033c3ad83213d50793301d94bb6337a412d
* | Fixing wrong cache lookup callSunny Goyal2016-10-271-1/+1
|/ | | | | | | Cache entry was saved using flattenToShortString, but the lookup was using flattenToString Change-Id: I4c012d5a90a89121989db059d31d3dd288fa5b8c
* Update Launcher to use theme colors.Andrew Sapperstein2016-06-201-1/+1
| | | | | | | | | | | | | | | | | | | Instead of using hard-coded variants of colors, use the theme color that corresponds (colorAccent, colorPrimary, etc). Updated: - "Search for more apps" text - App info drop target hover color - PageIndicatorDots - All apps & widget scroll bar & scroll popup colors - All apps section text color - widget picker background color TODO: - widget picker header color BUG: 28625102 Change-Id: I74b543ff71b8caef8cd950c8183ac84c759cb4d5
* Adding some utility methods for thread verificationSunny Goyal2016-04-151-1/+2
| | | | Change-Id: I3fb6a1b860bba8a6efe413dd2698f972dc3e2506
* Creating WidgetCellItem to wrap LauncherAppWidgetProviderInfo and resolveInfoSunny Goyal2016-03-181-43/+21
| | | | | | | In PackageItemInfo,, using the user of the first item in the sub-list Bug: 27585511 Change-Id: I8243f0e5c831af65661ae815489e53e9fcade837
* Prevent work profile widget DnD crashHyunyoung Song2016-03-011-8/+22
| | | | | | b/26079469 Change-Id: I3d49ac498bbaaef8ca8a3051f5ab4b35ef771410
* Preventing launcher crashes due to low disk space.Sunny Goyal2015-12-181-49/+19
| | | | | | | | | | In case of low disk space, all write operations to the IconCache are silently ignored. This will not affect the Launcher behavior and user will still see the latest icons, but in some cases, icon loading would appear slow Bug: 24585352 Change-Id: I85ccc519046fc3708403388bba89e019a3f2ce3d
* Fixing null check when calling mutateOnMainThreadSunny Goyal2015-10-261-1/+2
| | | | | Bug: 25269169 Change-Id: I74f7fb833a374f59a16487099f1bf72b086e88ee
* Using custom threadpool executor instead of the one defined in AsyncTaskSunny Goyal2015-09-231-14/+1
| | | | Change-Id: I8fe95d932c5de14c74f0576bfc3d1f641d12b448
* Using an executor with increased queue size for loading previewsSunny Goyal2015-09-231-1/+14
| | | | | | | | | | An async task can be in the queue even if it has been cancelled. It is removed only after it gets executed once. So the executor can get blocked if there are some tasks which are running, and we keep posting and cancelling preview load tasks. Bug: 24306650 Change-Id: I836c8d53258542cc6f31952dff84323cc057437c
* Refreshing widget list when a package containing a widget changesSunny Goyal2015-08-111-1/+1
| | | | | Bug: 20698931 Change-Id: I50bafac1fc0a855edb1ace633a8a6f87a5c3040e
* Using a reverse hashmap instead of indexOfValue in userManagerSunny Goyal2015-08-051-10/+1
| | | | | Bug: 22980139 Change-Id: I87b633d194ff4e1529dd679dc02da573ed374207
* Calculating widget minSpans and spans statically/independent of orientationSunny Goyal2015-08-031-2/+2
| | | | | | | | | > 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
* Prevent from widget cell preview image from being cut off.Hyunyoung Song2015-07-301-2/+2
| | | | | | | | | | b/22541466 >TL;DR;; when introducing mProfileBadgeMargin to correctly place > work profile badge. Drawing origin of the preview image resulted > to the left of (0, 0). Change-Id: Ic52fc2e17c55c76f4f57aa833451ffa19bbbeb09
* Fixing nullpointer when creating new DBSunny Goyal2015-06-161-2/+2
| | | | | LauncherProvider is not ready until the DBHelper is created Change-Id: Iabd61005892f15fd4a31d882100d87df2b2a7b85
* Merge "Fix last bit of WidgetTray jank issue b/21133230" into ↵Hyunyoung Song2015-06-161-8/+20
|\ | | | | | | ub-launcher3-burnaby
| * Fix last bit of WidgetTray jank issueHyunyoung Song2015-06-161-8/+20
| | | | | | | | | | | | b/21133230 Change-Id: Ic198b8d21be1b0f3465cd4efc30a240e3ec4304a
* | Removing ContentObserver in launcherSunny Goyal2015-06-161-1/+2
|/ | | | | | | > Using callback insted of using a content observer > Setting the listener in LauncherAppState to prevent resource leak Change-Id: Id23a4d5c8812e86178997e536226e09ec3740f84
* Work profile badge alignmentHyunyoung Song2015-06-151-4/+6
| | | | | | b/21336417 Change-Id: Icd54320fa0d0976cac0ae66d180cc2c99ddd0c1c
* Improve AyncTask throughput inside WidgetPreviewLoaderHyunyoung Song2015-06-051-10/+10
| | | | | | | | | | | | | | | | b/21133230 > Synchronized block was creating a bottleneck for the AsyncTasks. > Remove calls that doesn't need to be synchronized outside synchronized block. > Also removed setAlpha call as after the bottleneck was removed, Inefficient alpha view usage alert started popping up in traceview. Due to less jankness, removing the fadein animation doesn't have any visible effect. Link to lock congestion visualization: https://x20web.corp.google.com/~hyunyoungs/no_crawl/traceview/traceview_lockcontention.html Result: gfx-avg-jank delta = "-1" Change-Id: If12817df0730f346cdba7e2f38f232eb9a4336c0
* Removing some synthetic method creationSunny Goyal2015-06-021-10/+9
| | | | | | > Make package-private and @Thunk all private methods and constructors accessed from inner classes. Change-Id: Ie5913860a0c33e48e9bf68f9b5b1699f64c2f174
* Moving all apps code into sub package.Winson Chung2015-05-221-2/+0
| | | | | | | - Renaming resources, dimens, etc to be more consistent - Removing old AppsCustomize resources and other unused code Change-Id: I15ce35e7cb7a9b9344fc7103963e4e4c9e45d89a
* Refactoring DeviceProfileAdam Cohen2015-05-211-22/+20
| | | | | | | | | | | | | | | | | | | | -> Pulling out the parts of device profile which can (and need to be) initialized and accessed without access to an Activity context, ie. the invariant bits. -> The invariant bits are stored in InvariantDeviceProfile which is initialized statically from LauncherAppState. -> The DeviceProfile contains the Activity context-dependent bits, and we will create one of these for each Activity instance, and this instance is accessed through the Launcher activity. -> It's possible that we can continue to refactor this such that all appropriate dimensions can be computed without an Activity context (by only specifying orientation). This would be an extension of this CL and allow us to know exactly how launcher will look in both orientations from any context. Sets the stage for some improvements around b/19514688 Change-Id: Ia7daccf14d8ca2b9cb340b8780b684769e9f1892
* Load PackageItemInfo in background thread to prevent ANRHyunyoung Song2015-05-211-2/+1
| | | | | | | | | | | - 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
* Reducing delay in applying widget previews loaded in the background.Winson Chung2015-05-201-26/+74
| | | | | | | | | | | - Push the writing of previews to the DB to the worker thread to ensure that we can apply the loaded preview as soon as possible. - Reducing additional bitmap allocations from cancelled tasks that did not re-add their bitmaps to the unused set (happens when the list is scrolling quickly). Change-Id: Ib7c2cfdfcc668c215b3a74271e1165235fbdf752