Commit Graph

202 Commits

Author SHA1 Message Date
Schneider Victor-tulias
6a5f431a7b Revert "Revert "Add UI updates for incremental app installs.""
This reverts commit 229497d182.

Reason for revert: Patching bugs

Fixes: 176901235, 176992421, 176884453

Test: manual

Change-Id: I57e13a15e72284564a10761966732ee31d15fd08
2021-01-12 12:22:33 -08:00
Schneider Victor-tulias
229497d182 Revert "Add UI updates for incremental app installs."
This reverts commit 84269d349d.

Reason for revert: causes b/176884453 and b/176992421

Change-Id: I3398674a0acbad8329df5d341ae074ac073a6bf9
2021-01-07 19:44:44 +00:00
Schneider Victor-tulias
84269d349d Add UI updates for incremental app installs.
1. Changed Preload Icon UI to be grayscale while the app is not startable.
2. Added progress bar for when app is installed but still ownloading.
3. Updated Preload Icon progress and click handling to use new incremental api.

Progress bar color updates will follow in a separate CL.

Demo: https://drive.google.com/file/d/1H1EvtTorLeJwC1eiq10tm-TT81YZ6osk/view?usp=sharing

Bug: 171008815

Test: manual

Change-Id: I5874a5146d79a8c91d7d90ff0b9c1c427a3c95dd
2021-01-05 15:17:26 -05:00
Schneider Victor-tulias
7bbec50031 Fix AllAppsSearchPlugin icon redrawing without special-casing.
Preventing icon animations in deep shortcuts fixed the icon redrawing issue in the all apps search page, however other icons could still be redrawn, yet could not be special-cased without removing icon update animations altogether. Added logic to only animate icon updates outside of the all apps search page.

Demo: https://drive.google.com/file/d/1ReT2O_1tV20terY0Jr1NJGxIxPblHCK4/view?usp=sharing

Change-Id: Ibe0b43801ec5340c3551125aef13170d569d2c55
2020-11-12 10:31:20 -05:00
Tony Wickham
22a5a68464 Fix a couple notificaiton dot issues
Fixes: 172010602 by adding drawDotIfNecessary() back to BubbleTextView
Fixes: 167272638 by overriding drawDotIfNecessary() to do nothing in
DeepShortcutTextView

Change-Id: I0bfbbc6e27dedac73ae97c5a084412ce1aba11e4
2020-11-02 17:04:58 -08:00
Schneider Victor-tulias
3ee7018227 Fix All Apps Search plugin shortcut icon redrawing issue.
BubbleTextViews animate the update from their placeholder icons to their high res icons. Added a field to allow restricting what BubbleTextViews' icon updates should be animated. Updated SearchResultIconRow to store the icon Drawable rather than the resource id to prevent unecessary redrawing.

Fixes: 170966269

Demo: https://drive.google.com/file/d/1FBdEl11mHZk1SpCMRY4XZAGt5TVZ01W4/view?usp=sharing

Change-Id: Ib55dafdf5b5fed00d343af5f95f3dd3f08c4ee8e
2020-10-26 14:25:35 -04:00
Samuel Fufa
314761a808 Setup SearchResultIcon for single cell results
SearchResultIcon will be able to render apps, shortcuts and remote actions. It can also handle its own focused state drawing.

Screenshot: https://screenshot.googleplex.com/C3KgjJtLQTBPgaf

Bug: 170752716
Test: Manual
Change-Id: I460a9c128ea3f5814784e342c5d5fa5b7e310882
2020-10-15 14:32:19 -07:00
Samuel Fufa
4b7f38b8fa Align fallback result query with result text
screenshot: https://screenshot.googleplex.com/6Daj5vdmz2jmznX
bug: 169438169
test: Manual
Change-Id: Ie621ed3c834aec5e9467607da4f685d05d152183
2020-10-07 10:31:06 -07:00
Samuel Fufa
02be2a43f5 Support Remote actions
Bug: 168846477
Test: Manual
Change-Id: I7b9dc96bc7a8ccb25ccb4b7135880768256f1ef3
2020-09-24 14:28:49 -07:00
Schneider Victor-tulias
350b462f24 Animate icon update from loading state.
Test: manual

Fixing b/129983531. Having app icons pop in without any animation from a solid placeholder color can look janky. Added a sequential fade in, fade out animation.

Preview: https://drive.google.com/file/d/11NgEja7vzm3f3aH3WbEQljUWGKuuK00_/view?usp=sharing
Change-Id: If77e8f480b02d5b7d29f89afa44450c83a68a276
2020-09-23 14:08:15 -07:00
Samuel Fufa
d6bacdcaf0 Handle AppSearch in plugin
+ Use AppSearchPipeline as a fallback if plugin times out

