Commit Graph

17266 Commits

Author SHA1 Message Date
arangelov e6627ebfed Don't call BottomUserEducationView#close() while running animation.
If while the work profile info card opening animation was
playing you pressed the Work tab repeatedly, close() was
called. That caused the animation to never complete
properly (onAnimationEnd() was never called). This CL
makes sure to not call close() if the animation is
still running.

Bug: 112471462
Bug: 112188042
Test: Manual
Change-Id: I2e62e0c5c6f1d6132ea359a85cb6aadf57639c30
2018-08-20 17:23:15 +01:00
Tony Wickham 2bcc9ba5ef Merge "Cancel badge scale anim when setting new badge scale" into ub-launcher3-master 2018-08-17 21:24:10 +00: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
arangelov ad78305862 Highlight work tab when user already in All Apps after creating WP.
When a user created a work profile and was already in the All Apps
view, the work tab was not highlighted, because the logic for that
was only in AllAppsContainerView#onScrollUpEnd(). This CL
highlights the tab when the user has resumed and the All Apps view
is expanded.

Bug: 79242814
Test: Manual
Change-Id: I40af0d513c95f8084e21f4e276e9f56bcb06555e
2018-08-17 20:28:52 +01:00
Tony Wickham 58ad76fd62 Merge "Make arrow feel more connected to popup" into ub-launcher3-master 2018-08-16 17:48:07 +00:00
Tony c677417d7a Polish shelf tracking
- Offset distance based on where gesture started, so that the shelf is
  always under your finger even if you swiped up high on the nav bar
- Use the same distance when swiping down to launch a task as we use for
  swiping up from an app (so that the swipe feels more reversible)
- Allow swiping up in the gap between hotseat and overview, so there's
  no "dead zone"

Bug: 109709720
Change-Id: I828d82e8feb250fd31e382d42aeefcb11d4a07d5
2018-08-15 15:53:24 -07:00
Tony 977690e931 Make arrow feel more connected to popup
- Clip the arrow that is overlapped by the popup, so that it doesn't
  show when that part of the popup is highlighted
- Animate the arrow first instead of last. Now the animation feels
  like one continuous motion as the arrow grows into the popup.

Bug: 111159923
Bug: 111006276
Change-Id: I22fb3037d950d55fe6c8ed4dc5345279874f0a3a
2018-08-15 15:22:28 -07:00
TreeHugger Robot 9e26e26f00 Merge "Prevent the work mode switch thumb from being dragged." into ub-launcher3-master 2018-08-15 17:39:24 +00:00
arangelov 1502c673d0 Prevent the work mode switch thumb from being dragged.
When we normally press the work mode switch, it waits for the profile to
receive the ACTION_MANAGED_PROFILE_AVAILABLE broadcast before the button
UI actually toggles. The user never interacts directly with that switch.
However, dragging the switch thumb used to bypass that logic. This CL
makes sure dragging the switch thumb cannot happen in the first place.

Change-Id: Ib3b4ae7591136c35e6d02783387d752e246cfb5b
Fixes: 111211805
Test: Manual
2018-08-15 16:46:13 +01:00
Vadim Tryshev b6398a1eb8 Sharing protocol constants between Launcher and TAPL
Bug: 110103162
Test: TaplTests
Change-Id: I5b2a2b8576a7a6ea4a156f00858711496d6b5bba
2018-08-14 19:53:43 -07:00
TreeHugger Robot e1c4a90635 Merge "Migrating to android-x" into ub-launcher3-master 2018-08-14 22:53:40 +00:00
TreeHugger Robot d7f266fee1 Merge "Removing static launcher activity dependency from FirstFrameAnimationHelper" into ub-launcher3-master 2018-08-14 22:30:00 +00:00
Sunny Goyal d230307a95 Migrating to android-x
Change-Id: I9a774152d13a541e8496dd84f2469bfed407f86d
2018-08-14 15:22:12 -07:00
TreeHugger Robot a950d40d09 Merge "Started converting Launcher to be gesture-stable" into ub-launcher3-master 2018-08-14 19:18:46 +00:00
Sunny Goyal 5bbe9e16b6 Merge "Changing Condition to an interface to allow using lambdas" into ub-launcher3-master 2018-08-14 19:10:13 +00:00
Lucas Dupin f3c4f77809 Merge "Respect night mode flag on Q and beyond" into ub-launcher3-master 2018-08-14 18:32:34 +00:00
Lucas Dupin eca08a10bd Respect night mode flag on Q and beyond
Test: manual
Change-Id: I01c51d02e787557717c12567adc8276943dbd1bc
Fixes: 110758454
2018-08-14 11:18:42 -07:00
Winson Chung 7debc53f93 Skip logic to find the dominant color when loading recent task icons
- Also move some allocations in ColorExtractor into thread locals to reduce
  allocations

