Commit Graph

793 Commits

Author SHA1 Message Date
Jon Miranda
71cb80cccb Add springs when snapping between pages on the workspace.
- Behind feature flag QUICKSTEP_SPRINGS
- Springs control settling the page and allow for overscroll for the
  first/last pages

Bug: 111698021
Change-Id: Ib4a9ef59463cc46e31ac0766bf7705612f6c63c1
2019-01-24 21:25:32 -08:00
Tony Wickham
bf560728c1 Merge "Remove notification dot if app is disabled" into ub-launcher3-master 2018-12-14 00:10:24 +00:00
Sunny Goyal
c5939393a9 Bye bye workspace screens table
Removing a separate table for workspace screens. List of screens are
automatically parsed using the items in the favorites DB. Order of the
screen based on the screen id and rearranging screens is no longer
supported. In case the screens need to be rearranged, all the items
in the favorites db will need to be updated with new screen ids.

This makes backing up the DB (in the same database) easier as only
one table needs to be duplicates.

Change-Id: I8ba947a898f637d780e2f49925e78604263126e8
2018-12-10 11:43:35 -08:00
Tony Wickham
7120490595 Merge "Rename "badges" to "dots" where appropriate" into ub-launcher3-master 2018-12-05 21:19:57 +00:00
Sunny Goyal
ef92b82778 Adding support for launcher preview generation
Creating a utility class which generates a launcher preview
for a provided InvariantDeviceProfile

Bug: 118758696
Change-Id: I0aebeb6eed37f72edd1cc305e58eece305aae3ff
2018-12-04 20:19:14 -08:00
Tony Wickham
1e58cd7270 Remove notification dot if app is disabled
For instance, when turning off work profile, all work profile apps are
disabled and notifications are removed. Previously, we weren't updating
the dots in this case because we ignore unsupported ItemInfos (e.g.
disabled items in this case).

Note that this was only user-visible for Folders, because regular
shortcuts were updated when the disabled state changes.

Bug: 111791593
Change-Id: I3c49e6e3bf18753a868eb993b29c77abbefd3466
2018-12-04 14:42:52 -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
Sunny Goyal
ab770a10b9 Making CellLayout inflatable without LauncherActivtiy
This will allow creating cellLayout with a different device profile
or a different activtiy which can be used when displaying multiple
activities in multi-display or generating a preview for changing
display properties.

Change-Id: I386731d95e33c48bdef270ce9c0d3e9feefb6262
2018-11-20 17:11:13 -08:00
Sunny Goyal
024659c1b0 Fixing wrong layout used to calculate drag-n-drop location
Bug: 119229781
Bug: 119234125
Change-Id: I24425a7754db3dfef803088761fa67c9586d89d9
2018-11-08 11:10:59 -08:00
Sunny Goyal
876e462ffa Removing separate hotseat widget, instead using a QSB acroll all UI.
The QSB is responsible for updating its UI according to various states.

Bug: 109828640
Change-Id: Ic8cbf3d404d5870de0f6b8fe25a332b8d21bae20
2018-11-05 13:36:41 -08:00
Sunny Goyal
d0ae492e9f Changing the FolderIcon shape based on AdpativeIcon
> Creating an abstract interface to represent a folderIcon shape
> Defined few common folder shapes
> Picking the folder shape closest to the AdaptiveIcon shape

Bug: 111433118
Change-Id: Ib35eddbdd6692767aa9dbe6aae1a379a68cc456a
2018-10-17 12:14:41 -07:00
Ryan Lothian
fa530cd23f Make flags UI available on release build of launcher
The UI will only be shown on eng/userdebug platform builds.

Bug: 117223984
Change-Id: I27843f2d856a4a19f3fe53c4d306606eaa5714a2
2018-10-15 17:24:48 -04:00
Sunny Goyal
efb7e84242 Converting long item IDs to int
> Items ids were already being typecasted to int when being bound on the UI
> Using a consistent type allow better use of platform data-structures
> Adding IntArray and IntSet as a replacement for various Collection classes

