summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/widget
Commit message (Collapse)AuthorAgeFilesLines
* Prevent widget previews from showing empty images.Artem Shvadskiy2016-05-042-2/+6
| | | | | | | | | | | | | | | | | | | | | When scrolling through the widget drawer, we submit multiple AsyncTasks to load and display preview images. On certain devices, attempting to load these images from AppWidgetManagerCompat (when we are generating previews for the first time) on a multi-threaded executor can cause us to receive empty images. To avoid this, we allow preview loading from the cache on a multi-threaded executor, but defer preview generation to a single-threaded executor. Additionally, the read and write db methods were not using the same ComponentName output (flattenToString vs flattenToSimpleString), which was resulting in consistent cache misses that forced unnecessary preview regeneration. This has been unified so we properly load from the cache. Change-Id: I3a90cf88fed531713e5d2df876f4ede822f7d569 issue-id: FEIJ-346 (cherry picked from commit dd6f2a2891a8445591be3e9fa53db293d7fd880b)
* Trebuchet: Add ability to disable the scroller completelyMartin Herndl2015-12-171-13/+10
| | | | | | | | | This change adds another toggle to the drawer settings which disables the app drawer scroller completely. There is already a setting which toggles between horizontal and vertical scroller, but I like my drawer if it's even cleaner and uses no scroller at all. Change-Id: Iad3efdafee264852f52e728341fd86d60452b05b
* Trebuchet: Add scrubber to widget viewstaging/cm-13.0cretin452015-12-102-2/+94
| | | | Change-Id: I68711e95ed31a962b47e995e979e32de37570b44
* Reimplement the CM scrubber against the new Launchercretin452015-11-232-2/+22
| | | | | | PS4: Implement RTL support Change-Id: I4456d54b5924913d1b36e1cfa9a2269150f6fb3e
* Fixing NPE in recycler view scroll bar.Winson2015-08-311-3/+17
| | | | | | | | - The regression was introduced in scroll bar changes ag/751628, but unlike AllApps, the WidgetsRecyclerView can have an unbound model. Bug: 23689784 Change-Id: Ibd3d5bcbafab0ada9a372fa00acaa45809ce720d
* Fixing widgets container inactive scroll bar color.Winson2015-08-241-4/+0
| | | | | Bug: 20035978 Change-Id: Ia267ff8f171f7c4cde00593bd69cf69c1660c431
* Merge "Tweaking fast scroller to follow touch closer." into ub-launcher3-burnabyWinson Chung2015-08-201-6/+6
|\
| * Tweaking fast scroller to follow touch closer.Winson2015-08-201-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Issue: The fast scroller currently does not follow the touch input because fundamentally, the fixed scrollbar height and the mapping of the scroll space to the scrollbar space is fundamentally incompatible. - This CL changes the fast scroller to allow it to detach when the user fast-scrolls, then re-attaches after the user scrolls the screen and the current scroll position for the scrollbar picks up the thumb position. - Since the scroll position and the fast scroller thumb is now detached, we can change the distribution of the fast scroll letters to make it independent of the rows for each section and instead uniformly distribute it along the scrollbar, which allows for more stability. - There are edge cases where this fails, especially when there are few apps, which we can investigate further. Bug: 20035978 Change-Id: I8322f862107e6f330deff692885233706564bffd
* | Version code cleanupSunny Goyal2015-08-172-2/+3
|/ | | | | | | | > Renaming Lmp to Lollipop > Lollipop_MR1 instead of directly using 22 > Using M APIs directly instead of reflection Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b
* Calculating widget minSpans and spans statically/independent of orientationSunny Goyal2015-08-033-15/+6
| | | | | | | | | > 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
* Remove NPE inside WidgetsListAdapter during monkey actor testHyunyoung Song2015-07-271-0/+3
| | | | | | b/22518383 Change-Id: I1a683c49be93af150f7873390b723cee0d4ac5df
* Merge "Fix issue where corp app widget doesn't show correctly on drop ↵Hyunyoung Song2015-07-161-0/+2
|\ | | | | | | targets." into ub-launcher3-burnaby
| * Fix issue where corp app widget doesn't show correctly on drop targets.Hyunyoung Song2015-07-161-0/+2
| | | | | | | | | | | | b/22535234 Change-Id: I6e57c7728704ad0f99df25257211243a23d26acd
* | Widget row should not be cut off on the right, when there is an indentHyunyoung Song2015-07-141-4/+6
|/ | | | | | b/22483452 Change-Id: I9d1cd8b71f4b6a4f75af420e9f54b73e9ae7527c
* Working around overscroll issues in AllApps.Winson Chung2015-06-231-0/+13
| | | | | | | | | - For the time being, we are going to do custom drawing to ensure that we get the touch events in the right order, while still allowing the recycler view to draw the overscroll effect on top of the prediction bar. Bug: 21335369 Change-Id: I6bf64e5c1e9aa634a953223a5decf74942e4fb57
* Refactoring fast scroller.Winson Chung2015-06-232-36/+33
| | | | | | | | | | | | | - Fixing issue with fast scroller not fitting name width. - Refactoring fast scrolling/scroll bar code out of base recycler view - Adding animations to fast scroller to match design - Smooth scrolling when jumping between app rows - Fixing issue with fast scroller jumping when you first pick it up - Fixing issue with wrong background paddings being used Bug: 21874346 Bug: 22031923 Change-Id: I9f011b1f375751f437604b900e95a2942d3f4601
* Remove DEBUG flag inside WidgetsListAdapterHyunyoung Song2015-06-171-1/+1
| | | | Change-Id: I7e5b3162f2b3768caff7ff79fd75567a793a1f45
* Refactoring all apps search to support external search bar.Winson Chung2015-06-152-35/+14
| | | | | | | | | | | | | | | | | | | | | - Adding support for an external search bar that can be used to search a container view. This adds a new interface AllAppsSearchController which manages the external search bar. Each controller will have its own search implementation which means that we no longer need a common AppSearchManager interface. - Removing elevation controller as we no longer have a builtin search bar in all apps - Refactoring container view insets so that they behave the same in all containers. - Refactoring apps view to ensure that we only update the number of columns with the available width - Cleaning up LauncherCallbacks interface Bug: 20127840 Bug: 21494973 Change-Id: I710b8e18196961d77d8a29f0c345531d480936fe
* Merge "Make WidgetsRecyclerView not crash on MNC support lib" into ↵Hyunyoung Song2015-06-091-2/+6
|\ | | | | | | ub-launcher3-burnaby
| * Make WidgetsRecyclerView not crash on MNC support libHyunyoung Song2015-06-081-2/+6
| | | | | | | | Change-Id: Ia7bee39752ad0c0b58e74df4507caaf7a3cd8c29
* | Merge "Fixing preloaded widget not getting used for animation" into ↵Sunny Goyal2015-06-083-127/+64
|\ \ | |/ |/| | | ub-launcher3-burnaby
| * Fixing preloaded widget not getting used for animationSunny Goyal2015-06-023-128/+64
| | | | | | | | | | | | | | | | > The preloaded widget was being set in a different instance of PendingAddWidgetInfo and was never getting used for animation. bug: 20699153 Change-Id: Iaec13640e49c66993b4695e4a52dc3a3a2133fb2
* | Improve AyncTask throughput inside WidgetPreviewLoaderHyunyoung Song2015-06-052-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Consistent scrolling experience for All apps and widget tray" into ↵Hyunyoung Song2015-06-042-11/+68
|\ \ | | | | | | | | | ub-launcher3-burnaby
| * | Consistent scrolling experience for All apps and widget trayHyunyoung Song2015-06-042-11/+68
| | | | | | | | | | | | | | | | | | b/21375339 Change-Id: I8362b3ca94b7c4e75932d42cd09a989e0e3919c0
* | | Fixing different bitmap sizes in different orientationsSunny Goyal2015-06-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | > Using a single bitmap icon size > Picking up appropriate density for satisfy the required icon size > Fixing some icon size assumptions during icon animations Bug: 19514688 Change-Id: Ia7a1d0d2c03a9d39ccc241fa4ae3eb8a0f374585
* | | Merge "Stylus support: creating and setting listeners for stylus button ↵Mady Mellor2015-06-031-0/+13
|\ \ \ | |_|/ |/| | | | | press" into ub-launcher3-burnaby
| * | Stylus support: creating and setting listeners for stylus button pressMady Mellor2015-06-021-0/+13
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates almost(*) all locations that use a long press listener to also set a custom touch listener that recognizes the stylus button press action. The stylus button press action is: when a stylus touches a view while the primary stylus button is pressed which may occur on a DOWN or MOVE event. *The location this is *not* enabled for is: Longpress to enter "overview" mode -- this isn't really a selection or drag n drop action; it is also easy to accidentally do this while using the stylus gesture to drag n drop items which is not an ideal interaction. Also not set for the "cling" that demonstrates this. Bug: 20430722 Change-Id: I9343f143261a7b4fada9afca28b8a11a60dbecca
* / Removing some synthetic method creationSunny Goyal2015-06-022-3/+5
|/ | | | | | > Make package-private and @Thunk all private methods and constructors accessed from inner classes. Change-Id: Ie5913860a0c33e48e9bf68f9b5b1699f64c2f174
* Move fast scrolling logic to BaseRecyclerViewHyunyoung Song2015-05-293-3/+75
| | | | | | | | | | - This change has no effect on actual functionality but to make it easier for widget tray to inherit the goodness of the 1) fast scroller functionality 2) unify the scroll look and feel with the all apps view b/21375339 Change-Id: Ib859b1c3352c0b69f16549ded8f20eb82cf58ba8
* Fixing page background not displayed when dragging from all appsSunny Goyal2015-05-271-15/+6
| | | | | | | | | > Adding empty page synchronously, instead of waiting for a frame > Changing launcher state from widgets screen in the same frame, similar to all apps > Removing DragEnforcer, and moving that logic in side the workspace, disabled by a flag > Using first page to get page bounds in drag layer, as last page may not have been measured Change-Id: I172ba4e5ce44648ac55402d49994542c6e10f101
* Moving all apps code into sub package.Winson Chung2015-05-221-6/+6
| | | | | | | - Renaming resources, dimens, etc to be more consistent - Removing old AppsCustomize resources and other unused code Change-Id: I15ce35e7cb7a9b9344fc7103963e4e4c9e45d89a
* Refactoring DeviceProfileAdam Cohen2015-05-214-24/+28
| | | | | | | | | | | | | | | | | | | | -> 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-214-198/+6
| | | | | | | | | | | - 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
* Removing unnecessary linear layoutSunny Goyal2015-05-201-1/+1
| | | | Change-Id: I7fe423b9526805a2e84887e0437ebdc96203c263
* Removing override annotation to fix build.Winson Chung2015-05-201-1/+0
| | | | Change-Id: I5a4dfa339db7862ac3db4cc379469ac8d9f6fae5
* Unify sorting between all apps and widget trayHyunyoung Song2015-05-191-12/+6
| | | | | | | | | | | | | | | | | - selected locale names are shown before latin - case independent sorting - main app > enterprise app Future possible refactoring: - Move all the *ItemInfo data structures to model package - Rename the comparator based on NOT what data structure it supports but what functionality it supports (locale? case independent? main app > enterprise app?) b/21271658 b/20339403 Change-Id: I8a776467392e21d5014e85cd3f51931a3ef89724
* Widget cell improvementSunny Goyal2015-05-194-78/+95
| | | | | | | | | > Using a custom view for preview, instead of extensing image view > Preventing relayout when applying preview > Removing unnecessary method calls Bug: 21133230 Change-Id: Iab12fa1e5c871ee43a9fb0e6b6af897fecfb345f
* Reducing calls to onCreateViewHolder due to animating children.Winson Chung2015-05-152-0/+10
| | | | | Bug 21133230 Change-Id: Ib5be0766d1ea56976195e33526d7595a16672eef
* Removing some dead code and extra view creation.Winson Chung2015-05-152-13/+7
| | | b/21133230
* Merge "Place the work profile badge in the correct bottom right (left for ↵Hyunyoung Song2015-05-153-28/+13
|\ | | | | | | RTL) location" into ub-launcher3-burnaby
| * Place the work profile badge in the correct bottom right (left for RTL)Hyunyoung Song2015-05-143-28/+13
| | | | | | | | | | | | | | | | | | | | | | | | location Also: - clean up of some code - remove requestLayout() method call that is not needed. b/20338602 Change-Id: I65e0e1ac40da2e3fa85af4d3aca54bed3f200a99
* | Various lint error fixes.Sunny Goyal2015-05-141-4/+8
| | | | | | | | | | | | | | | | > Fixing some RTL errors by specifying both marginStart and marginLeft > Moving all layout direction checks to Utilities > Explicitely adding @TargetApi before every method Change-Id: Ibe9c52b93b5a6adeadb27ace2b312770fd732ea0
* | Set proper height of the widget tray container for preloading.Hyunyoung Song2015-05-131-1/+3
|/ | | | | | | | - previous height value was 0 before, now set it to proper height. However, getExtraLayoutSpace still worked because the super method set extra space (1 screen worth) only when ScrollState is non idle. Change-Id: Ifbaa6a105fe392735e106996d1f08276e678ebcb
* Typecast to correct LayoutParamsHyunyoung Song2015-05-121-3/+4
| | | | Change-Id: Ifdd04923563a0ef57bd281d1b55b8af0e4cc59f0
* Fixing several layout issues.Hyunyoung Song2015-05-123-109/+34
| | | | | | | | | | | | | | - N7/N9 indented area should not block scroll view - separator at the end of the widget cell should not show up on the last item. Not covered in this CL: - Guarantee that last item is showing only 20~40%. Right now, the hand picked constant works for N5,6,7,9 b/20338324 b/20763871 Change-Id: I274ab95c6c3e2fc8be8ceafb2e8172c0174a41a5
* Merge "Using BubbleTextView for widget section headers" into ↵Sunny Goyal2015-05-121-13/+4
|\ | | | | | | ub-launcher3-burnaby
| * Using BubbleTextView for widget section headersSunny Goyal2015-05-121-13/+4
| | | | | | | | | | | | > Loading highres icons on the worker thread. Change-Id: I5b68a86820aa4c132c156339e497354cf57f0fca
* | Exploring dense all apps layout.Winson Chung2015-05-111-1/+1
|/ | | | | | | | | - Disabling section headers in all apps on tablet layouts - Fixing issue with predictions not showing on rotation - Fixing issue with over-aggressive dismissing of keyboard & filtered app state - Fixing issue where the container bounds were running straight up to the nav bar Change-Id: I5a5a56afa75b50be96af4894bf785ffbb1b15fb3
* Merge "Ensure that clipping widget size is 20~40% of its width on every ↵Hyunyoung Song2015-05-113-2/+119
|\ | | | | | | devices" into ub-launcher3-burnaby