Commit Graph

122 Commits

Author SHA1 Message Date
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
179249d804 Dominant color is part of icon cache
> Calculating extracted color during icon generation and storing it in model and DB
> Removing unused logic avoid various types of badge rendering
> Icons are badged with extracted colors, while folder is badged with theme color

Bug: 35428783
Change-Id: I93e30c52fbded7515c3ae1778422e84672eafb56
2018-01-03 16:55:58 -08:00
Sunny Goyal
9d32323cac First pass at using hardware bitmaps
Bug: 35428783
Change-Id: Ife67b85f6e7e268826597ed9bccd9659841f67de
2017-12-13 13:36:36 -08:00
Hyunyoung Song
e24cb63b81 WallpaperManagerCompat should target correct platform
Also replace Utilities.isAtLeastO() to static final constant.
Bug: 65544683

Change-Id: I39fbea66939d72c31702748716c4e65b4f9bee6a
2017-09-11 12:17:09 -07:00
Sunny Goyal
f5523921c3 Adding support for badging instant app icons.
Change-Id: Idc43a1a83e0a93f70879730a0acefbc124f9c0e2
2017-08-28 15:35:25 -07:00
Mario Bertschler
8ff9e1d679 Integrating suggested app by handling new status flags for shortcut items.
Guarded via feature flag SUGGESTED_APP.

Bug: 62483883

Change-Id: I7e0c8a9875bc37c435aa4316b44322a628cd4826
2017-08-24 12:23:06 -07:00
Sunny Goyal
34ab6df435 Fixing legacy shortcuts which only specify packageName in the intent
dont get restored on apk install.

For various model update task, we only use targetComponent (unlike loader
where we all check packageName for legacy shortcuts).
This causes various shortcuts which only specity packageName in the intent
to get skipped during the check. Instead creating a pseudo component for
these shortcuts similar to IconCache

Bug: 62944669
Change-Id: I0aa0a4c15ef3ad88dc6cdd579a76315fb2ff780b
2017-07-06 08:20:18 -07:00
Hyunyoung Song
b8ae2dd2af Default icon should match platform one even on N and below devices.
Bug: 63083094

Change-Id: Ie08ccaf63a49fa766f0d51d840d7763fc4bf2a5a
2017-07-05 13:10:17 -07:00
Hyunyoung Song
4d16982d42 Replace launcher3 default icon to match with the platform one.
Bug: 63083094

Change-Id: Ic77d443ee563959c2569263e2d9de7452fa8d26d
2017-06-30 11:46:42 -07:00
TreeHugger Robot
fe5008c997 Merge "Update cache version based on new icon sizes." into ub-launcher3-dorval-polish 2017-06-27 21:59:14 +00:00
Jon Miranda
6cdc16cf84 Update cache version based on new icon sizes.
Change-Id: Ia82edd366cba19efbec0c1764484c51a976c5aa1
2017-06-27 14:04:01 -07:00
Rajeev Kumar
ba9065cffd Some cleanups in IconCache class:
1. Make an instance variable final
2. Replace explicit type argument with <>
3. Get rid of an unnecessary return statement

Change-Id: Ifd0017e973c33a40d398fceb65125464f877ff56
2017-06-27 12:44:56 -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
Sunny Goyal
1da138903b Adding support in IconProvider for loading different icons for UI and model use
Bug: 62900800
Change-Id: I86e2d77efc7e5fc85b59cf18e634546d098d138f
2017-06-22 17:13:46 -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
368ae77201 Defining a dark theme for launcher
> Removing the code for LIGHT_STATUS_BAR as that will be controlled by the theme
> Updating icon cache to always use transparent background for low-res, as the
theme can change the bg color

Change-Id: Iab64ec29cab629ee515af22ec15b95d3f40a9df5
2017-05-24 14:34:04 -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
Sunny Goyal
740e90144a Adding support for dynamically change icon shape for AdaptiveIcons
am: ca18746163

Change-Id: Ic4c14ad1760930735a881926aac8b45efe0cdba0
2017-04-04 19:52:22 +00:00
Sunny Goyal
ca18746163 Adding support for dynamically change icon shape for AdaptiveIcons
> This would allow developers to verify their icon designs on different
device configurations
> This settings is only visible when developer settings is enabled