Change-Id: Id3c650ed2420c2bfca3bd7671d2b705b56112371
2018-10-08 14:52:39 -07:00
Ryan Lothian
688e9896fa Groundwork for runtime-toggleable feature flags
This is the first step in adding a flag toggler UI to launcher.
The change migrates a single flag (QSB_ON_FIRST_SCREEN) from a
boolean constant to a boolean method. In future, that will allow
us to return different values at runtime.

Bug: 117223984
Change-Id: I1e62c91dd941b8145166021bc0aa157733e62ea0
2018-10-08 13:17:30 -04:00
Sunny Goyal
55bdeed7bb Removing various reflection based animations, to allow for better proguarding
Change-Id: If9df24ea4170e8a3d336057d1c3dc800934fc1ac
2018-09-21 18:21:04 +00:00
Tony Wickham
6a71a5bd77 Add undo snackbar for deleting items
- Add methods to ModelWriter to prepareForUndoDelete, then
  enqueueDeleteRunnable, followed by commitDelete or abortDelete.
- Add Snackbar floating view
- Show Undo snackbar when dropping or flinging to delete target; if the
  undo action is clicked, we abort the delete, otherwise we commit it.

Bug: 24238108
Change-Id: I9997235e1f8525cbb8b1fa2338099609e7358426
2018-08-30 16:22:25 -07:00
Sunny Goyal
b7b0135c93 Adding overscroll in recents view
Bug: 109828536
Change-Id: I4fe94bd157c2b65f80604751e6f0f7d5d81d058d
2018-08-10 22:41:20 +00:00
Sunny Goyal
aad3359e8e Removing unused touch handling in PagedView so that it is similar to various platform class
Bug: 109828536
Change-Id: Ibaba3fb4298f2dc055d125acea5f4c47403bbef0
2018-08-08 12:12:46 -07:00
Sunny Goyal
7fee2a82e4 Merge "Launching last task when back button is pressed in overview" into ub-launcher3-master 2018-08-08 17:34:46 +00:00
Vadim Tryshev
7acde48955 Enabling more checks in TAPL tests.
Hiding workspace from tests when in AllApps or Overview.

Also, we don’t need workspace_page_container.

Bug: 110103162
Test: Running TaplTests suite
Change-Id: I10875a1ce5d41a015c63034160676578f52d2e98
2018-08-03 10:29:36 -07:00
TreeHugger Robot
ce15b325e8 Merge "Retiring some feature flags" into ub-launcher3-master 2018-08-02 21:48:54 +00:00
Sunny Goyal
e39690b218 Launching last task when back button is pressed in overview
Bug: 111158326
Change-Id: Ib38f12f177780d15dbee69e4a27c21aaa9a3e087
2018-08-02 13:35:38 -07:00
TreeHugger Robot
1314fee74d Merge "Revert "Create new ShortcutInfo when dropping predicted deep shortcuts."" into ub-launcher3-master 2018-08-02 16:21:07 +00:00
TreeHugger Robot
899c08aee8 Merge changes from topic "am-402aa8b3-7a45-468a-931d-83007cd71180" into ub-launcher3-master
* changes:
  [automerger] Increase max distance for folder creation for tablets. am: 5aab8703ee
  Increase max distance for folder creation for tablets.
2018-07-27 23:08:37 +00:00
Vadim Tryshev
2ce6a13f60 Tapl library
The public API of the library has finalized; flakiness has been removed;
code polished.

Bug: 110103162
Test: TaplTests suite
Change-Id: Ic156bbfeedb1cb9c4a48ef907f97e396e8e81936
2018-07-20 14:43:05 -07:00
Android Build Merger (Role)
5e0634fed7 [automerger] Increase max distance for folder creation for tablets. am: 5aab8703ee
Change-Id: I37270e7cc65e66c16518b0921e06d26fa30b3bf4
2018-07-17 20:54:24 +00:00
Jon Miranda
5aab8703ee Increase max distance for folder creation for tablets.
Tablets generally have larger cell sizes (relative to phones, and relative to
the icon sizes with the cells). By increasing the distance from 55% to 75% of
icon size, it is easier for users to meet the folder creation threshold before
the icon reorder timeout is triggered.

