Commit Graph

5 Commits

Author SHA1 Message Date
Pinyao Ting
9cd63c97ce Prevents a ConcurrentModificationException in Widget
InvariantDeviceProfile.supportedProfiles can be modified in respect to
configuration changes. This CL ensures the list was cloned before access
to prevent ConcurrentModificationException

Bug: 191231591
Test: manual
Change-Id: I123458dcfe99af4babca2cf73733e3d2af0fad3c
2021-06-16 21:02:48 +00:00
Steven Ng
1d47d8c705 Use grid size as the upper bound for widgets' default size in initSpans
Test: In Pixel 4, drag a monthly view Google calendar widget to a new
      home page from the full widgets picker. The widget outline is
      correctly shown.
Bug: 189060113
Change-Id: I33113b29cc8923098de95f1d5eb14c2b02429de1
2021-06-08 14:15:50 +01:00
Pierre Barbier de Reuille
295a402908 Update the computation of the widget span from size
The new computation takes into account the new cell layout border
spacing.

Change-Id: Ic20e0906bbbaaf1e53475585e2a6ca31c277e09b
Bug: 187461595
Test: Manual testing, varying the sizes in a widget
2021-05-26 22:44:58 +01:00
Sunny Goyal
19ff728b92 Adding support for determining split layout for launcher.
> Simulating the windo wmanager API to get available device
  profiles until final API
> When a device has multiple internal displays, and with both
  tablet and phone possibilities, it uses a split workspace layout

Bug: 186160341
Bug: 175782275
Test: Manual
Change-Id: Ieff2329acac7cdd6b9abe6f96cd459cd45bd0efe
2021-05-03 14:48:28 -07: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