Commit Graph

99 Commits

Author SHA1 Message Date
Sunny Goyal
337c81f664 Removing static instances of UserManagerCompat and AppWidgetManager
> Changing the lifecycle to follow other static objects in Launcher
> Removing compat interface and inlining everything to helpers

Bug: 141376165
Change-Id: I82bd5db1969101de9a7eac77f32728d70195bb35
2019-12-11 10:03:19 -08:00
Sunny Goyal
14168431bd Adding support for dynamic calendar and clock icons
Change-Id: Icdba34340a27a4f6dff7310d0bf9fd29aef1330c
2019-10-29 13:50:02 -07:00
TreeHugger Robot
f31dab5e02 Merge "Removing static instance of LauncherAppsCompat and unnecessary wrapper classes" into ub-launcher3-master 2019-10-08 18:49:36 +00:00
Samuel Fufa
5e6741828f Merge "Decouple grid size and widget preview size in WidgetsRecyclerView" into ub-launcher3-qt-future-dev
am: e5865a03bb

Change-Id: I72ff45bd7080a7bb6ca4ab681423d6bd1da8a291
2019-10-04 16:45:48 -07:00
Samuel Fufa
f1424a3b38 Decouple grid size and widget preview size in WidgetsRecyclerView
Test: Manual
Bug:142148773
Change-Id: I59aa29e95ddb7d6002a88cf853bae5fcf9811154
2019-10-04 15:15:58 -07: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
Samuel Fufa
15357968db Don't persist invalid previews to cache
Test: Manual
Bug:137404499
Change-Id: I04a3a0e081fcb8de45601f028398670e7542ed22
2019-09-04 10:01:52 -07:00
Sunny Goyal
6fe3eec95c Moving various common executors to a single location
Change-Id: I44bca49b8adb6fa22c3b48d10f674e42c28d792c
2019-08-20 14:36:17 -07:00
Hyunyoung Song
2bf3f37f5a Fix icon shape refresh for widgets list / legacy shortcut black bg issue
Bug: 118085499
Change-Id: Ifc3c711815567f40f109e95bcb76c01f23b4a3a2
2019-04-02 11:00:50 -07:00
Sunny Goyal
e62d2bb165 Removing some Launcher3 dependencies from BaseIconCache
Change-Id: Ic80ed4a5cd2fc414cd6c27096d798e7f0b8efc72
2018-11-06 14:51:55 -08:00
Hyunyoung Song
48cb7bc7a4 Move IconNormalizer/ShadowGenerator/LauncherIcons to icons package
Bug: 115891474

Sending out the package name changing CL first before I make
LauncherIconsHandler and tests around it.

Change-Id: Ic10479a06333e1435b392a7072cd08782e710cbd
2018-09-26 11:57:37 -07:00
Sunny Goyal
f840f10d50 Removing additional rpc due to icon cache update
When launcher loads, it fetches the list of apps twice, once for
loading all-apps and again for updating icons. Instead reusing
the previously fetched apps list.
Also moving the icon loading in a separate package for further
generalization

Change-Id: Ibd2dae56e6027a31b633da030bc6b43a90b27e1b
2018-09-21 15:27:03 -07:00
Sunny Goyal
d230307a95 Migrating to android-x
Change-Id: I9a774152d13a541e8496dd84f2469bfed407f86d
2018-08-14 15:22:12 -07:00
Roger Olsson
4ac406db22 Avoid crash when widget previews have no intrinsic size
Intrinsic size for widget preview drawable checked.
Needed since some drawables, like color drawables,
do not have any intrinsic size.

Bug: 78452220
Test: manual, see Bug info.
Change-Id: I815353773e38b1fce2fe19962f07c1727e1b0768
2018-04-26 10:44:09 -07:00
Sunny Goyal
18a4e5aefb Making LauncherIcons thread safe
Creating a pool of LauncherIcons so that they can be used from multiple threads

Change-Id: Idc7b5ddb47b6e338a5389f3c4faa6f63de108c72
2018-01-09 17:30:52 -08:00
Sunny Goyal
f1fbc3fbe7 Converting widget panel into a floating view
> The widget panel is only inflated when needed
> Using the swipe up/down interaction for widgets tray
> Removing additional view wrappers from all-apps
> Widget tray is preserved across activity recreation
> Launcher no longer has WIDGET state, the actual code around
  the states will be removed in a follow-up cl

