Commit Graph

3098 Commits

Author SHA1 Message Date
Zak Cohen dc24231e4f TAPL tests - make all apps in overview checks less fragile.
Tests that check for all apps in overview mode were only checking for
actions being enabled. This isn't sufficient logic, two button mode also
uses all apps.

Centralize the check for all apps.

Test: local tapl tests
Change-Id: If1bf98019e6f1aea8f7967883aba6780743e9d6b
2020-02-28 11:59:33 -08:00
Becky Qiu 7ff297a81f Revert "[Overview Actions] Disable swiping for TaskView if it's in select mode."
This reverts commit 0499fb2060.

Reason for revert: This might break the post submit test. See b/150401176

Change-Id: Iafc420fff72de8e83ce5e325fc1e5b1a1efe7350
2020-02-28 01:52:58 +00:00
Zak Cohen eecb258cc7 Merge changes from topic "enable" into ub-launcher3-master
* changes:
  Overview Actions - Enable by default.
  TAPL test update - don't run all apps in overview tests with actions.
2020-02-27 19:48:51 +00:00
TreeHugger Robot 3ba6800552 Merge "Using StrictMode to detect activity leaks" into ub-launcher3-master 2020-02-27 19:19:14 +00:00
Becky Qiu b5565fb62f Merge "[Overview Actions] Disable swiping for TaskView if it's in select mode." into ub-launcher3-master 2020-02-27 18:48:09 +00:00
Zak Cohen de9823243a Merge "Make RectFSpringAnim resilient to negative height starting rect." into ub-launcher3-master 2020-02-26 21:25:36 +00:00
Zak Cohen f2a15f1be5 Make RectFSpringAnim resilient to negative height starting rect.
Test: ran tapl tests, failed before, passed after
Change-Id: I10b82dd348b5c12550e60b145c76dad542aa56e8
2020-02-26 10:53:53 -08:00
TreeHugger Robot 5991eb8337 Merge changes from topic "new-task-snapshots-ub-launcher3-master" into ub-launcher3-master
* changes:
  Toggle loading state based on config_lowResTaskSnapshotScale
  Add config to enable snapshot preloading
2020-02-26 17:42:40 +00:00
Becky Qiu 0499fb2060 [Overview Actions] Disable swiping for TaskView if it's in select mode.
This including swiping up to dismiss, down to launch app, left and right to switch apps.

Test: local
Bug: 139828243
Change-Id: Ib588c8725fb765097d03a5def719abdffd603708
2020-02-25 17:16:48 -08:00
Evan Rosky e7e91fd60e Connect split-screen things to systemui divider
Since divider stuff lives in sysui instead of framework

Bug: 133381284
Test: Manual, open 2 apps in split and drag-up to show
      recents.
Change-Id: If6740b7ee4829bf4cac6e829e81943f16a41f977
(cherry picked from commit 3ef159becd)
2020-02-25 23:42:42 +00:00
Zak Cohen fe935dfbc1 TAPL test update - don't run all apps in overview tests with actions.
Overview actions removes the all apps from overview. Don't run the tests
that depend on these.
Ultimately need to add more tests for the actions.

Test: tapl local
Change-Id: I2471d10af7bc03a40a94f99aa16354b85bdb3ad7
2020-02-25 15:09:12 -08:00
vadimt 1779a38290 Using StrictMode to detect activity leaks
Change-Id: I615f641897d57be0cd31be944796c6931ef9ab00
2020-02-25 14:46:27 -08:00
TreeHugger Robot d71c3b185d Merge "Setting interpolator beforehand, instead of overriding it after the pending animaiton is created" into ub-launcher3-master 2020-02-25 18:23:19 +00:00
vadimt b79614cc93 Performing a check for a crashed Launcher process for each UI test 2020-02-25 02:28:32 +00:00
Sunny Goyal 93c4de7413 Setting interpolator beforehand, instead of overriding it after the pending
animaiton is created

