summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherAppWidgetHostView.java
Commit message (Collapse)AuthorAgeFilesLines
* Moving widget reinflation to push modelSunny Goyal2017-10-051-18/+66
| | | | | | | | Instead of checking every widget, a widget which needs reinflation would post a callback on launcher avoiding unnecessary loops in onResume Bug: 67305604 Change-Id: I53e08d6f4795f7b716a9debca5c0c68dd25a7afe
* Fix bug where widgets are inflated in the wrong orientation.Jon Miranda2017-09-191-2/+1
| | | | | | | | | | | | The bug is that in onResume, the context may tell us the wrong orientation. As a workaround, we store the orientation that the Launcher is created with, and we use that orientation to check whether we actually need to reinflate the widgets. Bug: 64916689 Change-Id: I5194debbd217a573d1f177c31d8c0abdf9da51b5
* WallpaperManagerCompat should target correct platformHyunyoung Song2017-09-111-1/+1
| | | | | | | Also replace Utilities.isAtLeastO() to static final constant. Bug: 65544683 Change-Id: I39fbea66939d72c31702748716c4e65b4f9bee6a
* Removing various reflection calls with final APIsSunny Goyal2017-05-221-12/+1
| | | | Change-Id: Ibf48d6015d808f86bc79ccf64e3077eb5b6ccaff
* Updating the setAsyncExecutor call as per API changesSunny Goyal2017-05-081-1/+1
| | | | | Bug: 37534990 Change-Id: I3cb9ea4e9aec5647a0f03e5514780f42f207ebc0
* Fixes a bug to not be able to scroll widgets intoduced when enablingMario Bertschler2017-01-241-2/+2
| | | | | | | | | | | to swipe allapps from everywhere. The fix is to determine if the widget is scrollable on layouting instead of the callback when a widget has been updated. Bug: 34641906 Change-Id: Idc9d8ade7e601279b87856333ae754f4785131ac
* This enables to slide up All Apps from anywhere in the workspace,Mario Bertschler2017-01-091-7/+46
| | | | | | | | | | not only over the hotseat. The tricky part handling with scrollable widgets is solved by setting requestDisallowInterceptTouchEvent from within the widget view host (and resetting it upon performing long click). Change-Id: I8b60e7ea2c1e8ae830b4737e94ed2d796265fa24
* Fix widget reorder animations in multi-window mode.Jon Miranda2016-12-201-0/+31
| | | | | | | | | | The original animation assumed that the views are not translated and not scaled. In multi-window mode this assumption is no longer valid, because app widgets are scaled and translated to fit center within their cells. Bug: 32176631 Change-Id: Id60c793730d982277c9d91860e9fb0e6a0df7d38
* Merge "Catching TransactionTooLargeException when binding widget." into ↵Sunny Goyal2016-11-151-3/+7
|\ | | | | | | ub-launcher3-master
| * Catching TransactionTooLargeException when binding widget.Sunny Goyal2016-11-091-3/+7
| | | | | | | | | | | | | | | | | | A widget can potentially bypass binder size limit with remote views when using partual updates (as the merging happens on the system service). In such a case, show the widget in error state. Bug: 32365088 Change-Id: Id1c4425958a06463273731464e31f05908c35ec7
* | Enabling async inflation for AppWidgetsSunny Goyal2016-11-031-0/+15
|/ | | | | Bug: 22839968 Change-Id: Id622053c2882f478b3a3ab3918a9f76750ead8c6
* Alienating QSBSunny Goyal2016-10-181-3/+1
| | | | | | | | | | | | | > Moving all QSB widget handling code in a separate package > QSB is handled on a separate host, independent of the main host. This allows us to safely reset either of the two hosts > Also removing the logic around closeSystemDialog: Launcher does not use any panels which need closing System sends an onActivityResult(RESULT_CANCELLED), we do not need special handling for waitingForResult > Fixing bug when auto-generated qsb widget id was not being saved Change-Id: I2d889b7b1c80b14785d14f35624142a4b78452de
* Moving the widget auto-advance logic to AppWidgetHostView instead ofSunny Goyal2016-09-301-4/+106
| | | | | | | | | | | | | | | | handling it in launcher This fixes the bug where launcher ignores auto-advance property changes during app update or widget remote views update as well as simplifies widget management On potential downside of this refactoring is that the auto advance will keep running even when all-apps or widgets tray is open. We could eventually use onVisibilityAggregated to handle visibility changes, but currenly the workspace visibility is not being updated properly in these cases Change-Id: Ie7331fec1877f43ad23e634d37571d8f3ef51e59
* Moving the QSB out of the cell layout to the Drag layerSunny Goyal2016-07-131-5/+1
| | | | | | | | This allows better edge matching for the QSB. The QSB position is kept synchronized with the page scroll and all-apps transition. But its not visible in spring loaded and overview mode Change-Id: I4e6723607ea966ee672273a9ca67c792fd6b5661
* Adding logic to pull in workspace data from another Launcher3 basedSunny Goyal2016-07-091-2/+2
| | | | | | | | provider. This allows OEMs to keep the user's homescreen intact while changing the default home app package. Bug: 28536314 Change-Id: Ibebfd7dd33aa2cbd9ca28d2d611dd0a4a5971444
* Moving LauncherAccessibilityDelegate to Launcher to associate it withSunny Goyal2016-06-171-1/+1
| | | | | | activity lifecycle. Change-Id: Ib815505677fa7ed74bdcfe7141b1d9bea5d7143a
* Moving the QSB to the workspace grid.Sunny Goyal2016-05-271-1/+3
| | | | | | | | | | | | The QSB will only be resent on the first screen of the workspace covering the full width of the first row. If will not be movable. The first screen of the workspace will not be movable. The searchDropTargetBar no longer contains the QSB (it can be renamed in aseparate cl). Refactoring all QSB related logic by moving it to a custom view inflated only using xml. Change-Id: Icb4fd6eb855df1af15f685961c38351bf4fd4f4a
* Fixing bug where the widget background enters into a focused stateSunny Goyal2016-05-041-1/+1
| | | | | | | if a child calls requestFocus in xml Bug: 28562293 Change-Id: I005e23550184de29fa15eb70ab322615920b8947
* Adding UI tests for various bind widget flowsSunny Goyal2016-03-151-0/+7
| | | | Change-Id: I634302051886baee6b6424f69bc95db860b4823e
* Merge "Making some view properties exported. These will be visible in ↵Sunny Goyal2016-02-111-0/+3
|\ | | | | | | hierarchy viewer" into ub-launcher3-calgary
| * Making some view properties exported.Sunny Goyal2016-02-091-0/+3
| | | | | | | | | | | | These will be visible in hierarchy viewer Change-Id: I940724a7f61d67b8502d77be203a94875bc92668
* | Merge "Change widget host view background when giving focus to child." into ↵Tony Wickham2016-02-101-4/+9
|\ \ | |/ |/| | | | | | | | | | | | | ub-launcher3-burnaby-polish am: 4df1653331 * commit '4df165333131483e1d6b6c156d345a4aeef9806c': Change widget host view background when giving focus to child.
| * Change widget host view background when giving focus to child.Tony Wickham2016-02-101-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before, the FocusIndicatorView stayed on the widget host unless the widget had its own focus change listener, which caused a couple of problems, namely (1) it was hard to know where the focus was from a user's standpoint, and (2) the focus indicator could get stuck on the screen if you entered a widget and then long-pressed workspace. Now, the focus indicator goes away and instead the widget is framed with a white border to indicate that the focus is inside it. The frame goes away when pressing ESC or when touching the screen. Bug: 26744224 Change-Id: I14025576fd7a9f901b4d969b878af0bebad79a70
* | Preventing a Runtime widget crash from crashing the LauncherSunny Goyal2016-01-261-0/+15
|\| | | | | | | | | | | | | am: 3fc648d3b7 * commit '3fc648d3b792f63d3b99509300a602d23c842433': Preventing a Runtime widget crash from crashing the Launcher
| * Preventing a Runtime widget crash from crashing the LauncherSunny Goyal2016-01-251-0/+15
| | | | | | | | | | Bug: 26750103 Change-Id: I31f120bb0c4d64b903b3dd5dae0ae46f95bcdf59
* | Merge "Keeping the focus indicator on the widget view, while a child is ↵Sunny Goyal2015-12-011-0/+23
|\| | | | | | | | | | | | | | | | | focused" into ub-launcher3-burnaby-polish am: 093a58cc77 * commit '093a58cc776be2a3cd5aed9d14df9c78a35af052': Keeping the focus indicator on the widget view, while a child is focused
| * Keeping the focus indicator on the widget view, while a child is focusedSunny Goyal2015-12-011-0/+23
| | | | | | | | | | Bug: 25199581 Change-Id: Ie08d1438ae0c1b5d4fcaa4d642508c1b9db0f5d4
* | Merge "Allowing widgets to be focusable" into ub-launcher3-burnaby-polishSunny Goyal2015-11-251-1/+68
|\| | | | | | | | | | | | | am: d007d0722c * commit 'd007d0722c782266f494806e750c24208d6d3ca5': Allowing widgets to be focusable
| * Allowing widgets to be focusableSunny Goyal2015-10-301-1/+68
| | | | | | | | | | | | | | | | | | > Pressing 'enter' enters the focus inside the widget. > If the widget has only one focusable, it directly performs click > Pressing 'esc' brings the focus back to the parent host. Bug: 25199581 Change-Id: Ia7fd5d929f5945d61173abd349660a5efbe74afc
* | Refactor StylusEventHelper to provide onButtonPress/Release methodsMady Mellor2015-08-211-2/+2
| | | | | | | | | | | | | | | | This will enable an easier migration to the new M APIs for identifying button presses from stylus / other tools. Bug: 20430722 Change-Id: I41cfa6eff8d76bb83cf1bdaf6623ec1092ed554c
* | Moving drag-drop related code into a separate package.Vadim Tryshev2015-08-201-1/+2
|/ | | | | | | | | This is per an earlier CR comment "we should probably move all this code to its own package (launcher3.dragndrop) in a separate cl". I'm not moving DragSource because it's referred from gsa code. Bug: 22609426 Change-Id: Ia7204dab99c0c395c66b77143a2d60411153f5f3
* Stylus support: handling drag n drop for widgetsMady Mellor2015-06-021-3/+11
| | | | | | | | | This alters the widget host view code to consider stylus button presses allowing the user to pick up widgets with a stylus button press, and drop them by releasing the button. Bug: 20430722 Change-Id: I359f72bd80016f4b313aab1325cc92d7c6fd2a8c
* Refactoring DeviceProfileAdam Cohen2015-05-211-0/+4
| | | | | | | | | | | | | | | | | | | | -> 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
* Fixing crash when dragging and dropping a restored widget.Sunny Goyal2015-02-171-2/+2
| | | | | | | > When the widget is in pending state, AppWidgetProviderInfo is not available Bug: 19364311 Change-Id: If3126a375853e6e710c6eba4b8824e18f3f0d391
* Adding accessibility controlsSunny Goyal2015-01-161-0/+1
| | | | | | | | | | | > Adding 'Remove' option to workspace items > Adding 'Add to workspace' to all apps and widget list items, which adds the item to the first available space, giving preference to the current workspace screen > Adding 'App info' and 'Uninstall' options to appropriate items Bug: 18482913 Change-Id: Ifab7423af2d9ba502b5a2771b37bb5436b3df937
* Supporting custom widgets provided by launcherAdam Cohen2014-12-051-1/+16
| | | | | | | -> This change provides integration for widgets provided by the launcher package which can run arbitrary code. Change-Id: I6052da5c4afed7ee72e3b44d045b9c46f2d84c42
* Adding support to restore widgets even for jelly beans.Sunny Goyal2014-08-081-28/+5
| | | | | | | | | | | | | | | > Show 'widget-not-ready' until the widget app is installed > Once the app is installed, bind a new widget id (not required on L if id-remap was received). **Remove the widget if bind failed > If the widget has no configuration screen, show the widget, otherwise show 'setup-widget'. > Clicking 'setup-widget' shows the config screen, and updates the widget on RESULT_OK. issue: 10779035 Change-Id: I2f8b06d09dd6acbc498cdd93edc59c26e5ce17af
* Adding app widget restore support in Launcher3 for android LSunny Goyal2014-07-211-0/+26
| | | | | | | | | | | When the app is restored, it displays placeholders for all pending widgets. These placeholders can be moved and removed similar to a widget (size is fixed to what defined in backup). Once the system notifies the launcher of the new widget ids, the place holders are replaced with actual widgets. issue: 10779035 Change-Id: I68cbe4da01e9ca2978cb4471a7c645d2aa592055
* Fix long press after already moving off iconJason Monk2014-04-221-0/+19
| | | | | | | | | | | | | When an icon is in the Hotseat and a user drags off from the icon, but continues holding down, the icon gets a long press triggered by the CheckLongPressHelper. To fix this a check has been added on move events to see if the point has moved outside the view and to cancel the long press check callback if it has. Bug: 13569451 Change-Id: Id175cdc220d70b5e9f8e492ed5a3cc7c3f11db10
* Fix issue where you could trigger a click after long pressing a widget ↵Adam Cohen2013-10-161-3/+11
| | | | | | (issue 11186227) Change-Id: I5a767ac6352f7efb4d3c6c2768c8d2aaaa913f3f
* Fix widget longpress issue where longpress misfires (issue 10988288)Adam Cohen2013-10-081-1/+12
| | | | Change-Id: Ibe4aa4d92a1b419b63ff3cf61164c637fb579221
* Fix crash when setting wallpaperMichael Jurka2013-09-051-3/+0
| | | | | Also clean up some unused code Change-Id: Ibef8d3d594cc859a993640fd6ee578e9eeb633d1
* Initial Changes for Dynamic GridWinson Chung2013-08-201-0/+1
| | | | Change-Id: I9e6f1e5167791cf8dc140778dfa447f86424e9bf
* Cancelling long press on widgets if they don't handle touch/tap.Winson Chung2013-08-161-0/+12
| | | | Change-Id: Id5f002f64d02d8d5fb9bdda8b062a026decbe0e2
* Launcher2 is now Launcher3.Daniel Sandler2013-06-051-0/+101
Changes include - moving from com.android.launcher{,2} to com.android.launcher3 - removing wallpapers - new temporary icon Change-Id: I1eabd06059e94a8f3bdf6b620777bd1d2b7c212b