Bug: 67678570
Bug: 67585158
Change-Id: Ia29a7c33ec81e6c53cc24e2906b7022b6f41755b
2017-10-13 18:47:54 -07:00
Sunny Goyal
952e63d006 Fixing custom widgets support:
> Moving the definitions to xml so that it is easier to override in derivative projects
> Fixing verious bind and save logic for custom widgets
> Adding feature flag to easily disable custom widgets

Change-Id: I0e278bc7dd415713029364060ef10842da990be9
2017-09-13 14:04:35 -07:00
Jon Miranda
6cdc16cf84 Update cache version based on new icon sizes.
Change-Id: Ia82edd366cba19efbec0c1764484c51a976c5aa1
2017-06-27 14:04:01 -07:00
Jon Miranda
b28c4fcf35 Landscape grid changes for Workspace/All Apps.
This is the just first CL to get eyes on the changes.
Next CL will update the All Apps to be full width.

Bug: 37015359
Change-Id: I2d7ec6851fdc13b8fa654e7e2be3152330243ccc
2017-06-23 11:47:48 -07:00
TreeHugger Robot
3fede16f22 Merge "Do not apply legacy treatment on shortcuts Bug: 62617041" into ub-launcher3-dorval-polish 2017-06-22 19:21:27 +00:00
Hyunyoung Song
d84f771f75 Do not apply legacy treatment on shortcuts
Bug: 62617041

Change-Id: I56a04536fe1bcba9912c5da3ce5a9c9b75bc3506
2017-06-22 11:49:33 -07:00
Sunny Goyal
e463c8f191 Rafactoring shadow generator logic to allow customizing various parameters
Change-Id: I38f8ac4352cb9e23d377832ffe2f4923a4df7a70
2017-06-20 13:37:05 -07:00
Jon Miranda
0966072c91 Portrait grid changes for Workspace/All Apps.
Bug: 37015359
Change-Id: Ifbdd0e71c36e532b189e02283e3eeb562ebe2654
2017-06-19 17:02:45 -07:00
Sunny Goyal
b3648e084f Refactoring some shadow generator logic into common methods
Change-Id: I25fc3248be5148fb1c14944eb4ddeec5bd4125b2
2017-05-02 16:17:29 -07:00
Hyunyoung Song
09204172b3 [MANUAL] resolve merge conflicts of 59c0e0e91 to ub-launcher3-dorval-polish
Change-Id: I7c80b665b5216e99284f5b04b8500fc35d916985
2017-04-27 11:43:47 -07:00
Tony Wickham
6c300c89ec resolve merge conflicts of 128b7e59a to ub-launcher3-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: I927373593dfb1b67b504a76b1ad013357b363a6e
2017-04-05 13:14:01 -07:00
Tony Wickham
86222d23e2 Add support for getting widgets/shortucts for a particular package/user
Bug: 34940468
Bug: 33553066
Change-Id: I5d0131df206c6a13d4227ad28c5b094bbf1343df
2017-04-04 14:36:52 -07:00
Tony
ca4e6b4b59 resolve merge conflicts of 26b174659 to ub-launcher3-master
Test: I solemnly swear I tested this conflict resolution.
Change-Id: Ifb24f291b096b979044e5c87ec58c24e9c479728
2017-03-30 18:10:05 -07:00
Tony Wickham
26b1746593 Add support for system shortcuts in popup container
- Currently the system shortcuts are just widgets and app info
- As shortcuts, they live in ShortcutsItemView
- They are populated either as icons only (if there are deep
  shortcuts) or as icons + text
- Widgets are disabled until binding them is complete (we request for
  them to be bound on long-press now). We should revisit this.

Bug: 34940468
Change-Id: Ia51d002c3b3ede87658bdab57abfc3eeca1ed242
2017-03-30 16:35:56 -07:00
Sunny Goyal
afc3f09240 Adding support for showing the widget preview based on the provided RemoteViews
am: c65a0085d7

Change-Id: Iabea96bb74294e2775a08427c17e154020d9bc40
2017-03-17 18:41:31 +00:00
Sunny Goyal
c65a0085d7 Adding support for showing the widget preview based on the provided RemoteViews
Bug: 35811129
Change-Id: I336e48cd00cfec2e617ac73bd8a81419b0944aa7
2017-03-17 11:25:29 -07:00
Sunny Goyal
9b29ca5add Defining HomeScreenElementTheme for elements which appear on top of
wallpaper