Bug: 110796219
Change-Id: I8264390b8510340f4062e05ec12d0755e93a80d8
2018-07-17 13:52:24 -07:00
Sunny Goyal
c487b36519 Revert "Create new ShortcutInfo when dropping predicted deep shortcuts."
This reverts commit 4685965355.

Reason for revert:
Bug: 111435256

Change-Id: I4baf35dcc944915acad9b62d6e36a6858f89af85
2018-07-13 17:03:34 +00:00
Sunny Goyal
36b54228fc Retiring some feature flags
Change-Id: I80a00ecaec0785ce2ba6a5f14a54c8a76f555d43
2018-07-10 13:52:17 -07:00
Sunny Goyal
83fd25e3af Moving some abstract classes to interfaces, to better use java-8 features
Change-Id: I862af4931c95cbde052130d8b7d4ac3375db782f
2018-07-09 17:01:28 -07:00
Jonathan Miranda
3871e72686 Merge "Fix bug where add to folder fails even when folder creation animation runs." into ub-launcher3-edmonton-polish 2018-06-14 23:14:15 +00:00
Jonathan Miranda
c73a972ce9 Merge changes from topic "am-a3d615af-02aa-451c-b89c-c1f59300b566" into ub-launcher3-master
* changes:
  [automerger] Fix bug where add to folder fails even when folder creation animation runs. am: 36f6359c21
  Fix bug where add to folder fails even when folder creation animation runs.
2018-06-14 23:14:15 +00:00
Jon Miranda
36f6359c21 Fix bug where add to folder fails even when folder creation animation runs.
If the distance > max distance for folder creation, we clear the drag mode
if it was previously set.

Bug: 78919972
Change-Id: Ibd456c0981ebb20958c54d21ba3996172d2dd554
2018-06-12 15:26:52 -07:00
Vadim Tryshev
74c261c89f Prerequisites for TAPL
Adding things that will be used by TAPL.

1. Adding Ctrl+W to open widgets
2. Marking a UI element with shortcuts_and_widgets
id. Example of usage: we want to be sure we are in all apps.
A somewhat paranoid way to check this is to check that
apps_view is on, and workspace and overview_panel are off.
However, workspace is always in the hierarchy. We use
shortcuts_and_widgets instead.

Bug: 110103162
Test: Manual
Change-Id: I2a851e16c477f7ee895b459530bc5a1ff19e32f8
2018-06-12 14:54:23 -07:00
Android Build Merger (Role)
cd622e1e7c [automerger] Reporting range of visible tasks am: 528b9e0615
Change-Id: If07b140aa110e7fb8f8ef17637454126248720c1
2018-05-25 19:25:49 +00:00
Vadim Tryshev
528b9e0615 Reporting range of visible tasks
Also fixes task position being incorrectly reported specifically for
swipe events due to using stale getCurrentPage().

Bug: 72222505
Test: Manual
Change-Id: Ic79b67f8a6ffbfabc397b411b14afc309405197e
2018-05-25 12:24:40 -07:00
Jon Miranda
31942e788b Fix bug where icon 'jumps' on long press.
Bug: 76155869
Change-Id: I739b00564b0ebe00b3aff326b3c1d62deea9d1d3
2018-05-25 01:49:37 +00:00
Sunny Goyal
e598699dc5 Remove custom focus logic
Using the system logic for focus handling so that partially visible contents are
properly handled, eg in overview only hotseat is visible
This does changes the focus logic on workspace when both icons and widgets or different sizes
are present, we may consider reviving (parts of) this logic in the future

Bug: 80189843
Change-Id: I874e284e0a62b579c24d36db9b74da3de7a7e367
2018-05-23 10:54:18 -07:00
Vadim Tryshev
98913d0c95 Remove code duplication
Bug: 72222505
Test: Manual
Change-Id: I6ae6ac7474b44c16bd765635e32d2e843bc02cac
2018-05-18 18:41:34 -07:00
Jon Miranda
8d994cd6d5 Fix bug where Workspace page alpha stays 0 in SpringLoaded mode.
The page alpha gets set to 0 by updatePageAlphaValues sometime between
Workspace calling goToState(SPRING_LOADED) and onStartStateTransition.