Change-Id: I7caec2eeb86084591fa627518d064b7ebb895d65
2020-02-24 16:45:11 -08:00
Sunny Goyal d2c56525bb Merge "Using LeastSquaresVelocityTrackerStrategy for calculating velocity when detecting motion pause events. This is the same logic used by the platform implementation VelocityTracker" into ub-launcher3-master 2020-02-24 18:30:13 +00:00
Sreyas Rangaraju bc50563915 Merge "OverviewActions: Creating parent view to house RecentsView and Overview Actions." into ub-launcher3-master 2020-02-22 01:11:47 +00:00
Tony Wickham 3310b76a27 Merge "Remove mSourceWindowClipInsetsForLiveTile" into ub-launcher3-master 2020-02-22 00:34:09 +00:00
Sreyas a241df66df OverviewActions: Creating parent view to house RecentsView and Overview Actions.
Creating RecentsViewHolder to be contain LauncherRecentsView in OverviewPanel so Overview Actions View can be created only once.

Change-Id: I111f88903d2ff80275cc2e07b761577260073c17
2020-02-21 16:14:51 -08:00
Peter Kalauskas 5bb63c916e Toggle loading state based on config_lowResTaskSnapshotScale
Change high res loading state implementation to toggle on/off based on
config_lowResTaskSnapshotScale!=0 instead of ro.config.low_ram=true

Test: TaskSnapshotCacheTest
Test: TaskSnapshotControllerTest
Test: TaskSnapshotPersisterLoaderTest
Test: TaskSnapshotSurfaceTest
Bug: 148099851
Change-Id: I316e553a8a13fe38f1224c38f7aa717a0f628f57
2020-02-21 23:36:58 +00:00
Peter Kalauskas 03c8f296cd Add config to enable snapshot preloading
Enable preloading if config_enableTaskSnapshotPreloading instead of
assuming it should be off for all low ram devices. This allows it to be
configured via an overlay.

Test: TaskSnapshotCacheTest
Test: TaskSnapshotControllerTest
Test: TaskSnapshotPersisterLoaderTest
Test: TaskSnapshotSurfaceTest
Bug: 148099851
Change-Id: I9e3320dcff5b710e110cc7199c41c5a004991592
2020-02-21 23:35:37 +00:00
Sunny Goyal a173193afa Using LeastSquaresVelocityTrackerStrategy for calculating velocity
when detecting motion pause events. This is the same logic used by
the platform implementation VelocityTracker

Bug: 139750033
Change-Id: I87aabd46e58a5caa1395be3a63fd38d0ee75e355
2020-02-21 15:28:06 -08:00
Tony Wickham f1030cf564 Merge changes Ie48f4b66,Ia48f4453 into ub-launcher3-master
* changes:
  Always update clip rect before applying surface params
  Clean up AppWindowAnimationHelper and TransformParams
2020-02-20 22:53:10 +00:00
Tony Wickham a754374c30 Remove mSourceWindowClipInsetsForLiveTile
It seems that the only time it is used, it is the same as
mSourceWindowClipInsets anyway.

Bug: 149870691
Change-Id: I3b1a5a47a0d49cdd6eb8a3271ca24da6c17109cb
2020-02-20 14:08:07 -08:00
Tony Wickham d1d342b1c7 Always update clip rect before applying surface params
Previously, we were only updating the clip rect when params.currentRect
== null, meaning the clip would be stale once the caller started
providing its own rect (e.g. when swiping to home).

Also fix some visual jumps when swiping home, all caused by running the
transform progress from 0 to 1 instead of starting at whatever the
progress was before ending the gesture, e.g.:
- When swiping to home without animating into an icon, the corner radius
  was set back to the window corner radius.
- Before this change, the clip didn't update throughout the animation,
  making the window slightly bigger than the floating icon view; after
  this change, the clip jumped to show the insets again before clipping
  back down during the home animation.