Bug: 166058597
Test: Manual
Change-Id: I96a38e412fd08f47475d2bc37bff34b86538ea12
2020-08-26 11:37:10 -07:00
Samuel Fufa
4a53c70c57 Introduce support for Hero app Section
[Video attached to bug report]

Bug: 162871508
Test: Manual
Change-Id: Ia6f5621d6220f55e6fd5e56530853c267838442c
2020-08-07 17:29:19 +00:00
Sunny Goyal
30ac97d938 Adding home animation support for non-system Launcher
When user swipes up to home, Launcher will receive a onNewIntent
callwith a bundle-extra gesture_nav_contract_v1. It will contain
the componentName & UserHandle of the closing app & a callback.
Launcher can use the callback to return the final position where
the app should animate to and an optional surface to be used for
crossFade animation. The surface cleanup can be handled in
onEnterAnimationComplete.

Change-Id: I76fdd810fdcb80b71f7d7588ccac8976d9dfe278
2020-07-21 11:43:21 -07:00
Sunny Goyal
44a3b2030d Fixing shortcut popop non-clicable on the icon
Bug: 160819504
Change-Id: I182399aa271a2ad290c33fb39356f8f2c99e105f
2020-07-13 13:15:28 -07:00
Samuel Fufa
167210a323 Keep Predicted icon same size when dragging
-> In addition, this also prevents the drawing of ring effect for predicted icon when view is about to be copied to drag bitmap. Icon will scale to full size (without ring) when dropped.

Video attached to bug report

Bug: 152325754
Test: Manual
Change-Id: Ibd1a5dbf76c41bdc30ae851ad914a4d0e32703c8
2020-05-13 11:22:27 -07:00
Adam Cohen
c77bc45fa5 Fix issues with drag and drop from All Apps in non-default grids
=> Also fix the widget tray in these non-default grids, and the external shortcut addition flow. The layout was broken as it was scaling with the icon size. Instead keep it fixed which looks much better, similar to how we maintain all apps.
=> This also fixes a small jump when dragging shortcuts external to Launcher.

issue 154169001

Change-Id: Iad1e3859dd6fedccce9b5c6633e64426a4630c31
2020-05-08 16:00:08 -07:00
Adam Cohen
1d13c0bf13 Cleanup reorder animations to not require layout on every frame
=> Extending on previous CL to separate multiple translation properties
   and avoiding expensive layout pass

Test: manual

Change-Id: I058da7367fb320b9f432bef9482be2966d3a7d42
2020-04-24 01:28:39 +00:00
Adam Cohen
d916206271 Decouple the scaling / translation of widget views necessary in split-screen
=> We pull apart the scale and translation that are set in a fairly
   static way due to split-screen vs. the general translation and scale
   properties that might be used more dynamically, in this case
   for re-order animations
=> This allows removal of some code that breaks reorder animations
   due to the accrual of translations / scales in certain edge cases.
=> TODO in future CL: address other translation cases and make the throw
   case for calling base setTranslationX/Y for Workspace Items unconditional

issue 149438360

test: manual
Change-Id: Ic3fde172f669e215cd25db0fcd4e1c3c873d314f
2020-04-17 15:36:44 -07:00
Sunny Goyal
e396abf502 Moving model data structures to a separate file
Change-Id: I77ad7a5219e72d2e0d6c1803de2ac3ed6a65a8f7
2020-04-09 13:20:39 -07:00
Sunny Goyal
c4d3201538 Removing support for fake landscape
Bug: 111068105
Change-Id: If31d2f700ddee1d21541735de3a8006ee2a53c5c
2020-04-03 17:11:35 -07:00
Sunny Goyal
17feee8995 Merging stylus click logic in longpress helper for better state-management
Bug: 150825081
Change-Id: I7c507c41e67c09bff5a4ad3abc7a7a62fecf910e
2020-03-27 19:53:20 +00:00
Adam Cohen
650869973a Refactor / Cleanup / Simplify a bunch of dnd related rendering / animation
Addresses:
=> Fix folder icon drop location mapping (was very far off)
=> Fix BubbleTextView drop animation shifted by a few pixels
=> Get rid multiple unnecessary calls to setDragMode(none), was breaking
   some of the reorder flow; still some issues to address here.
=> Fix folder icon parallax (didn't work when the folder had a dot)

Test: manual

Change-Id: I5959cf341996f75d30212353ec096ed25bf40ea5
2020-03-21 01:26:09 +00:00
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