Change-Id: I7e32abfede001c134f23390734dcd39c93b68b9a
2017-04-04 12:33:59 -07:00
Sunny Goyal
9b5a97585f Clearing icon cache due to system app icon changes (without any SDK change)
Bug: 36366450
Change-Id: I23b77bd2bff292dee0e9ec576ba49f03e34628a6
2017-04-03 14:12:52 -07:00
Hyunyoung Song
ffd7e76261 Fine tune the circle detection
Decreased the pixel_diff_percentage from 10% to 0.5% by
not counting the pixel_diff around the mask path outline.

Verified that this implementation works well on both Pixel/PixelXL

b/36563706

Change-Id: I8bb488f550a67e2188eff4c4b9e7717e979a741c
2017-03-29 10:25:21 -07:00
Mario Bertschler
817afa3447 Show promise app icon in All Apps while installation process.
This CL only modifies the model and is behind a feature flag
which per default is set to false.
The app icon will appear as a promise icon, it reacts on icon
or label changes and the icon will be remove on finishing the
installation process. With this CL the progress of the installation
process is not visible.

Bug: 23952570

Change-Id: I510825d0b0b1b01eb14f7e50f0a2358b0d8b99b5
2017-03-17 09:21:35 -07:00
Sunny Goyal
1f3f07d47c Simplifying some launcher themes
> Replacing some colors with theme attributes
> Simplifying styles definition by removing unnecessary inheritance and inlining some definitions

Change-Id: Ifa167515cae6a7fd3720f1a52ff9ce11abb4495f
2017-02-16 15:24:37 -08:00
Sunny Goyal
d5d5e22715 Updating widget tray theme
Using standard theme attributes rather than custom color codes, so
that it plays nice with system theme changes.

Bug: 34819119
Bug: 34897402
Bug: 21446746
Change-Id: I265fba3ceae8873650fd09e4704838d313155e83
2017-02-09 10:16:22 -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
3e9be43b6e No more LauncherActivityInfoCompat
Bug: 32745285
Change-Id: I00f13794d5dc0a2b1fe03ec74de36018f22eb386
2017-01-11 13:06:50 -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
1cc1c9ad83 Enforcing background thread when accessing iconCacheDb.
> Moving any icon cache access to background thread
> Updating Apps list to avoid loading icons for ignored apps

Bug: 21325319
Change-Id: Id72755100f1176ccfcc99249c5e02873cc249a13
2017-01-10 23:42:49 -08:00
Sunny Goyal
2d7cca1e05 Updating PendingAppWidgetHostView to load icon on the background thread
Bug: 21325319
Change-Id: I0886eec5a3f36f5e1ac18020c54891a56bdb5ed2
2017-01-05 13:55:35 -08:00
Sunny Goyal
3fe4a146cf Simplifying IconCache access code
Providing a way to access icon cache without LauncherAcitivtiyInfo.
This allows fetching LauncherActivityInfo only when required, thus
avoiding system RPC when the icon is already in cache.

Change-Id: I92918c7a0d0d0796e5f7b70d4ecb6787c52c6600
2017-01-03 15:58:53 -08:00
Sunny Goyal
7c74e4ae64 No more UserHandleCompat
Bug: 32745285
Change-Id: I762fb4e268c1afe48a1860ab12a4ccb3f626aa95
2016-12-15 22:06:10 -08:00
Sunny Goyal
1cd01b023a Ensuring that ShortcutInfo always has an icon
> Making iconBitmap public instead of a getter (similar to AppInfo)
> Removing getIcon() which can lead to IO on UI thread
> Removing updateIcon and handling the update at the caller

Bug: 21325319
Change-Id: I6a49b9043f974e9629ea25e77012d97cc04c0594
2016-12-13 10:31:12 -08:00
Sunny Goyal
ab121c1715 Adding a generic method to initiate overridable objects
Change-Id: Ia433427c65ad38804f2eed9c6bc209df232758c0
2016-12-12 17:01:11 +00:00
Sunny Goyal
32f3dda802 Adding a utility class to enforce that icons are always flattened on
the background thread.

Bug: 21325319
Change-Id: I4d0f02557cdbf70cfa86750ac047faf2917e39bf
2016-11-19 23:40:07 +05:30
Sunny Goyal
f0ba8b7ca1 Moving various runnables in LauncherModel to individual tasks
> Adding tests for some of the runnable