By the time the transition is over, Workspace is no longer in a modal state
and so alpha never gets restored via updatePageAlphaValues.

Bug: 76449277
Change-Id: I95241395594dd9084763cc3bc51bc55319cadb73
2018-05-16 15:32:54 -07:00
Sunny Goyal
6001ea2e2f Separating the draglayer alpha into multiple dimensions so that different animaitons
can run without affecting the other.

Bug: 79323355
Bug: 78880824
Change-Id: I11cb464ebdaad0a7f0a56d4bc4c3dff1d56da16b
2018-05-11 12:18:39 -07:00
Sunny Goyal
5d1873a812 Removing scrim overdraw
> Moving all the scrims to draglayer to avoid creating multiple layers during
  various animations
> Removing sys-ui scrim in various states which alread have a background scrim

Bug: 74556464
Bug: 78585335
Change-Id: I8a3fd34ed440f3c7d2e19b3cdb4b72723c535602
2018-05-10 10:52:31 -07:00
Tony Wickham
56b247da1d Merge "Add atomic recents animation while swiping up" into ub-launcher3-edmonton 2018-05-09 20:13:23 +00:00
Tony Wickham
6becf7c07d Add atomic recents animation while swiping up
State handlers can now specify atomic and non-atomic components of
their animations to states, which can be specified when creating a
new animation. There is now one atomic animation, when going from
NORMAL to OVERVIEW (and in reverse):
- RecentsViewStateController's animation (scale/alpha) is all atomic
- WorkspaceStateTransitionAnimation has atomic and non-atomic:
  - Hotseat and workspace alpha is atomic, as is workspace scale
  - Everything else (scrim, translation, qsb and drag handle alpha) is
    non-atomic
- All apps progress is non-atomic

Also simplified dragging through overview; no longer pulls against you,
so we use an OvershootInterpolator when flinging instead of our custom
interpolator for the spring effect.

Bug: 76449024
Bug: 78089840
Change-Id: Iafac84d0c2b99ee9cf9dd5b30e2218286713b449
2018-05-09 12:33:46 -07:00
Jon Miranda
217f0ca2d9 Increase REORDER_TIMEOUT to make it easier for users to create/add to folder.
This is more common for tall devices where cell height is relatively larger
than the icon size.

Bug: 78598193
Change-Id: I2835794e4dbe799d0fadefaa723360145d134550
2018-05-08 10:50:40 -07:00
Sunny Goyal
39306af7d5 Fixing memory leak on rebind
Folder listeners were only cleared on activity destroy

Bug: 79322746
Change-Id: I5da98b864855303d21b86511de2e2982cd56f305
2018-05-07 09:50:10 -07:00
Vadim Tryshev
1c56935c30 Revert "a11y: disabling accessibility scrolling of the home screen"
This reverts commit 52b2b43c56.

Reason for revert: Per an email thread, this CL is considered a hack.

Change-Id: Id97fc9a398184ba18c2188d858218bc2d9ddc16e
(cherry picked from commit 310093d050)
2018-04-30 18:07:13 +00:00
Jon Miranda
d2d39cbfc7 Fix bug where workspace taps were not being sent to WallpaperManager.
Bug: 77218814
Change-Id: Ied464f08dce6f96fd3c56aa790f60a2561edcc84
2018-04-24 15:24:21 -07:00
Vadim Tryshev
52b2b43c56 a11y: disabling accessibility scrolling of the home screen
Bug: 77914605
Test: Manual
Change-Id: I5dcfe7479d7239b1f66bd2e805a1aa8978f5ca5b
2018-04-11 13:43:36 -07:00
TreeHugger Robot
f54a8f345b Merge "Avoid duplicate accessibility announcement upon switching to -1st page" into ub-launcher3-master 2018-04-05 18:02:25 +00:00