Bug: 149870691
Change-Id: Ie48f4b665a5bf3cbef76bdf7f043febe99fb84a0
2020-02-20 14:07:09 -08:00
Tony Wickham badab61ace Clean up AppWindowAnimationHelper and TransformParams
AppWindowAnimationHelper and TransformParams were being very tightly
intertwined, to the point that you really had to understand subtle
nuances of both in order to get a desired behavior. This makes making
changes really difficult, because there are lots of "traps" to know
about and navigate. To help alleviate this burden, cleaned up some of
these traps and give AWAH and TP distinct roles:
- A caller who needs to animate an app window needs both AWAH and TP.
  TP defines specific parameters of how the app window should be
  controlled, and AWAH simply reads from TP in order to provide the
  desired behavior.
- Only the caller should write to TP; AWAH should no longer change
  anything in a TP that is passed to it. For instance, instead of
  repurposing TP.currentRect, AWAH now has its own mCurrentRect to
  update based on passed parameters.
- TP is a very basic class that just holds various values that callers
  can set one at a time. The order should not matter (setting one value
  will never set another one), and defaults make sense.
- Commented the setter methods in TP so developers shouldn't have to
  follow the code to see how they are used.

Bug: 149870691
Change-Id: Ia48f4453c29549271a3fc6538128a1a77439e015
2020-02-20 14:06:58 -08:00
Winson Chung d446f98457 Merge "Adding new tracing call from SysUI" into ub-launcher3-master 2020-02-20 06:37:46 +00:00
Winson Chung f3b7246bf2 Adding new tracing call from SysUI
Bug: 144854916
Test: This change is only to ensure the changes build
Change-Id: I62b247b45454861328b6062ed571c854a374aa34
2020-02-20 04:52:07 +00:00
TreeHugger Robot 6e82910a45 Merge "Give current TaskView accessibility focus" into ub-launcher3-master 2020-02-20 01:16:42 +00:00
Andy Wickham 9fb7d28b63 Removes exported="true" for RecentsActivity.
Change-Id: Iea9ad04886c3221cefa709c14b6501b2af83af06
2020-02-20 00:07:06 +00:00
Andy Wickham 63b7f36338 Renames BackGestureTutorialActivity to GestureSandboxActivity.
Bug: 148542211
Change-Id: Iaac537380b02f1c52f967748c30fe49ac36bb91e
2020-02-19 21:12:11 +00:00
Andy Wickham 1e33123a0b Merge "Allows multiple gesture blocking activities to be specified." into ub-launcher3-master 2020-02-19 21:11:20 +00:00
TreeHugger Robot 6eebaab5d6 Merge "Updating Pause detection to use motion events directly" into ub-launcher3-master 2020-02-19 20:10:59 +00:00
Samuel Fufa aeb185e744 Merge "Clean up work profile" into ub-launcher3-master 2020-02-19 19:53:38 +00:00
Samuel Fufa ccebfbe273 Clean up work profile
This includes
- Dismiss work edu on launcher state change
- Remove work tab flash on first setup
- Make edu bottom sheet adopt theme color
- Fix Work toggle bottom inset


Bug: 149200572
Bug: 149197172
Bug: 149199058
Bug: 149215103
Bug: 149198955
Bug: 145595763
Bug:149481723

Test: Manual
Change-Id: I39a30782b80fd3a66bede55754fa30a940d2caee
2020-02-19 19:33:09 +00:00
Sunny Goyal c3bd4d0e75 Updating Pause detection to use motion events directly
Bug: 139750033
Change-Id: Ib261b203fec941f3c5303eafc1d435efdf3dbcaf
2020-02-19 11:32:20 -08:00
Andy Wickham 3b0c1f3aca Allows multiple gesture blocking activities to be specified.
Bug: 148542211
Change-Id: Ie299359eb2df60f5f08d156dc6882fa133fab27c
2020-02-19 18:12:41 +00:00
Andy Wickham 2d0f79b7bb Merge "Disables Back gesture while sandbox is running." into ub-launcher3-master 2020-02-19 17:12:26 +00:00
Andy Wickham 017c8d52d5 Disables Back gesture while sandbox is running.
We'll want to detect this gesture ourselves to distinguish
between left and right edge and update the UI accordingly.

