Commit Graph

18 Commits

Author SHA1 Message Date
Steven Ng
30dd1d65f6 Apply local color extraction during drag-n-drop
Test: Drag a test widget around and observe local extract color
      is applied.

Bug: b/182282587, b/182816217
Change-Id: If63a9d91ceb2102d5d913bca85997b8be07b1adf
2021-03-17 18:10:51 +00:00
Pierre Barbier de Reuille
ab33b76dce Launcher changes to support dynamic coloring on static widgets.
Bug: 179783721
Test: By hand using the AppWidgetDynamicColors widget
Change-Id: I27863cac31f2f6c29f5a717ff8d4492325f936fb
2021-03-10 22:04:35 +00:00
Pierre Barbier de Reuille
18d159a250 Correct Launcher3 for new sizes in App Widgets.
This follow recommendations from the API council review.

Also removes two public functions introduced recently by
http://ag/13473552 and are not needed anymore.

Bug: 181611658
Test: Manual testing with local widget.
Change-Id: I8d0c90a80a0d45981bd5d16e69cd86639d5ec7d8
2021-03-05 11:44:11 +00:00
Yogisha Dixit
741fae9ea2 Move widget files into widget folder + add tests.
I will use the newly created LauncherAppWidgetProviderInfoTest in a follow-up CL to add tests for the newly added widget sizing APIs.

Test: Automatic: Ran all robolectric tests in launcher3,
      Manual: Added a widget, edited the widget, removed the widget
Bug: 179807199
Change-Id: I540b2dbe284c6eb5aa2466a1d13a9581ee59425b
2021-03-01 13:59:52 +00:00
Pierre Barbier de Reuille
b2526feb24 Launcher changes for go/widget-size-specification
Makes sure the launcher:

1 - Send the list of actual sizes the widget in all situations.
2 - Gives the current size to the framework on inflation.

Also needed to guard the new border changes introduced in
http://ag/13532637 with the corresponding flag.

Change-Id: I2a33e9501b921f2fc393684e8ce91ee077626bf7
Test: By hand using a local widget.
Bug: 179025145
2021-02-24 20:40:41 +00:00
Sunny Goyal
eaf7a95546 Changing minimum supported Launcher version to 26
Change-Id: I49fcf874430ac53c3246371e179fbd828e14e4da
2020-07-29 17:30:19 -07:00
Adam Cohen
d916206271 Decouple the scaling / translation of widget views necessary in split-screen
=> We pull apart the scale and translation that are set in a fairly
   static way due to split-screen vs. the general translation and scale
   properties that might be used more dynamically, in this case
   for re-order animations
=> This allows removal of some code that breaks reorder animations
   due to the accrual of translations / scales in certain edge cases.
=> TODO in future CL: address other translation cases and make the throw
   case for calling base setTranslationX/Y for Workspace Items unconditional

issue 149438360

test: manual
Change-Id: Ic3fde172f669e215cd25db0fcd4e1c3c873d314f
2020-04-17 15:36:44 -07:00
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
Adam Cohen
370164c4f7 Fix drag and drop regression when dragging a scaled widget
Missed this case in ag/10736229; the symptom was that if you picked up a widget when it was scaled due to split-screen, the widget would disappear

Test: manual

Change-Id: I26810fcf820f7053b6445989dce6598e1df55a8e
2020-04-08 18:00:35 -07:00
Sunny Goyal
17feee8995 Merging stylus click logic in longpress helper for better state-management
Bug: 150825081
Change-Id: I7c507c41e67c09bff5a4ad3abc7a7a62fecf910e
2020-03-27 19:53:20 +00:00
Adam Cohen
650869973a Refactor / Cleanup / Simplify a bunch of dnd related rendering / animation
Addresses:
=> Fix folder icon drop location mapping (was very far off)
=> Fix BubbleTextView drop animation shifted by a few pixels
=> Get rid multiple unnecessary calls to setDragMode(none), was breaking
   some of the reorder flow; still some issues to address here.
=> Fix folder icon parallax (didn't work when the folder had a dot)

Test: manual

Change-Id: I5959cf341996f75d30212353ec096ed25bf40ea5
2020-03-21 01:26:09 +00:00
Sunny Goyal
6fe3eec95c Moving various common executors to a single location
Change-Id: I44bca49b8adb6fa22c3b48d10f674e42c28d792c
2019-08-20 14:36:17 -07:00
Sunny Goyal
df7abe1040 Notifying widgets to use dark text when rendered on light wallpaper
Bug: 109954539
Change-Id: Ifab21626a070c35b351ea99ea3f09f3bf2230d19
2019-06-13 15:07:20 -07:00
Sunny Goyal
25849b0a27 Fixing widget entering drag mode when clicked on an empty area
Bug: 119623336
Change-Id: I9e2281f57f07d98a414febb1e3052cb89ef5cb60
2018-12-06 04:02:07 -08:00
Sunny Goyal
c604a10551 Adding keyboard handling to QsbHostView similar to a normal appwidget view
Bug: 116842846
Change-Id: Ibab2dc1793561998f81710301d9ce0ca3d77e7b4
2018-10-15 11:00:28 -07:00
Sunny Goyal
0b0847b272 Fixing taskMenu and taskView clicks in fallback activity
> Extracting common methods from Launcher & DragLauncher to base classes
> Remoting some dependencies on Launcher and using the base class instead

Change-Id: I121cacf8a14190b4703cda60bdeb4f79eee69ded
2018-03-15 17:29:43 -07:00
Sunny Goyal
c11fac355d Fixing widgets get deteled because of double bind
If the AppWidgetHost starts listening in the middle of bind, it rebinds
the old widgets before a new widget is bound, leading to double bind.
We should clear all pending binds, before starting a rebind. As an
extra check only rebind a view which is attached to the screen.

Bug: 73814840
Change-Id: Ie3af683dc4095b158547e700d11e4faf7999466f
2018-02-27 19:23:01 -08:00
Sunny Goyal
29947f0b53 No more waiting around for resume
Apply model updates as son as they arrive instead of waiting for onResume.
Various workspace items do not use any configuration dependent resources.
For Widgets, we wait until the host starts lietening before inflating the actual view.

Change-Id: Icb2f5e5940c1ce6c27062ccd34eff87e80af5ab1
2017-12-19 12:50:17 -08:00