Commit Graph

180 Commits

Author SHA1 Message Date
Samuel Fufa
ba6b47fd8e Add visual indicator for predicted hotseat icons
Bug: 142753423
Test: Manual
Change-Id: Ie4325660fc5392358ec845ae58385bef279db60f
2019-11-07 16:49:24 -08:00
Samuel Fufa
efb665d3ec Implement hotseat prediction client
Bug: 142753423
Test: Manual
Change-Id: I9f697c474b29340c9b33ddf896a49e8f3f893f8b
2019-11-05 09:53:25 -08:00
Sunny Goyal
14168431bd Adding support for dynamic calendar and clock icons
Change-Id: Icdba34340a27a4f6dff7310d0bf9fd29aef1330c
2019-10-29 13:50:02 -07:00
Sunny Goyal
3808a69a6c Storing BitmapInfo instead of icon and color directly in itemInfo
This will allow subclassing BitmapInfo to support custom icon/dynamic
icons which can be loaded on the background thread instead of going
through IconFactory which runs on UiThread

Change-Id: Ieced6e91330bdff1b505826d097a8df711dfe967
2019-10-28 11:12:47 -07:00
Samuel Fufa
c96fa247a3 Fix notification dot scale in AllApps with grid size enabled
Test: Manual
Bug: 141262820
Change-Id: I24abf822edaeeabf335ed698a3ac1a65b71be7dc
2019-09-27 14:49:54 -07:00
Samuel Fufa
4a1d9b12c5 Allow LongPress between homescreen icons
approach: Ignore BubbleTextView touches in padding

Test: Manual
Bug:141265063
Change-Id: I579d414293e922e926410d0373f101f9dde9bce0
2019-09-24 14:10:03 -07:00
Jon Miranda
9b78e190fa Update app open/close animations.
- For app open, the icon text remains where it is and only the icon moves.
- Similarly for app close, the icon text remains where it is and fades in
  with the rest of the other icons text.

- With this change, the original view is always "VISIBLE"
  (if BubbleTextView/FolderIcon) but we hide certain elements.

Added video to bug.

Bug: 137200188
Bug: 139885365
Change-Id: I3d20c5f05bc7c0b9d052d8074ac3bfc21531c83d
Merged-In: I3d20c5f05bc7c0b9d052d8074ac3bfc21531c83d
2019-09-04 21:45:05 +00:00
vadimt
1fd52d9024 Remove tracing for a fixed bug
Bug: 132900132
Change-Id: Ic4ce3669f88c932e392b7517ec9fda11384dc334
2019-07-11 16:00:12 -07:00
Adam Cohen
29794c56a4 Workaround issue with latest version of RecyclerView which is overriding our custom accessibility delegate
-> Not the prettiest fix, but we only ever use the LauncherAccessibilityDelegate for BubbleTextViews,so anything else getting set here is incorrect. Stop-gap until we root cause the RV issue and decide whether there's a fix there, or a better way to ensure Launcher behaves correctly.

issue 129745295

Change-Id: I27cf79fda9edc2bebeda4728b776ab292caa141d
2019-06-21 12:56:36 -07:00
vadimt
f02bef7345 More tracing for app not starting from all apps
Bug: 132900132
Bug: 134172603
Change-Id: I6a85e616552e84b8165661d25ed4330f55d3946f
2019-06-13 14:05:17 -07:00
vadimt
da6dad5101 Not allowing applying dot state to override "disabled" description
Disabled apps were always accessibility-marked like "Disabled Messenger"

With introduction of dots, this degraded, the the "Disabled" part was
never added.

Restoring the old behavior here.

Bug: 129036789
Change-Id: Icb97ea9a190643449d90f558a78039df30c53cbf
2019-05-21 13:24:23 -07:00
Tony Wickham
e1cb93f957 Always place notification dots directly on adaptive icon path
- Calculate point on icon path nearest to top right corner, and
  use that as center for the dot
- Cleanup code related to dot offset

Test:
Set each style (different icon shape) and verify dot is in correct
placement for each of:
- Folders
- Icons in folders
- Icons in all apps
- Icons on workspace

Bug: 124414511
Change-Id: I036ed3677e8af222f00d4fad4a36a7e4d9b49ad9
2019-05-06 10:42:55 -07:00
Sunny Goyal
ae6e318711 Initial changes to creating a fake landscape Launcher UI
Workspace and hotseat are drawn in rotated UI giving the impression that the
device is in Portrait, even though it is in landscape

Bug: 131360075
Change-Id: I29c4068af25fd4dcf7039b9a45886e864a137977
2019-05-02 10:59:28 -07:00
Sunny Goyal
9589916418 ShortcutInfo renamed to WorkspaceItemInfo
Will get rid of ShortcutInfoCompat in a follow up cl

Change-Id: I7d7d9c938635f59b216290ba28bea9d0e0721a7d
2019-04-16 00:08:24 -07:00
Jon Miranda
83cdca67ba Fix bug where BubbleTextView text fades in after long press.
Introduced by Ieeb5d7b8fb389a2f7ee263d38b3021ffdefefd93.