> Using HomeScreenElementTheme for workspace items
> Fixing view inflation where wrong layout inflater was being used

Change-Id: I92e278dbfb609ad7af9c2f47351f23f03cf12049
2017-02-17 11:37:30 -08:00
Sunny Goyal
7d87cb1a6e Updating the shortcut preview generation logic
Drawing a shortcut icon on a white round-rect with shadow
Also center aligning the preview

Bug: 34819119
Change-Id: Ic25be6bf301aeb11315a5050f009259b26c6134a
2017-02-16 13:41:04 -08:00
Sunny Goyal
92bbfa19c3 Updating the default widget preview generation logic
We draw a while round rect box which is divided into the cells to
represent the widget size. The app icon is drawn in the center
for this white box.

Bug: 34819119
Change-Id: Ie4d83712577f21b276c6744a55993f71da368398
2017-02-08 15:28:02 -08:00
Sunny Goyal
65513ba58c Using WidgetCell in the Pin Item confirmation prompt for a consistent UI
Also fixing some platform API changes in PinItemRequestCompat

Bug: 33584624
Change-Id: I255829f0079f1a3967bf8d6a337da12c890eb7ec
2017-01-20 15:44:15 -08:00
Sunny Goyal
dbb28b2bf8 Merge "Adding support for new APIs in O related to configurable shortcuts" into ub-launcher3-master 2017-01-20 18:35:08 +00:00
Sunny Goyal
a2441e88ff Updating widget preview generation to not embed any badge.
Instead drawing badge in the view directly.

This will allow us to reuse the same preview when we do not want to draw
badges. This also simplified badging of shortcut config activities.

Change-Id: I9c07c33bf9c2b8ef81a00026b1d42587868c906f
2017-01-19 14:00:40 -08: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
278359539c Adding support for requesting addition of shortcut/widget
on the workspace.

Bug: 33584624
Change-Id: I664366822fe8088742faff2cce006239ab0771bc
2017-01-18 18:38:34 -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
ec5a42e1ac Merge "Catching OOM during widget preview generation" into ub-launcher3-master 2016-10-27 22:04:51 +00:00
Sunny Goyal
3ef8691f82 Fixing wrong cache lookup call
Cache entry was saved using flattenToShortString, but the
lookup was using flattenToString

Change-Id: I4c012d5a90a89121989db059d31d3dd288fa5b8c
2016-10-27 11:40:59 -07:00
Sunny Goyal
2570d107f5 Catching OOM during widget preview generation
Bug: 32365481
Change-Id: Ifc49b033c3ad83213d50793301d94bb6337a412d
2016-10-27 11:39:14 -07:00
Andrew Sapperstein
abef55a1c1 Update Launcher to use theme colors.
Instead of using hard-coded variants of colors, use the theme color
that corresponds (colorAccent, colorPrimary, etc).

Updated:
- "Search for more apps" text
- App info drop target hover color
- PageIndicatorDots
- All apps & widget scroll bar & scroll popup colors
- All apps section text color
- widget picker background color

TODO:
- widget picker header color

BUG: 28625102
Change-Id: I74b543ff71b8caef8cd950c8183ac84c759cb4d5
2016-06-20 11:46:44 -07:00
Sunny Goyal
6388b2c61b Adding some utility methods for thread verification
Change-Id: I3fb6a1b860bba8a6efe413dd2698f972dc3e2506
2016-04-15 18:03:50 -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
Hyunyoung Song
3e840f4343 Prevent work profile widget DnD crash
b/26079469

Change-Id: I3d49ac498bbaaef8ca8a3051f5ab4b35ef771410
2016-03-01 11:57:44 -08:00
Sunny Goyal
6f70936f7f Preventing launcher crashes due to low disk space.
In case of low disk space, all write operations to the IconCache are
silently ignored. This will not affect the Launcher behavior and
user will still see the latest icons, but in some cases, icon loading
would appear slow

Bug: 24585352
Change-Id: I85ccc519046fc3708403388bba89e019a3f2ce3d
2015-12-18 10:20:52 -08:00
Sunny Goyal
1ba7e36cc8 Fixing null check when calling mutateOnMainThread
Bug: 25269169
Change-Id: I74f7fb833a374f59a16487099f1bf72b086e88ee
2015-10-26 10:42:12 -07:00