Change-Id: I1a315d38878857df3371f0e69d622a41fc3b081a
2016-11-09 15:50:08 -08:00
Sunny Goyal
fc744144ef Using common method for updating icons in cache
Change-Id: Ide1979d02387ffcb8839174ab9fdfa9e5b6e1d47
2016-10-07 11:46:31 -07:00
Sunny Goyal
97574ede5a Using add/replace instead of update when updating an entry.
am: caa52918f1

Change-Id: I728322245f07e0bc87e8a0726a22932f57248500
2016-10-07 18:13:30 +00:00
Sunny Goyal
caa52918f1 Using add/replace instead of update when updating an entry.
Update operation was not including version and updateTime columns
leading to a update operation getting called wheneven launcher loads.

Bug: 32004297
Change-Id: I5f1793633ce3bb72d5641a82502b3ba8b9cdff7d
2016-10-07 10:00:56 -07:00
Hyunyoung Song
0de011705b Code sanitization
- Removed bad method/class name typos

Change-Id: Ie6900e9e3d9ce9b550d2a2442a5dac3f7050a573
2016-10-06 10:57:29 -07:00
Sunny Goyal
eae23e4520 Fixing double system state call in iconCache
am: fd47652574

Change-Id: Ia2288bbd269480a3337b0f819e1c8a9a05140294
2016-09-12 18:19:08 +00:00
Sunny Goyal
fd47652574 Fixing double system state call in iconCache
Change-Id: I6d43c8054c18e199f4343662f92631f0808c773e
2016-09-11 14:49:18 -07:00
Sunny Goyal
10629b077c Moving some image handling classes to .graphics package
Change-Id: Id6d3d0b9c345a503ff2e09f073eb4b6449e21c7e
2016-09-02 12:34:33 -07:00
Winson
1f06427266 Initial changes to tweak layout.
- Adding DeviceProfile callback for when the launcher layout changes due
  to insets.  This is necessary since there are now different layouts
  depending on which side the navigation bar is on
- Consolidating hotseat and other layout into the device profile 
  launcher layout logic
- Making the all apps icons match the workspace icon height
- Tweaking caret drawable to draw to the bounds specified to simplify
  layout in each orientation
- Fixing minor issue with page indicator shifting in landscape
- Centering overview buttons to the workspace page

Bug: 30021487
Change-Id: I1866bce00b2948f3edd06168c0f88d81207e3f13
2016-07-20 10:17:08 -07:00
Winson
b93f34a8be Fixing issue with content description not being updated.
Bug: 30064868
Change-Id: I09a0576c3618c253c25a5e755081833816887698
2016-07-12 18:02:37 -07:00
Andrew Sapperstein
5f7750d75c Use colorSecondary for darker bg color.
Used for widget headers and a few other places.

In order to support pre-API 25, an app-local version of colorSecondary
is created and used throughout the app. A new WidgetContainerTheme
sets colorSecondary to a canned value. On API 25+, colorSecondary
is set to the platform value.

Change-Id: Ie0dd66333052b7346eea5d82d1c88417c6a2cd00
Fixes: 28625102
2016-06-30 14:17:19 -07:00
Winson
5cb61e4808 Bumping icon version to clear db to trigger loading from IconProvider.
Bug: 29401565
Change-Id: I168dc9b52a972c7858ff8859a6375df314914105
2016-06-28 15:37:30 -07:00
Sunny Goyal
8682116e2d Changing the scale factor for square icons
Bug: 18245189
Change-Id: Iab0074c76083480a2a7316f5563fc48154de6355
2016-04-07 16:26:27 -07:00
Annie Chin
17f85951a5 Introduce IconProvider.
Bug: 27506625

-Move managing of SystemState to IconProvider

Change-Id: I3417f0b7d0664c2255c7cc2a88f6c65822b5fb98
2016-03-28 14:07:22 -07:00
Sunny Goyal
2ae7736d09 Embedding the icon pixel size in the cache DB version.
This causes the cache to get reset when the icon size changes,
for eg, in case of display scale changes

Bug: 27701193
Change-Id: Ib11144757a93cb50fb233d855902c0b2c15afbed
2016-03-22 14:34:16 -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