Note: This exclusion only works if the sandbox is launched
into the same task as Launcher (i.e. from Launcher itself).
I haven't found a way to get this to happen over adb.

Test: Launched BackGestureTutorialActivity from Launcher
and verified Back gesture animations did not play and the
onBackPressed callback was not called. Verified these did
still work in other apps.

Bug: 148542211
Change-Id: Iebc3428738edbf8ebfcff157f5952b787eb46bac
2020-02-19 00:27:40 +00:00
TreeHugger Robot 3fc9db9dae Merge "Rename flag IS_DOGFOOD to IS_STUDIO." into ub-launcher3-master 2020-02-15 01:32:33 +00:00
Zak Cohen 3eeb41de9a Rename flag IS_DOGFOOD to IS_STUDIO.
The flag is only set when building from Android Studio... and is never
used for dogfood.

Test: local
Change-Id: I898d585f4558c2437f0152ef102bea59c351f80b
2020-02-14 14:19:59 -08:00
Patrick Baumann ca16911b9f Adds QUERY_ALL_PACKAGES to launcher manfiests
This change adds the QUERY_ALL_PACKAGES permission to launcher3 so that
it can see all packages on device with the app enumeration featur
enabled in R.

Bug: 149557568
Test: Manual; use launcher3 and ensure it displays all apps
Change-Id: I15e6e86e5476900a6b9c3a6da1cbb11fcbf97e6c
2020-02-14 18:51:18 +00:00
Winson Chung a7c931dd49 Merge changes I29dab94f,Ie13db509 into ub-launcher3-master
* changes:
  Fix issue with out of order callbacks
  Skip setting end target if the recents animation was canceled or ended
2020-02-14 01:15:04 +00:00
vadimt 3a49aa090f Enable testQuickSwitchFromApp after fixing what caused it to fail
Bug: 143285809
Change-Id: Ic7895ab7d4ef3ab207fc77184eb53f0f6d8e9b23
2020-02-13 16:14:15 -08:00
Winson Chung b53573d651 Fix issue with out of order callbacks
- If any call to finish the recents animation comes in before
  onRecentsAnimationStarted, we'll clear the callbacks but the listener
  registered in startRecentsAnimation will persist.  Since the call
  to actually finish the animation with the system is posted on the
  main thread, if the animation started callback returns in that time,
  the controller will be set (via the listener) but the callbacks will
  be unset.  Instead, we can clear all the listeners from the previous
  callbacks when cleaning up the animation.

Bug: 145758818
Change-Id: I29dab94f5fb25f762a823d59ef318a361282b595
2020-02-13 16:07:44 -08:00
Winson Chung 8cba1bc488 Skip setting end target if the recents animation was canceled or ended
Bug: 147249069
Change-Id: Ie13db509466776873df383eef599c11c5cd32ab2
2020-02-13 15:37:37 -08:00
Zak Cohen 88ea05ad39 Overview actions - bring UI closer to redlines.
Test: local
Bug: 139828243
Change-Id: Ia1cb0fc1c111a6a22fa4b4a98b43cd9ac1869a2c
2020-02-13 14:29:24 -08:00
Tony Wickham f6dde3966a Add some more data to TouchInteractionService dumps
- Dump OverviewComponentObserver (to check if we're using 3P launcher)
- Dump current enabled and disabled plugins
- Dump all debug FeatureFlags instead of a few handpicked ones

Bug: 146174627
Change-Id: Ic8df899433b0e42d0e05eb1c80c87f62d3b936b6
2020-02-13 11:40:25 -08:00
Vinit Nayak 782b7ca941 Merge "Use activity rotation to compute delta" into ub-launcher3-master 2020-02-12 23:54:37 +00:00
TreeHugger Robot 6351eb4737 Merge "Reset launcher on shortcutconfig activity minimize" into ub-launcher3-master 2020-02-12 23:43:10 +00:00