Commit Graph

12 Commits

Author SHA1 Message Date
Sunny Goyal
72a74669e7 Adding support for async view inflation
Bug: 318539160
Test: atest AsyncBindingTest; atest ItemInflaterTest
Flag: aconfig enable_workspace_inflation DEVELOPMENT
Change-Id: I77a373db7a5805f68f4b8cbfa9b586b5674252de
2024-02-22 10:58:48 -08:00
Sunny Goyal
fdeb19e02c Simplifying pending widget inflation path
Instead of adding a PendingView in appWidgetHost, attaching a
listener in PendingView for widget-updates.

This moves the view inflation as the last stage of widget
binding. Eventually we can separate the model update and view
inflation to different threads

Bug: 318539160
Test: atest TaplBinderTests
Flag: None
Change-Id: I124edaa9622fa367302b80969036d128a978396e
2024-01-08 15:52:50 -08:00
Sunny Goyal
4df719a1e6 Removing ENABLE_CACHED_WIDGET since we now have always listenign widget
> Also using PendingWidgetView for deferred widget view

Bug: 270395008
Flag: LEGACY ENABLE_CACHED_WIDGET enabled
Test: Exising widgets tests pass.
      Verified UI by forcefully rendering deferred widget

Change-Id: Id34f89d778f9f993c1b7ad13f66e57fda9843417
2024-01-04 09:26:10 -08:00
Sihua Ma
8bbfcb6581 Move LauncherWidgetHolder to widget package
Making LauncherAppWidgetHost package-private as well

Bug: 235358918
Test: N/A
Change-Id: If022ec8d429579a972991872b2dc11db76719341
2022-11-16 14:31:14 -08:00
Sihua Ma
aa2b872d1c Move most of the functions in LauncherAppWidgetHost to LauncherWidgetHolder
Test: N/A
Bug: 235358918
Change-Id: I343419376491203a195154f2766b12e5def38879
2022-11-16 14:30:08 -08:00
Sihua Ma
8ca56fe1cd Get rid of setInteractionHandler call to the host in launcher
Bug: 235358918
Test: N/A
Change-Id: I0defac1831825bf0a13a601dd1502b4ca022bc2e
2022-10-24 14:56:11 -07:00
Pinyao Ting
fc14807d7a Fix launcher crash related to widget updates
LauncherAppWidgetHost fails to cleanup deferred widget when launcher
started binding the widgets in workspace, which leads to a crash because
widgets that was previously attached to the workspace get re-attached to
the workspace.

Bug: 245016152
Test: manual
Change-Id: I4de261e08cfdcee74f210c39bcadf403b98887ab
2022-09-14 13:22:29 -07:00
vadimt
f6ef879cf4 Moving all sources that are shared between Launcher and TAPL in one directory
This will help SysUI test team (who uses TAPL) to set up Gradle build for their tests.

Bug: 202567877, 234414088
Test: presubmit
Change-Id: I3d923ea4b54d1a4c3d2b345be09692727d30433e
2022-07-27 20:18:46 +00:00
Pinyao Ting
e5dbb75acd Cache and reuses LauncherAppWidgetHostView when launcher resumes
Currently by design when launcher enters the background, it stops
listening to updates in widgets. This eventually causes the dilemma
for launcher when it resumes, before the update can be returned from
the system process via IPC, launcher could do one of the following
to fill the gap:
1. show a deferred widget view -- a placeholder that renders the shape
   of the widget -- to let the user know widget is being reloaded.
2. show whichever widget view that was previously displayed to the
   user that may now contain stale content.

There is a descrepancy here since in some edge cases we are showing the
former while in most other cases we are showing the later. This CL added
a short-term fix to address the descrepancy and favors the later where
possible.

Bug: 218067434
Test: manual
Change-Id: I6cd2cd704186267227e2ec47f2581843fd526fa0
2022-06-15 13:23:31 -07:00
Cyrus Boadway
263a00c738 Suppress Splash Screen on widget reconfiguration activity start
When a widget configuration activity is started, it's started from
the launcher. Under some circumstances the launcher's splash screen
would be shown, rather than the splash screen corresponding to the
tapped app.

To avoid confusion, we suppress the splash screen for configuration
starts.

Bug: 190153065
Test: manual
Change-Id: Ib18851f1bb50b64bc5d47b8aa5931490c969b54b
2021-06-22 09:22:33 +00:00
Cyrus Boadway
2668e731a0 Add activity-start/return animation to widget configuration
When launching the configuration activity for a widget, use the
activity transition animation.

Test: manual
Bug: 190487998

Change-Id: Ife84e86eec74f81fecddce07c833356a7962fd4b
2021-06-10 21:37:04 +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