Change-Id: I45e180dda09f03297530e5b5575b71f60c03fb5f
2019-04-15 13:28:26 -07:00
Jon Miranda
6f455b583f Fix sizing of FloatingIconView so that it matches the workspace.
* Added a cross fade at the end for text and shadows.
* Animate in FolderIcon bg/dot/text after swapping.

Bug: 129297366
Change-Id: Ieeb5d7b8fb389a2f7ee263d38b3021ffdefefd93
2019-03-27 09:42:50 -07:00
Sunny Goyal
371ea051d1 Fixing launcher UI not reapplied properly when IDP changed as a result of display changes
> Removing unnecessary check when binding model data as its safe to bind old data,
  we should just not persist it (that check is already there in model writer)
> Adding additional check in model bind to skip old bind if there are multiple binds

Bug: 126259547
Bug: 118441555
Change-Id: Ic250d2af13797d3e70c6e1fc70da65ebe6ab8d70
2019-03-06 15:41:29 -08:00
Hyunyoung Song
a23738540e Fix BubbleTextView visibility
Change-Id: I176d7c8b77f6c2d929217c3f9b4dbc3e942e48fc
2019-01-04 12:01:32 -08:00
Hyunyoung Song
ef468d80d8 Do not animate icon if work profile is disabled
Bug: 119884907

Change-Id: I14977581dcb42b5fb2fe21f628a4d91945fdd614
2019-01-03 17:23:43 -08:00
Tony Wickham
f34bee819c Rename "badges" to "dots" where appropriate
This will reduce confusion with the other "badging" concept we use for,
e.g. work profiles. It is also consistent with the external name
"notification dots".

Change-Id: I2a2c9d96dc0d6284eb0c48adc78a856271caad4d
2018-12-04 10:46:40 -08:00
Tony Wickham
8912b04c80 Move BadgeRenderer to iconloader library
- Rename BadgeRenderer to DotRenderer
- Move drawing parameters to new class DrawParams
- Add leftAlign param
Change-Id: I69de56c13280ba5e7e1ea3868c23edfac01012e9
2018-11-30 16:28:56 -08:00
Sunny Goyal
fe8e4a90be Moving some methods from various activities to the base interface
This allows creating some custom views in the absence of
activity context

Bug: 118758696
Change-Id: I23999290e972a2a8cbd725a521a4e0c7c2e5023e
2018-11-19 13:04:35 -08:00
Sunny Goyal
066ace1b88 Replacing setAlphaComponent with setAlphaComponentBound for better animation interpolation
setAlphaComponent throws expetion for invalid range, which can cause brashes in overshoot
interpolation

Bug: 118390004
Change-Id: Ic9c5ff3d660eba353b982c4c47ccfaf329b3e296
2018-11-06 09:59:03 -08:00
Tony Wickham
c6dc0c24ec Merge "Change long press timeout to use a factor of ViewConfiguration.getLongPressTimeout()" into ub-launcher3-master 2018-09-26 00:01:12 +00:00
Tony
2ca999cf1b Change long press timeout to use a factor of ViewConfiguration.getLongPressTimeout()
This way, if the default ViewConfiguration timeout changes, we will adjust accordingly.

Bug: 113639506
Change-Id: Ic3b93311c8e8d8196db2850fa641ffc675a16fb2
2018-09-24 17:24:51 -04: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
2b787e5bd6 Using a placeholder icon shape instead of low-res/blurry icon
Bug: 111142970
Change-Id: I867224464ae9c026f4dcb5256ef14fc39c8e751d
2018-08-27 10:43:46 -07:00
Tony
4043b05cde Cancel badge scale anim when setting new badge scale
Otherwise it's possible the badge scale animation will override the
non-animated set value, which could mean a badge continues to show
even though it shouldn't:
- Animate badge scale to 1
- Before animation finishes, set badge scale to 0
- Badge scale ends at 1, since animation wasn't cancelled, so we
  continue to show it indefinitely

Also exported some properties in case a similar issue arises.

Bug: 111791593
Change-Id: Ia1a417239b909886adf9351e9bdc06a3b22d8b73
2018-08-17 13:47:39 -07:00
Sunny Goyal
d230307a95 Migrating to android-x
Change-Id: I9a774152d13a541e8496dd84f2469bfed407f86d
2018-08-14 15:22:12 -07:00
Tony
05d98c246b Adjust notification dots
- Use consistent bounds for folders as other icons, to ensure dot
  has a consistent placement (moved right+up a bit)
- Strengthen the ambient shadow to improve contrast
  - Increased blur size and opacity
- Use a dark gray rather than black for dots on dark folders

