Commit Graph

18 Commits

Author SHA1 Message Date
Pun Butrach
f831a3bf4e fix: Ignore generatedPreviews flags on Vanilla Ice Cream and above
This is always enabled on correct AOSP implementations, crashes should be handled by OEM
2025-12-05 22:51:06 +07:00
MrSluffy
b684505009 fixed 3p themed icons not applying
- closes : #4799
- closes : #4752
- closes : #4267
- closes : #4248
- closes : #4179
- closes : #4157
- closes : #3960
- closes : #3943
- closes : #3408
- closes : #2882
2025-01-01 09:56:15 +08:00
Willie Koomson
52f2e98647 Check for null preview in WidgetItem.hasGeneratedPreview
AppWidgetManager.getWidgetPreview has been updated to return null
if the provider does not exist or the caller does not have permission to
access its previews. This change updates WidgetItem to check for that.

Bug: 308041327
Test: GeneratedPreviewTest#widgetItem_hasGeneratedPreview_nullPreview
Flag: ACONFIG com.android.launcher3.enable_generated_previews TRUNKFOOD
Change-Id: Ic2489c8698a81ba1bac005b2eb77348bcbfab999
2024-03-08 22:22:53 +00:00
Zak Cohen
26c26fe837 Widget Picker - show app icon next to recommended app label.
https://screenshot.googleplex.com/42gUGuSADdrW2CS

Bug: 323887132
Test: Manual, no test for widget cell yet.
Flag: NA
Change-Id: I95e7a645b3664361222d5045114224b17d8fdf34
2024-02-27 13:34:15 -08:00
Willie Koomson
fedc18e9a8 Use generated RemoteViews preview for widget picker if available
WidgetCell will use the generated RemoteViews preview to display
previews in the widget picker. It will fallback to current preview
methods if not available.

Introduces WidgetManagerHelper.loadGeneratedPreviews as a utility
function. WidgetManagerHelper is passed into the constructor of
WidgetItem to avoid calling
context.getSystemService(AppWidgetManager.class) for each widget.

Bug: 308041327
Test: atest Launcher3Tests:GeneratedPreviewTest
Flag: ACONFIG com.android.launcher3.enable_generated_previews DEVELOPMENT
Change-Id: I37429057cda83a5321884ace2537038e050b9a58
2024-02-13 18:49:44 +00:00
Sunny Goyal
2185f6f420 Loading widget description on the background thread
Bug: 281074741
Test: Varified on device
Flag: N/A
Change-Id: I6b9b13e712534bdc582b98dbfb7bdfcc40d2f19d
2023-05-05 23:15:41 +00:00
Stevie Kideckel
a093523299 Load widget preview images before adding the rows to the adapter
This allows for smooth animations as the items will have their full
height resolved

Bug: 190892517
Test: verified locally
Test: CachingWidgetPreviewLoaderTest
Change-Id: I86afc6951a4cc82ae45e63795791d259a3bb3cda
2021-06-18 19:18:29 +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
Steven Ng
e8d92342fa Replace horizontal ScrollViews with tables in the full widgets picker
Test: Run gnl test, AddWidgetTest
      Run Robolectric tests for widgets
      Manual test video: https://drive.google.com/file/d/1uwCtVNIlC9150kv5eEfILfP5r5M7ARYm/view?usp=sharing

Bug: 179797520
Change-Id: I2f4cdf84338a91b63967879d0c9268c312ace19b
2021-02-24 19:49:15 +00:00
Sunny Goyal
73b5a27b14 Updating some non-final static objects
Updating various static objects to use a standard pattern so that
it is easier to track and cleanup those objects

Bug: 141376165
Change-Id: Ia539cbfa338d544dddad771c5027b6748762768b
2019-12-11 13:22:58 -08:00
Sunny Goyal
e7b00128c7 Removing static instance of LauncherAppsCompat and unnecessary wrapper classes
Bug: 141376165
Change-Id: I8c1f1ab7d83ec50fe9c7bf39960ef9c360025ec7
2019-10-02 16:20:22 -07:00
Sunny Goyal
ac8154a23d Caching widget labels in icon cache to avoid lookup at startup
Change-Id: Ie026ee47905454bd70e774d422cd7fe142aec7e2
2018-09-28 16:36:33 -07:00
Sunny Goyal
782f0c9a89 Adding support for new APIs in O related to configurable shortcuts
> Config activities can now return PinItemRequest which can be used to pin
  deep shortcuts

Bug: 33584624
Change-Id: Ic0df436bd79e069615b9d60d24eb7594b824b2da
2017-01-19 13:54:31 -08:00
Sunny Goyal
87f784c285 Removing static Context access using LauncherAppState
> This ensures that LauncherAppState is only accessed in the presence of
a valid context

Bug: 33032833
Change-Id: I955e5cb022f8bd6374681ae6c0720a2666d5b750
2017-01-11 12:52:03 -08:00
Sunny Goyal
a52ecb0390 Removing all compatibility code below Lollipop
Bug: 32745285
Change-Id: I62971908e3e4402941fab627bbdfd47be64473a3
2016-12-16 15:05:09 -08:00
Sunny Goyal
7c74e4ae64 No more UserHandleCompat
Bug: 32745285
Change-Id: I762fb4e268c1afe48a1860ab12a4ccb3f626aa95
2016-12-15 22:06:10 -08:00
Sunny Goyal
a1503f47aa Comparing widget sizes when sorting if the labels are same
Bug: 21441837
Change-Id: Ib0e6d3b84389f900264a0d696d22057426973719
2016-08-18 19:09:46 -07:00
Sunny Goyal
4ddc40130a Creating WidgetCellItem to wrap LauncherAppWidgetProviderInfo and resolveInfo
In PackageItemInfo,, using the user of the first item in the sub-list

Bug: 27585511
Change-Id: I8243f0e5c831af65661ae815489e53e9fcade837
2016-03-18 11:06:01 -07:00