Bug: 78777731
Change-Id: I8819106d476a9af02e864135a2f44b55fe9219cd
2018-08-14 10:30:33 -07:00
Vadim Tryshev dc755e718d Started converting Launcher to be gesture-stable
All tests keep passing.

WorkTabTest.workTabExists was made gesture-stable. There is no need to
use TAPL, as the point is not to check answering to gestures, but to
check presence of tabs, which is better to do using launcher internal
state. (It still fails if run as a part of all tests, presumably,
because after Launcher's start, changes in user configuration are not
recognized, so I've commented the failing part)

Bug: 110103162
Test: Run all tests
Change-Id: Ic30b8e8475d16cee3880332f12311a44ddfa26cb
2018-08-14 10:29:57 -07:00
Sunny Goyal 6edb1b84bf Changing Condition to an interface to allow using lambdas
Change-Id: Ib7ad6a45d2ce556f843cd3a9767001904707dced
2018-08-14 10:27:48 -07:00
Sunny Goyal f0b6db7fa8 Removing static launcher activity dependency from FirstFrameAnimationHelper
Static dependency does not work in the presence of multiple activities and
when the main activity is not Launcher (eg in fallback recents). Instead
creating FirstFrameAnimatorHelper on demand for individual animations.

Change-Id: I17bb69bbaaca92f0db994fb56fd784302c57d543
2018-08-13 16:10:18 -07:00
TreeHugger Robot b6ecb17356 Merge "Removing Launcher activity dependency on various animations" into ub-launcher3-master 2018-08-13 20:03:33 +00:00
Vadim Tryshev 3b5793fdf5 Support for running Overview tests with quickstep on and off
Bug: 110103162
Test: TaplTests suite
Change-Id: Ic479156f2973aeec5cc3d288e1c891b8086d9daa
2018-08-10 17:35:43 -07:00
TreeHugger Robot d6ba50412b Merge "Adding overscroll in recents view" into ub-launcher3-master 2018-08-10 22:53:49 +00:00
Sunny Goyal b7b0135c93 Adding overscroll in recents view
Bug: 109828536
Change-Id: I4fe94bd157c2b65f80604751e6f0f7d5d81d058d
2018-08-10 22:41:20 +00:00
TreeHugger Robot 8f7137b769 Merge "Removing magic constant 0.1f from Overview" into ub-launcher3-master 2018-08-10 22:03:12 +00:00
Vadim Tryshev 309053fff9 Using SWIPE_UP_SETTING_NAME in TAPL
Bug: 110103162
Test: TaplTests suite
Change-Id: Ia62207773a156aca1e226307ccc462c252cc9227
2018-08-10 14:30:59 -07:00
Sunny Goyal 849c6a2b18 Removing Launcher activity dependency on various animations
(This cl reverts change-Id: I455edcd17bda83ab51c2c04fa40e66097a4d6975)

Various animations were marked for cancellation when launcher activity is
destroyed. This this does not work with multiple activities (Launcher,
fallback recents, shortcut confirmation). Also since launcher activity
handles configuration changes, the activity is not destroyed often.

Instead associating a target with various animations which automatically
cancels the animations when that target goes away.

Change-Id: I64cd095a28075561a9e20c9dcdeb9f90c18e1047
2018-08-10 13:31:46 -07:00
TreeHugger Robot 52b28f0926 Merge "Adjust notification dots" into ub-launcher3-master 2018-08-09 22:19:57 +00:00
Vadim Tryshev 846718a79a Removing magic constant 0.1f from Overview
Bug: 110103162
Test: TaplTests suite
Change-Id: If3af510360158a2c2b1c3d13c75321c49ece67e2
2018-08-09 14:21:46 -07:00
TreeHugger Robot 431ec79c99 Merge "Removing code duplication for getting swipe-up setting" into ub-launcher3-master 2018-08-09 19:49:20 +00:00
TreeHugger Robot 86944e9d7e Merge "Importing OverScroller.java from platform" into ub-launcher3-master 2018-08-09 19:30:58 +00:00
Sunny Goyal 92526e27c3 Importing OverScroller.java from platform
Bug: 109828536
Change-Id: Idf33fcbc765a83d72503f1428af0d5414bde3ef3
2018-08-09 12:04:36 -07:00
Winson Chung ad830cd2dc Use provided home content insets
- They should be correct now immediately after rotation

Bug: 112205777
Change-Id: I12c5b791b7115408bb34b5d0ae1e3023ce79c1bf
2018-08-09 18:20:24 +00:00
Tony Wickham 9c80147e70 Merge "Use default animation when launching a TaskView that's off screen" into ub-launcher3-master 2018-08-09 16:37:53 +00:00
Tony Wickham 9756df4564 Use default animation when launching a TaskView that's off screen
Now that pressing back launches the previously running task, it's
possible to get TaskView#launch() when the TaskView is not on the
screen (i.e. user scrolled before pressing back). In this case, we
shouldn't use the launch-from-recents animation, as that animation
assumes the task view is the current page or an adjacent one.

Change-Id: I7bec91c9437954061affdedc8cd9e48820ce7357
2018-08-08 17:55:10 -07:00
Tracy Zhou af82a882d7 Fix PIP window moving during quick scrub.
Bug: 110799409
Test: Manual
Change-Id: Ib7c7d87ddb5aee3149127415bfc31b9cd24dd16b
2018-08-08 15:50:52 -07:00
Sunny Goyal 107dcf8d0a Merge "Fix overlapping FloatingViewType IntDef" into ub-launcher3-master 2018-08-08 19:24:54 +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
TreeHugger Robot 662f52b67f Merge "Unifying multiple definitions of MainThreadInitializedObject" into ub-launcher3-master 2018-08-08 19:07:09 +00:00
TreeHugger Robot 4e41486499 Merge "Removing requirement for no enabled accessibility services" into ub-launcher3-master 2018-08-08 18:57:12 +00:00
Vadim Tryshev 30ac987c56 Removing requirement for no enabled accessibility services
Now Launcher will talk to TAPL even if there are enabled accessibility
services.

This should fix some lab tests that presumably run with some
accessibility services enabled.

Bug: 110103162
Test: will check on lab tests
Change-Id: Ie11896441c2b2b7c16150cd3f2df28a5a5095d88
2018-08-08 11:46:19 -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
Tobias Dubois 7b5834d9b1 Fix overlapping FloatingViewType IntDef
TYPE_DISCOVERY_BOUNCE and TYPE_QUICKSTEP_PREVIEW have the same value.
Make sure each flag has a unique value.

Test: manual
Change-Id: I0fec3f27ffc31bad80d3af7b3baa3631b61b2567
2018-08-08 10:19:52 -07:00
Vadim Tryshev b02bcd4c76 Removing code duplication for getting swipe-up setting
This is between Tapl and Launcher

Bug: 110103162
Test: TaplTests suite
Change-Id: I5b458438834204ca257f45c707577b4d2793fb4e
2018-08-07 18:01:12 -07:00
Rajeev Kumar 147320e64e Use equals for string comparison in ItemClickHandler.
Bug: 112325801
Test: Manual test
Change-Id: I1b57dadac392d5c7f5a7fb367ddbaf79beb7faed
2018-08-07 15:22:14 -07:00
Sunny Goyal 7244d45998 Unifying multiple definitions of MainThreadInitializedObject
Change-Id: I0e5addfe0353f971c76ffba8a0e2fbbce0f7e58e
2018-08-07 09:26:34 -07:00
TreeHugger Robot 59d504e89b Merge "Using proper checks for hardware bitmap usage" into ub-launcher3-master 2018-08-07 16:11:10 +00:00
TreeHugger Robot 3b7402c2b8 Merge "Increasing wait time." into ub-launcher3-master 2018-08-07 00:27:05 +00:00
Sunny Goyal 719fcb1561 Using proper checks for hardware bitmap usage
Change-Id: Ic8efef8ac54ee4c7887860c404060da3c00f4024
2018-08-06 17:00:55 -07:00