Bug: 73331123
Change-Id: I888f4645d3a48465af93f5003dda8f8b7c3129f3
2018-07-23 16:41:45 -07:00
Sunny Goyal
ed7a6937cb Unifying and maintaining the text-alpha and text visibility property
Bug: 76228194
Change-Id: I70be5f9fd22c53864a9a0308f256baa7dc1f3ab7
2018-04-17 20:08:10 +00:00
Sunny Goyal
2e38cf4825 Merge "Changing the overviewState to show appsearch and floating header" into ub-launcher3-master 2018-03-20 17:01:49 +00:00
Sunny Goyal
7185dd63eb Changing the overviewState to show appsearch and floating header
Change-Id: I2cfd61cfc9978e4c8e4520f0f7217e49e7344c79
2018-03-19 20:02:34 -07:00
Sunny Goyal
66dccad6ff Disabling unnecessary requestLayout calls in BubbleTextView
> Disabling layout change when updating icon, if previously set
> Setting the ellipsis behavior to end, to disable relayouts when
  changing text

Change-Id: Ic00c207c0372724daebd8ee1d748f5cf5aa56457
2018-03-19 12:02:53 -07:00
Sunny Goyal
0b0847b272 Fixing taskMenu and taskView clicks in fallback activity
> Extracting common methods from Launcher & DragLauncher to base classes
> Remoting some dependencies on Launcher and using the base class instead

Change-Id: I121cacf8a14190b4703cda60bdeb4f79eee69ded
2018-03-15 17:29:43 -07:00
Sunny Goyal
726bee7d5d Removing click-feedback shadow generation logic in BubbleTextView
Instead of animating the shadow, animating the icon scale. This avoids
unnecessary bitmap creating at app-launch and also plays nice with the
app-launch transition

Change-Id: I1d3d24bc7212a6d659855ff1002a45388e269e52
2018-03-05 14:56:38 -08:00
Jon Miranda
d82c5cd2b0 Set disabled state when getting new icon from DrawableFactory.
Change-Id: Ic9c508d24cc0e65d45f5c1f4bcbe8d5cd7fb9200
2018-02-27 10:12:03 -08:00
Tony Wickham
305e920048 Add notification count to content description for badged apps
Bug: 70389249
Change-Id: If7f43941d501ba807adbb33d489da3944c012e94
2018-02-05 10:08:52 -06: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
Android Build Merger (Role)
31a07c9340 [automerger] Also reset mBadgeScale to 0 when recycling view. am: 48043ee0d6
Change-Id: I45edb03913e7cad7f670be5e5331896c30662bcc
2017-11-01 23:01:31 +00:00
Jon Miranda
48043ee0d6 Also reset mBadgeScale to 0 when recycling view.
When left as 1f, the drawBadgeIfNecessary thinks that there
is still a badge -- which results in a NPE when trying to draw
the badge.

Bug: 68324671
Change-Id: I4eedb5825b3a6429c99de0466a77d368a39b1951
2017-11-01 16:01:13 -07:00
Android Build Merger (Role)
232d7196fa [automerger] Fix bug where recycled BubbleTextView kept their badges. am: 5254944a68
Change-Id: Icb486e7a529aae15d5f959487c489ef1ad5798b1
2017-10-26 18:35:10 +00:00
Jon Miranda
5254944a68 Fix bug where recycled BubbleTextView kept their badges.
Bug: 68324671
Change-Id: Id5f4db6706afd002242d95d44422fc61042798c8
2017-10-26 11:34:55 -07:00
Sunny Goyal
3dce5f3f50 Merging duplicate logic for deferred drop handling in Worksace and Folder
> All the logic is contained in UninstallDropTarget
> Also fixing a bug were mWaitingForResume was not cleared

Bug: 34692289
Change-Id: I617475ce53062902d6817954fb608198e6e03d3c
2017-10-06 09:07:36 -07:00
Mario Bertschler
230612f502 Fixing content description of a promise icon that is fully downloaded.
Bug: 65779803
Change-Id: I912a70310c6a44f0b0b443cebf77608fd19bdc71
2017-09-27 17:05:21 -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
Jon Miranda
7f522a25c3 Optimizations to reduce all apps jank.
* Since adding springs to the apps in All Apps, it is no longer
  efficient to build a hardware layer for it.
* Pre-uploads bitmaps to RenderThread.
* Only add overview animations if we are transitioning to/from it.

Bug: 63711551
Change-Id: I948267598e95ec59dc156acb9abe6b5b789110c0
2017-08-02 12:41:33 -07:00
Tony
7308cde2ca Don't fade in text if icon is in hotseat
Bug: 63011217
Change-Id: Ie914fcdfd0bf36b0cf12cc54f4e93206aa1074bd
2017-06-28 13:47:18 -07:00
Sunny Goyal
4e5a878bc4 Fixing two different implementations for animating text alpha
The animator in BubbleTextView maintains an internal state which was getting
invalidated by the FolderAnimator.

Change-Id: I53885fe8f1773ca62fe59f1712056f02ff9a749f
2017-06-23 11:02:02 -07:00
Sunny Goyal
9314b7c01d Separating double shadow logic for BubbleTextView in a separate subclass
This allows better customization and reuse of the double shadow logic and simplified
various attribute management

Change-Id: I5e277d8399756385452d8bb8c0a0107234a76d34
2017-06-23 10:37:25 -07:00