Commit Graph

3742 Commits

Author SHA1 Message Date
Samuel Fufa 4dd6ab3ca1 Deference mAppPredictor on destroy
+ Also remove PredictionModel.mCachedComponentKeys

Bug: 156747920
Bug: 156041043
Test: Manual

Change-Id: I56dac1c6ac0a1bb93363342006232fc1ba42a3b4
2020-05-15 11:33:27 -07:00
Vinit Nayak 9c62e18660 Remove debug logs, root cause found.
Bug: 146964271
Change-Id: I38ed3b4b1a90fa1ff9a3aa4bb5547300ddd92358
2020-05-15 10:04:51 -07:00
TreeHugger Robot e241f6c243 Merge "Prevent all apps prediction update while visible" into ub-launcher3-rvc-dev 2020-05-15 10:31:56 +00:00
TreeHugger Robot 63cbfc6118 Merge "Switch to new protocol for hybrid hotseat" into ub-launcher3-rvc-dev 2020-05-15 08:25:50 +00:00
Samuel Fufa 6793dae692 Prevent all apps prediction update while visible
Test: Manual
Bug: 156418702
Change-Id: Iaa5468d7c600e6568ac1e35108c586752d6658b6
2020-05-14 23:13:19 -07:00
Samuel Fufa d12d6ab98a Switch to new protocol for hybrid hotseat
- create predictor from items in bgModel instead of scanning views
- Launcher no longer checks for duplicates before sending pin/unpin events
- sending cached items from last prediction to reduce UI shuffle
- Switch to using UserCache to persist and read ComponentKey

Bug: 148814143
Bug: 156413231
Bug: 156200931
Change-Id: Ide6330bed8eb7f0c6fbec1d1ac21e7f67a9b2be2
2020-05-14 17:27:34 -07:00
Vinit Nayak c40352ef8c Override Rect#contains() to include bottom right
In landscape, the lowest coordinate touch registered
is the actual lowest pixel possible by the screen.
For portrait/seascape the lowest coordinate
is (lowest pixel possible - 1). The difference of the
one pixel makes Rect#contains() return false since
only top left Rect points are inclusive and bottom
right points are exclusive.

Fixes: 156333291
Test: Always able to smoothly go to overview from
landscape.

Change-Id: I6beddad99ae076a167d2a5f5e5acc6e466bff544
2020-05-14 17:26:15 -07:00
James O'Leary 4cb77a60aa Merge "Compose gesture integrated fully into Launcher" into ub-launcher3-rvc-dev 2020-05-14 20:20:13 +00:00
Adam Cohen 1682d0d71b Merge "Don't require the center task id to adjust status bar when swiping up" into ub-launcher3-rvc-dev 2020-05-14 20:15:51 +00:00
Adam Cohen 18aa37ca68 Don't require the center task id to adjust status bar when swiping up
b/155029378

Change-Id: I3cb65e82ab192b63d54291aad9e2395fa8dedaef
2020-05-14 11:31:28 -07:00
James O'Leary 74a2746b35 Compose gesture integrated fully into Launcher
- Support dismissing Compose via the reverse gesture from the appear
gesture
- Use Tony Wickham's ag/10204761 with some glue code to enable the
app below Compose panning in the same direction as the gesture as
Compose peeks in
- Add feature flag to use Compose hosted in a window (permits underlying
app panning)
- Use InterpolatingVelocityTracker to fix OtherActivityInputConsumer
processing swipes in the wrong direction ~20% of the time due to a bug
in VelocityTracker (see go/quirky-bubbles)

Change-Id: I3adbaee1763f21557fb628b60d03b0a03e7079ab
2020-05-14 14:18:19 -04:00
Winson Chung 034ce6fd94 Update shelf offset earlier when in gesture nav
- Provide a hint to Launcher to indicate it will be resumed when
  swiping home, which allows us to notify sysui before any potential
  pip invocation, reducing the likelyhood of two conflicting animations
  when entering pip

Bug: 156637223
Change-Id: Iae773e1aac88bbea6f74e1d1332417b448126471
2020-05-14 10:55:14 -07:00
Winson Chung 1801d19bcd Remove LockscreenRecentsActivity
- This activity would create another task (no longer in the same
  stack since we don't have activity type stacks) which was causing
  the camera to be occluded sometimes, which then cancels the recents
  animation
- Tweaking the animation slightly to match the movement of the closing
  the activity back to the lockscreen

Bug: 156514461
Test: Launch camera on the lockscreen and swipe up to dismiss (repeatedly)
Change-Id: I8aaac22767288d7fbf183683276c50acaaf831d2
2020-05-14 10:51:44 -07:00
Sunny Goyal d9c0349c1a Merging WindowSizeStrategy with BaseActivityInterface
Also converting BaseActivityInterface to an abstract class instead of interface
so that it can hold member variables

Change-Id: I04cab934137eb1d6f470c6a7618c50a2ed2c71c1
2020-05-14 01:22:25 -07:00
thiruram f95f152971 Add LAUNCHER_FOLDER_LABEL_CHANGED events for folder label updates.
Sample Logs for all update combinations: https://docs.google.com/document/d/1CBP2yTcXdFhPdNG5ZmWFKSgd8mDbMevY-akVlUXPLDo/edit#bookmark=id.7y1p8n2dz8ge

Bug: 155410872
Bug: 152978018
Change-Id: I296b124b16aa07878f2cf7b74ab91f13b8e6cfbf
2020-05-13 17:36:10 -07:00
thiruram b9080c2a15 Add support to log LauncherEvent without ItemInfo.
Change-Id: I145a9500b0442c2b5d9f7f691460465b2bb13a07
2020-05-13 22:58:23 +00:00
Vinit Nayak bdd6522661 Merge "Update recents child views RTL handling" into ub-launcher3-rvc-dev 2020-05-13 21:41:09 +00:00
Sunny Goyal f190fd2d4e Build fix. Unifying task size calculation code.
Change-Id: Iaed3a28a9e74c39da8d01aa42b30c96bdb69a661
2020-05-13 14:06:07 -07:00
TreeHugger Robot 650da4bbd1 Merge "Keep Predicted icon same size when dragging" into ub-launcher3-rvc-dev 2020-05-13 19:18:28 +00:00
TreeHugger Robot e0fef877e4 Merge "Changing RecentsView layout based on the split screen task size" into ub-launcher3-rvc-dev 2020-05-13 18:35:05 +00:00
TreeHugger Robot d893a478a3 Merge "Adds Settings button back to Back gesture tutorial." into ub-launcher3-rvc-dev 2020-05-13 18:34:37 +00:00
Becky Qiu dc48fc4f84 [Overview Actions] Adjust the select mode taskview UI.
It will have a 30dp horizontal paddings and vertically in the middle of the screen.

Test: local
Bug: 155444014

Change-Id: I4f3d627008b2c114cc4921bf683919c6044926e4
2020-05-13 18:23:28 +00: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
Andy Wickham ee1203e436 Adds Settings button back to Back gesture tutorial.
Uses a simpler Intent which actually works :)

Fixes: 149348244
Bug: 148542211
Change-Id: I5e28c63d1eec93b4642e398c7532e7ec4809d6e2
2020-05-13 10:48:38 -07:00
Andy Wickham 65381300f2 Minor cleanup in RecentTasksList.java
Change-Id: I8a496300c936e4d3f2bcd6b0c6c482e5bbb0452d
2020-05-13 09:34:49 -07:00
Vinit Nayak 08a8327b1d Update recents child views RTL handling
Fixes: 154928106
Test: AppIcon and clear all button
shows up as expected in LTR and RTL
configuration.

Change-Id: Idcf367b8aff53002e63a03b64b96e3602127707e
2020-05-12 22:24:26 -07:00
TreeHugger Robot 75dcd82a67 Merge "Don't handle task appeared during second quick switch transition" into ub-launcher3-rvc-dev 2020-05-13 03:35:23 +00:00
TreeHugger Robot 7c604edf92 Merge "[Overview Actions] Put the taskview in the middle of the screen." into ub-launcher3-rvc-dev 2020-05-12 23:01:25 +00:00
Tony Wickham f6be443eb4 Don't handle task appeared during second quick switch transition
Instead of using shared gesture state, use the swipe handler's
internal state. This ensures that only the handler that started
the new task can finish the controller for it (i.e. starting a
new gesture, which creates a new handler, will ignore the
onTaskAppeared() that the previous handler initiated).

Test: Quick switch to delayed task A, then quick switch to B right
before onTaskAppeared() such that we get onTaskAppeared() during
the transition (easier to repro if you increase animation durations
with springs off). Before this change, A appeared on top.

Bug: 156412706
Change-Id: Ic7d3cd43399005095b2e7c7382218edffefdc27b
2020-05-12 17:46:02 -05:00
Becky Qiu 073cbca370 [Overview Actions] Put the taskview in the middle of the screen.
Using horizontal padding 48dp to adjust the scale of the taskview and put it in the middle of the vertical space.

Test: local
Bug: 155444014
Change-Id: Iee6096baf18ae1106c24c83b4675abd4d3ff4d4f
2020-05-12 15:00:54 -07:00
Sunny Goyal b78ea4b4fc Changing RecentsView layout based on the split screen task size
Bug: 155816922
Change-Id: I33f69d72f8a27e3621d029c6ee4045c3664f3ac9
2020-05-12 14:04:19 -07:00
Sunny Goyal 3f948e3f42 Adding state manager to fallback recents activity
Bug: 156398988
Change-Id: Id0a106ef888ade5223940ac8243108c39b4d6b98
2020-05-12 13:31:48 -07:00
TreeHugger Robot 7dcd4d6ed6 Merge "Simplifying animation creating logic for app-to-overview" into ub-launcher3-rvc-dev 2020-05-12 18:42:22 +00:00
TreeHugger Robot 2830c99bee Merge "Even more additional logging for pause non-detection" into ub-launcher3-rvc-dev 2020-05-12 17:35:42 +00:00
vadimt 60bc43d0cc Even more additional logging for pause non-detection
Bug: 156044202
Change-Id: I7c1a8a9ef4149bd64597908c0b6797cfe33fd4b6
2020-05-12 09:51:24 -07:00
Sunny Goyal 4888790bde Simplifying animation creating logic for app-to-overview
Removing optional 'shouldAnimate' flag. This was false only in 3-button mode but
the code was also handling animation, leading to inconsistent expectations. Instead
always assuming animation and finishing the animation promptly.

Change-Id: Ic56476dc5ea64c9a7d7e9744f3e33cd61dfde9e8
2020-05-12 16:37:27 +00:00
TreeHugger Robot b8759f9b26 Merge "Fixing pullback factor not initialized after launcher process death" into ub-launcher3-rvc-dev 2020-05-12 03:06:29 +00:00
TreeHugger Robot 3d3c41a3a6 Merge "Make educational half-sheet black in dark mode" into ub-launcher3-rvc-dev 2020-05-12 01:07:21 +00:00
TreeHugger Robot eb0136b7c4 Merge "Abstracting out state handler logic into base classes so that it can also be used in different activity" into ub-launcher3-rvc-dev 2020-05-12 00:29:52 +00:00
Sunny Goyal 35e7d38681 Abstracting out state handler logic into base classes so that it can
also be used in different activity

Change-Id: Ic5e60b21e1429c71f1cd4e7041e70bf4fc9761b7
2020-05-11 16:38:26 -07:00
Tony Wickham a57000c33d Restart running task if another task was started but not appeared
If we just finish the controller to resume the running task like
we normally would, the delayed task will appear on top when it's
ready. Instead, we need to start the original task in this case.

- Move mLastStartedTaskId to GestureState, shared between swipe
  handlers when continuing the gesture.
- Update logic to change LAST_TASK to NEW_TASK if a task was
  started (but not appeared) during the same gesture; likewise,
  only change NEW_TASK to LAST_TASK if no task was started.
- Finish the controller when successfully starting the task
  that already appeared, since we won't get onTaskAppeared().

Bug: 156132424
Change-Id: I1e9af297840745ab3d5e90214425f10a2616d90a
2020-05-11 18:26:06 -05:00
TreeHugger Robot ed31f24dbf Merge "Fixing current task not overshooting on swipe-up in overview" into ub-launcher3-rvc-dev 2020-05-11 22:55:45 +00:00
Sunny Goyal 84376f305b Fixing current task not overshooting on swipe-up in overview
> also fixing flicker during swipe-up when scroll is applied before recents
has been initialized

Bug: 154761552
Change-Id: I45c2b6801b8b87097c2816e26a234bab41b72ed4
2020-05-11 14:39:32 -07:00
TreeHugger Robot 6459397e3d Merge "Temporarily removes Settings button from Back tutorial." into ub-launcher3-rvc-dev 2020-05-11 21:10:46 +00:00
Sunny Goyal ef44cf8f45 Fixing pullback factor not initialized after launcher process death
Instead of storing it on first swipe-up, computing it when required

Change-Id: I4b37002a016328e3b2d1c8535198ec8a6b56faf3
2020-05-11 13:28:53 -07:00
Andy Wickham 168aaf9682 Temporarily removes Settings button from Back tutorial.
Currently it just crashes, so it shouldn't be there. If
and when we decide to add it back, we will need to get
our package whitelisted to send the necessary Intent.

Bug: 149348244
Change-Id: I5ab292d04ebc5679e34e5a92141df3d86ef6e551
2020-05-11 13:24:06 -07:00
TreeHugger Robot ae5afa74cd Merge "Using TaskViewSimulator for both Launcher and fallback recents" into ub-launcher3-rvc-dev 2020-05-11 19:32:26 +00:00
Vinit Nayak 115e70ddcf Merge "Infer launcher rotation when initializing RecentsOrientedState" into ub-launcher3-rvc-dev 2020-05-11 19:07:54 +00:00
TreeHugger Robot 17d3fe81c4 Merge "[Overview Actions] Change actions view UI based on different nav modes." into ub-launcher3-rvc-dev 2020-05-11 18:52:13 +00:00
Zak Cohen 02a25be89d Merge "Overview Actions - shows a message if action is blocked by policy." into ub-launcher3-rvc-dev 2020-05-11 18:43:55 +00:00
Vinit Nayak b9522d334a Infer launcher rotation when initializing RecentsOrientedState
fixes: 154776599
Change-Id: I9b95f7f96836a974be0fd1236547efb4b405fda5
2020-05-11 11:23:49 -07:00
Hyunyoung Song e745f50128 Merge "Hookup statsd for workspace layout logging" into ub-launcher3-rvc-dev 2020-05-11 18:18:57 +00:00
Becky Qiu 7d12134240 [Overview Actions] Change actions view UI based on different nav modes.
1. Change the overview actions container to 66dp height.
2. For 3 button mode, container will have 8dp bottom margin.
3. For gesture mode, container will have 16dp bottom margin.
4. Action buttons and close button will always be in the center vertically.

Spec: https://docs.google.com/presentation/d/1gXWNdCRXvXuEhgDmE0TX2KYqCxIQBXVtWKdl4pKrno8/edit#slide=id.g840c32b190_3_6

Demo:
- 3 button: https://screenshot.googleplex.com/2Y3uMaJMi9E
- gesture: https://screenshot.googleplex.com/XzaKHpp5ke9
Test: tested for both modes and when switch between.
Bug: 155444592

Change-Id: If66d369df0218b7ee2abab8a3f345488bf223b16
2020-05-11 10:46:21 -07:00
vadimt 7b7e62e5eb Additional logging for pause non-detection
Bug: 156044202
Change-Id: I6d7dcdcf73722e66fcbd180c9e309c518766b9b8
2020-05-11 10:10:53 -07:00
Bill Yi 91e0db3905 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I2f2cda2793113a012d86b0d18cccf3e6fabb7e69
2020-05-10 20:53:08 +00:00
Hyunyoung Song 7f7894e3b7 Hookup statsd for workspace layout logging
Bug: 144953948

Change-Id: I81bd42929b2d65a63c610e95e5e01179a3971493
2020-05-10 01:37:42 -07:00
Zak Cohen 4ebd859bc4 Overview Actions - shows a message if action is blocked by policy.
Device policy or app secure surface policy mean that snapshot based
actions shouldn't work.
This is encoded in whether the snapshot is "real", the fake snapshot is
generated when policy doesn't allow captures.

Test: tested with Test DPC fake device policy app
Change-Id: Ib34e5a90ab58fb401d4516c531866d1c13569256
2020-05-08 17:16:15 -07:00
vadimt ad87034d1f More logging for pause non-detection
Bug: 156044202
Change-Id: I1c995b6c28f7108b96ff74aa8c3c71f70f8b3fb6
2020-05-08 15:09:37 -07:00
Sunny Goyal 86a2f91101 Using TaskViewSimulator for both Launcher and fallback recents
Fixing fling to home animation in landscape and multi-window orientation

Bug: 155896573
Bug: 155816922
Change-Id: I5fdff8694eced415978345b026858f5167c2a198
2020-05-08 14:48:42 -07:00
Sunny Goyal 9d85f52386 Merge "Fixing swipe-up form app in landspace, rotates the surface" into ub-launcher3-rvc-dev 2020-05-08 20:11:56 +00:00
TreeHugger Robot 4d1203efab Merge "Fixing Fallback recents crashes when going to modal state" into ub-launcher3-rvc-dev 2020-05-08 19:46:35 +00:00
TreeHugger Robot 16fb9fac22 Merge "Adding tracing for switching to overview instead of all apps" into ub-launcher3-rvc-dev 2020-05-08 18:39:39 +00:00
vadimt 2794f563a0 Adding tracing for switching to overview instead of all apps
Bug: 156095088
Change-Id: I1257617192e913d06edd0879396957b1e40524b7
2020-05-08 10:39:29 -07:00
Tony Wickham a8a377cd49 Merge "Cleanup quick switch logic" into ub-launcher3-rvc-dev 2020-05-08 17:22:19 +00:00
Sunny Goyal 302ecabf2c Fixing Fallback recents crashes when going to modal state
> Adding robo tests to prevent such regressions
Bug: 155570625

Change-Id: I5cfbfc454849116f881322e8785dfdbad6f24d08
2020-05-08 10:12:17 -07:00
TreeHugger Robot 9e77f25d52 Merge "Adding tracing for non-detection of Pause" into ub-launcher3-rvc-dev 2020-05-08 16:08:32 +00:00
Sunny Goyal 7a63fb2da6 Fixing swipe-up form app in landspace, rotates the surface
PreviewPositionHelper was getting the Launcher rotation from context,
instead of RecentsOrientationState

Bug: 156042694
Change-Id: I645eccfcb519c59fe2f78ecb1a77d8a315bc36c9
2020-05-08 08:48:36 -07:00
Jonathan Miranda 759995980a Merge "Add logs to debug playtime crash and band aid fix for release builds." into ub-launcher3-rvc-dev 2020-05-08 03:38:50 +00:00
vadimt 091794671d Adding tracing for non-detection of Pause
Bug: 156044202
Change-Id: I16f196db6266a0c3a84b59b7cdeb29863a37ff0f
2020-05-07 20:06:58 -07:00
TreeHugger Robot 0e0bcc7631 Merge "Moving TransformParams to an separate class." into ub-launcher3-rvc-dev 2020-05-08 00:09:05 +00:00
TreeHugger Robot e4d1a71413 Merge "Disabling OverviewActionsView buttons while scrolling or clear all shown." into ub-launcher3-rvc-dev 2020-05-08 00:02:54 +00:00
Sunny Goyal f29376bb29 Moving TransformParams to an separate class.
Moving some hepler methods to TransformParams so that some configurations
can be shared easily.

Change-Id: I07fff1e27e4615b56491aebf0ca2a911686ad979
2020-05-07 15:24:38 -07:00
Samuel Fufa 1012fd2326 Make educational half-sheet black in dark mode
Screenshot: https://screenshot.googleplex.com/tjk37GfrRhO

Bug: 152361557
Test: Manual
Change-Id: I30fffd0af8f4768ac20e6d13899d0e0182b0dec8
2020-05-07 15:18:05 -07:00
Tony Wickham cc9fe80323 Cleanup quick switch logic
- Remove mFinishingRecentsAnimationTaskId and related logic;
  track mLastStartedTaskId and mLastAppearedTaskTarget instead.
- Don't finish controller if new gesture is in progress, only
  finish it when the last started task appears (and invalidate
  the handler at that point).
- Remove onTaskAppeared() from GestureState, handle it directly
  in BaseSwipeHandler.
- When the end target animation finishes, possibly change the
  end target from LAST_TASK to NEW_TASK or vice versa,
  depending on the last appeared task.

Bug: 154814771
Bug: 154727089
Bug: 155609695
Bug: 154812078
Change-Id: I38669515d064a131361359087f502783d875ddde
2020-05-07 15:39:57 -05:00
Sunny Goyal f67db3531b Moving animation configuration and definition out of state definition
This removes cross dependency between StateManager and State object so
that it can be easily generalized

Change-Id: I62851fc4b653655cb40f37023db9651055ec7c9c
2020-05-07 01:33:57 -07:00
James O'Leary ac327df55c Merge "Revert "Compose gesture integrated fully into Launcher"" into ub-launcher3-rvc-dev 2020-05-07 01:14:44 +00:00
TreeHugger Robot d13dd3bc44 Merge "Skip setting the controller if the animation is already finished" into ub-launcher3-rvc-dev 2020-05-07 00:14:15 +00:00
James O'Leary 2610bfde05 Revert "Compose gesture integrated fully into Launcher"
Revert "Compose gesture integrated fully into Nexus Launcher"

Revert submission 11035205-compose_gesture_fully_integrated_launcher

Reason for revert: Broke Launcher Android Studio build, quick switch, and home gesture doesn't work if Compose is open.
Reverted Changes:
I2d97b22d5:OverscrollPlugin refactored to use onTouchEvent
Ia19a55f65:Compose gesture integrated fully into Nexus Launch...
I65aa07ac1:Compose gesture integrated fully into Launcher

Change-Id: Ic05c47eb686b3942ba519e76db32977fc568844b
2020-05-07 00:13:47 +00:00
Sreyas 78f53856a9 Disabling OverviewActionsView buttons while scrolling or clear all shown.
Bug: 153469850, 153387526
Video: https://drive.google.com/a/google.com/file/d/1mOc8yubux92iKtXRtSOKTcnjWWzvDgC7/view?usp=sharing

Change-Id: Id507d3a050e67057fc34a30771c9566ddfcf94ca
2020-05-06 16:36:24 -07:00
TreeHugger Robot e725a69fb5 Merge "Updates Back and Home tutorial animations." into ub-launcher3-rvc-dev 2020-05-06 22:45:27 +00:00
TreeHugger Robot 870ec6a974 Merge "Improve Hybird hotseat cache support" into ub-launcher3-rvc-dev 2020-05-06 22:19:53 +00:00
Samuel Fufa 385e93249e Improve Hybird hotseat cache support
Loads list of cached apps and shows predicted app icons with the rest of workspace items.

-> Extracted prediction caching logic into a model layer

Bug: 155029837
Test: Manual

Change-Id: I6981594a910f5fe4e8e8cf8fe39db0cb856e7acd
2020-05-06 14:14:08 -07:00
Zak Cohen 0029fd7794 Overview Actions - fade action buttons, avoiding jump cuts
Test: local build and inspect
Bug: 155016287
Change-Id: I6015ce01b5095138ddd4e5f171ccb4d151c8f3fc
2020-05-06 11:45:14 -07:00
James O'Leary d9c86d4b3b Compose gesture integrated fully into Launcher
- Support dismissing Compose via the reverse gesture from the appear
gesture
- Use Tony Wickham's ag/10204761 with some glue code to enable the
app below Compose panning in the same direction as the gesture as
Compose peeks in
- Add feature flag to use Compose hosted in a window (permits underlying
app panning)
- Use InterpolatingVelocityTracker to fix OtherActivityInputConsumer
processing swipes in the wrong direction ~20% of the time due to a bug
in VelocityTracker (see go/quirky-bubbles)

Change-Id: I65aa07ac112db8bd89cec9acfa0ce2b6ebacd43f
2020-05-06 13:40:47 -04:00
TreeHugger Robot e93d6d615c Merge "Removing some unused AppWindowAnimationHelper dependencies" into ub-launcher3-rvc-dev 2020-05-06 17:33:27 +00:00
TreeHugger Robot 18f367a5f7 Merge "Bias rotation to remain in existing rotation" into ub-launcher3-rvc-dev 2020-05-06 17:30:40 +00:00
TreeHugger Robot 164d0c6509 Merge "Fix AlwaysOnTop stack may covered by RemoteAnimation" into ub-launcher3-rvc-dev 2020-05-06 16:23:32 +00:00
Sunny Goyal d67569eac8 Fix AlwaysOnTop stack may covered by RemoteAnimation
Merging changes from Change-Id: I8028cd50d66f7d77e5d1ec6514e953c8be9935d6
in TaskViewSimulator

Bug: 151024899
Change-Id: Id41e5af227be2557032387bdaa61cac3458baf32
2020-05-06 02:41:15 -07:00
Sunny Goyal 84d9c42559 Removing some unused AppWindowAnimationHelper dependencies
Change-Id: I594853696c63dc6c22d22cab2faab0ed7529b594
2020-05-06 02:30:02 -07:00
Bill Yi 77fe1a7c90 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I2a006876dfa9ef67f47ff5e29aa9e2bcd4ef328d
2020-05-05 22:50:24 -07:00
Jon Miranda e620872b18 Add logs to debug playtime crash and band aid fix for release builds.
Bug: 153821199
Change-Id: I0caa546254bb51ca8b88cdb16d79c054560bf2be
2020-05-05 18:18:40 -07:00
Zak Cohen 224ef0efe7 Merge "OverviewActions - make button ripple workspace text color." into ub-launcher3-rvc-dev 2020-05-05 19:11:21 +00:00
Tony Wickham c0535b23f6 Merge "Fix continueComputingRecentsScrollIfNecessary() running infinitely" into ub-launcher3-rvc-dev 2020-05-05 17:14:03 +00:00
Sunny Goyal cf19a92cde Merge "Not caching TaskView during quickswitch" into ub-launcher3-rvc-dev 2020-05-05 17:05:20 +00:00
Tony Wickham 49b57e955c Fix continueComputingRecentsScrollIfNecessary() running infinitely
When continuing a gesture during quick switch, we cancel the
previous animation but don't invalidate it (since the gesture
isn't fully finished), and the new gesture handler calls
mRecentsView.setOnPageTransitionEndCallback(), so the previous
handler will never get STATE_RECENTS_SCROLLING_FINISHED. Thus,
continueComputingRecentsScrollIfNecessary() will never end.

To fix this, also check !mCanceled, since that is set when
continuing the gesture. Also use postOnAnimation() instead of
post() since that has better guarantees that the next
computation will wait for the next animation frame, rather
than whenever the message queue is available, which might
happen too frequently.

Test: quick switch from A to B and back to A before settling
on B, ensure we stop calling computeScroll().

Bug: 153589287
Change-Id: I6b4389ef2cf5a818438c7ae36d8807b3e41c8501
2020-05-05 02:32:39 -05:00
Winson Chung 7ad937c78d Merge "Account for various launcher states when setting back button alpha" into ub-launcher3-rvc-dev 2020-05-05 04:37:38 +00:00
TreeHugger Robot 43e789ff9b Merge "Fixing max-zoom-scale not taking into account the the fullScreen scale" into ub-launcher3-rvc-dev 2020-05-05 02:01:00 +00:00
Sunny Goyal a88ca7643a Not caching TaskView during quickswitch
RecentsList update case cause the TaskView to get unparented

Bug: 155568411
Change-Id: Ia05de9658ba2154f73311679a359a2eefeb73aec
2020-05-04 18:30:02 -07:00
Sunny Goyal 29e7a58f1a Fixing max-zoom-scale not taking into account the the fullScreen scale
Also fixing the issue where display info is is not correctly initialized

Bug: 155257023
Bug: 155682580
Change-Id: Ib2cc981c1900f3d14f158f4dbb60ae77311f339b
2020-05-04 18:11:15 -07:00
Becky Qiu 8f3b7e3249 [Overview Actions] Expose task corner radius to use in TaskOverlay.
Test: local
Bug: 153478940

Change-Id: I03d410edb5a55ce5eda5c703752daf0ef5d04500
2020-05-04 17:31:40 -07:00
Zak Cohen b4ee058955 OverviewActions - make button ripple workspace text color.
Uses a theme to set the control highlight color.

Test: local on dark and light wallpaper
Change-Id: Iddb668fcbd3ab760faabd9c296274315d63e044f
2020-05-04 17:17:52 -07:00
TreeHugger Robot f9ec6f670c Merge "Decouple feature flag and predictions" into ub-launcher3-rvc-dev 2020-05-04 23:12:37 +00:00
Samuel Fufa 49d0f64a9d Decouple feature flag and predictions
- Always default to true for ENABLE_HYBRID_HOTSEAT
- Allow launcher to show predictions anytime regardless of notification and on-boarding.
- Remove past beta specific plans
- Migrate if first screen can accommodate hotseat items otherwise show tip

Bug: 142753423
Test: Manual
Change-Id: I142cd95d779964822da07a96e5884a0c82813742
2020-05-04 15:20:39 -07:00
TreeHugger Robot 0dbbd8951d Merge "Use rotation based on PagedOrientationHandler instead of touch" into ub-launcher3-rvc-dev 2020-05-04 20:21:50 +00:00
Vinit Nayak bb55f9e982 Use rotation based on PagedOrientationHandler instead of touch
Fixes: 154928106
Test: Tested overview w/ and w/o
home rotation enabled.

Change-Id: Ib7e91e51b2181824e5520ad69965ed3379302c27
2020-05-04 11:58:11 -07:00
Vinit Nayak d079aed058 Revert drag factor calculation to pre-vertical overview
Fixes: 149609070
Test: Swiped up in landscape past
where thumbnail would be. Scaled accordingly.

Change-Id: Ib8e64af2d7a9e4ce517d5f56300d50b659217b71
2020-05-03 22:38:20 -07:00
TreeHugger Robot 4544af1996 Merge "[Overview Actions] Disable touching on the empty area when recent is modal." into ub-launcher3-rvc-dev 2020-05-01 20:43:03 +00:00
TreeHugger Robot c6d8838c33 Merge "Sets icon invisible when alpha 0 (Cannot be tapped while TaskView modal)" into ub-launcher3-rvc-dev 2020-05-01 20:27:40 +00:00
Becky Qiu 2d9f8284ca [Overview Actions] Disable touching on the empty area when recent is modal.
Originally touching on the empty space would bring user back to homescreen. We will disable this for select mode.

Test: local
Bug: 154531538
Change-Id: Iee3780755fc2c32682ea0fa039ca5822a95fce2c
2020-05-01 12:51:07 -07:00
Winson Chung a4b11dd984 Skip setting the controller if the animation is already finished
Bug: 154568748
Change-Id: I999c0cc3a4d9661bcf6dcd1e804746a3a0959a83
2020-05-01 16:25:04 +00:00
TreeHugger Robot 7a87f953a8 Merge changes from topic "widget-logging" into ub-launcher3-rvc-dev
* changes:
  Fixes missing components info when logging Widget item.
  Implement LAUNCHER_ITEM_DRAG_STARTED event.
2020-05-01 07:54:03 +00:00
TreeHugger Robot e041a062a1 Merge "Fixing RecentsView translation is not reset on app-launch animation" into ub-launcher3-rvc-dev 2020-05-01 07:19:32 +00:00
Winson Chung 2a00f81327 Account for various launcher states when setting back button alpha
- Previously we only check for the flag which is always true in the
  normal launcher state, so if the animation starts, we could end up
  writing the back alpha value without accounting for window focus or
  any other states that launcher is in that affects back button
  visibility

Bug: 155129739
Test: Open -1 article and hit back
Change-Id: I42d27a192b23f394f8565a6893ce092603e31654
2020-04-30 23:03:52 -07:00
Sunny Goyal 9ae484a6ba Fixing RecentsView translation is not reset on app-launch animation
Bug: 155166631
Change-Id: I25b9783fb1ae0d1e3d477a9d9f5aedf60c3c575d
2020-04-30 17:05:23 -07:00
Winson Chung bd49cea1ca Merge "Bound the thumbnail insets to the launcher insets" into ub-launcher3-rvc-dev 2020-04-30 22:48:44 +00:00
Winson Chung 7f534cf2a8 Merge "Fix issue with quickswitch not updating system bar flags" into ub-launcher3-rvc-dev 2020-04-30 22:48:43 +00:00
thiruram f81e8b002a Implement LAUNCHER_ITEM_DRAG_STARTED event.
* Fixes null component issue when ItemInfo object copiedFrom.
* Fixes missing container when item is dragged from hybrid hotseat.

Sample Logs:
2020-04-30 14:09:45.499 30472-30472/com.google.android.apps.nexuslauncher D/StatsLogManager: LAUNCHER_ITEM_DRAG_STARTED
    # com.android.launcher3.logger.LauncherAtom$ItemInfo@260f31f8
    application {
      component_name: "com.android.chrome/com.google.android.apps.chrome.Main"
      package_name: "com.android.chrome"
    }
    container_info {
      workspace {
        grid_x: 2
        grid_y: 2
        page_index: 2
      }
    }
    is_work: false

2020-04-30 14:23:15.230 31320-31320/com.google.android.apps.nexuslauncher D/StatsLogManager: LAUNCHER_ITEM_DRAG_STARTED
    # com.android.launcher3.logger.LauncherAtom$ItemInfo@608f101
    application {
      component_name: "com.google.android.gm/.ConversationListActivityGmail"
      package_name: "com.google.android.gm"
    }
    container_info {
      hotseat {
        index: 1
      }
    }
    is_work: false

Bug: 152978018

Change-Id: I3d3ce213fd2fc6eb5ffb239e048ceb7c0fa88b53
2020-04-30 15:03:43 -07:00
Andy Wickham f7c033f5e3 Updates Back and Home tutorial animations.
Also adds Overview and Assistant for future use.

Back: https://drive.google.com/open?id=1-VWcGelSZLHQysCn4Bm1tv7vyXbeMpDX
Home: https://drive.google.com/open?id=1YnpMuZcjs3bdQwQkdCOv5px5Ktpm_aBM

Bug: 148542211
Change-Id: Iaaf24e43f24af5ffca1a040e3c0d71e7d26a2175
2020-04-30 21:44:48 +00:00
Winson Chung a7ac7192c3 Fix issue with quickswitch not updating system bar flags
- Separate the calls to minimize split and to update the flags (we only
  want to minimize in split when swiping up, but we want to update the
  flags when quickswitching as well)

Bug: 155410195
Change-Id: I56308cc0fbaa8a855383012738f129671d72feff
2020-04-30 13:58:22 -07:00
Zak Cohen 7f48b0aa34 Overview - position the modal task in the correct place.
video of new behavoir
https://drive.google.com/a/google.com/file/d/1vFTtjjpwamj5H7dhmB1-5JSFS6fv6vMw/view?usp=sharing


Test: local
Bug: 155205932
Change-Id: I7fe79c848af92013587de32a777645cc472ae910
2020-04-30 18:34:46 +00:00
Winson Chung 895f57f610 Bound the thumbnail insets to the launcher insets
- We currently end up using the launcher insets when swiping
  up into overview due to how we scale the target rect to
  the source bounds, but the thumbnail crop is calculated
  only from the task thumbnail insets.  For apps that are
  letterboxed, this results in a jump after the transition
  completes when we crop too far (including the letterbox)
  and end up showing the task background.

  For now, since we are just cropping by the launcher
  insets, we can also take the min of those and the
  thumbnail insets to calculate the thumbnail view crop.

Bug: 151770104
Test: Test swiping up with a normal app, a letterboxed app
      (like authenticator), an app that has no insets (like
Change-Id: I08342b19c54f9078be4613fca9024e2558403bc9
2020-04-30 11:30:05 -07:00
Lucas Dupin 20051e22e5 Merge "Do not blur if all apps is fully visible" into ub-launcher3-rvc-dev 2020-04-30 17:11:53 +00:00
Sunny Goyal 8f96546e79 Generalizing LauncherState definition so that it can be used in RecentsActivity
> Removing 'Launcher' as parameter from state methods called by StateManager
> Converting state properties to methods for easier abstraction
> Moving state handling drom state definition to activity class

Change-Id: I997627df606a7e0bb3bf32688d045a942a47fc94
2020-04-30 01:01:51 -07:00
TreeHugger Robot 2d60935e1c Merge "Various multi-window fixes" into ub-launcher3-rvc-dev 2020-04-29 23:43:57 +00:00
TreeHugger Robot 875f381dbb Merge "Dump RecentsOrientationState for bug reports" into ub-launcher3-rvc-dev 2020-04-29 19:56:54 +00:00
Vinit Nayak 3aed7aeb67 Merge "Use appropriate start padding for clear all button" into ub-launcher3-rvc-dev 2020-04-29 19:31:38 +00:00
Vinit Nayak a5877307d1 Dump RecentsOrientationState for bug reports
Bug: 154951045
Test: New output shows up when running
"adb shell dumpsys activity
com.google.android.apps.nexuslauncher.NexusLauncherActivity
[--all]"

Change-Id: I5e9ace7d370eb0e9d278d7d9f7f9156674ca1a50
2020-04-29 12:19:49 -07:00
Sunny Goyal 0addbf0512 Various multi-window fixes
> Fixing scale up calculator for swipe-down
> Offsetting pivot so that the preview is aligned to bottom-right
> Allowing insets to be available in multi-window mode as well
> Offsetting taskViewSimulator appropriately in multi-window mode

Change-Id: I7da4c145efca72ef219a5ffcaf23d726812df270
2020-04-29 11:50:33 -07:00
Lucas Dupin 264cb2ff68 Do not blur if all apps is fully visible
Fixes: 155093795
Fixes: 155203546
Test: manual
Change-Id: I30f4c027e5107a199791e908acbb7ffed94e6a77
2020-04-29 17:49:02 +00:00
Jonathan Miranda 0d9a9b9336 Merge "Fix floating icon view positioning when in multiwindow mode." into ub-launcher3-rvc-dev 2020-04-29 17:26:33 +00:00
Jonathan Miranda 7a79edd48a Merge "Ensure final values are set when StaggeredWorkspaceAnim is cancelled/ended." into ub-launcher3-rvc-dev 2020-04-29 16:37:50 +00:00
Jon Miranda db02b11340 Ensure final values are set when StaggeredWorkspaceAnim is cancelled/ended.
Was able to repo the bug reliably when calling cancel() and
end() immediately after starting the StaggeredWorkspaceAnim.

Bug: 153584267
Change-Id: I954d38ad69e72a83535f4dd1ec21dba0f61a3cfb
2020-04-29 15:51:10 +00:00
Jon Miranda f6225830d5 Fix floating icon view positioning when in multiwindow mode.
The rect we passed in was in screen space to match the window, but needs to be
be local to launcher.

Also updated code/comments to make it more readable.

Note that the bounds of the targets being off is a separate issue b/153581126

Bug: 135195169
Change-Id: I4a8c0aa2f504bdf69342a927725cd440fb324a36
2020-04-28 21:29:51 -07:00
Becky Qiu 1f31915b5b [Overview Actions] Fix the animation duration issue.
Test: local
Bug: 155205932

Change-Id: Ic64762b0c7647a5c38d182c24a8cba4a354a9a83
2020-04-28 17:24:48 -07:00
Vinit Nayak e8269b3944 Merge "Enable edge back gesture on app launch" into ub-launcher3-rvc-dev 2020-04-29 00:18:22 +00:00
Sreyas 43cf2f7925 Sets icon invisible when alpha 0 (Cannot be tapped while TaskView modal)
Bug: 155177299
Change-Id: Ibedbc271837441915580577986c10fa3f0de0ae6
2020-04-28 17:05:16 -07:00
Vinit Nayak 3f3cc3e96e Enable edge back gesture on app launch
We don't clear state on EdgeBackGestureHandler
when we go to Recents or Home.
A more robust solution is in the works with
WM team and will probably be built on top of this.
Needs ag/11273364 to work.

Bug: 154580671
Test: Launch app directly in landscape,
should be able to swipe home on first try.

Change-Id: Ia4c685e16645d0237f278a611f6c61f252f3b79c
2020-04-28 13:51:43 -07:00
Vinit Nayak 72c9da7647 Bias rotation to remain in existing rotation
Change-Id: I3457dc7946838eb7e0e68a879091941ce4674a7a
2020-04-28 12:53:07 -07:00
Vinit Nayak 48ea9e9502 Use appropriate start padding for clear all button
This still shows up a bit strange with
notched phones because we are using
RecentsView padding to give ClearAll the
right amount of spacing. However, we're only
adding padding to the left and right and not
the top/bottom.
That's captured here: b/154436527

Fixes: 150389833
Test: Tested landscape/portrait/seascape
launcher, w/ RTL as well

Change-Id: I49defd58048e609a1f7a821abb97374bcbb94b9f
2020-04-27 22:44:05 -07:00
Zak Cohen a39544d562 OverviewActions - Use launcher state to track modal state.
Test:local

Change-Id: I44e25b95095b9a7aac4b4172c9c91fbfbf4d9ec7
2020-04-27 16:29:44 -07:00
Sreyas Rangaraju 2f04a9d271 Merge "Assistive chip: Adding background scrim for chip." into ub-launcher3-rvc-dev 2020-04-27 21:43:49 +00:00
Vinit Nayak b219eeab48 Merge "Revert "Hide shelf in 2-Button Landscape"" into ub-launcher3-rvc-dev 2020-04-27 21:24:53 +00:00
Vinit Nayak 48b28027c0 Revert "Hide shelf in 2-Button Landscape"
This reverts commit 9b5795a579.

Reason for revert: b/155090034

Change-Id: If7decd54965a680d50e4474fb279ebe0002441bb
2020-04-27 20:48:49 +00:00
TreeHugger Robot 2ca219889b Merge "Fixing stagger animation not getting initialized properly" into ub-launcher3-rvc-dev 2020-04-27 20:17:16 +00:00
Sunny Goyal 017a8681c7 Fixing stagger animation not getting initialized properly
Bug: 155092237
Change-Id: I65ee6bddc0bf3bda24820d4680d71bab112b670c
2020-04-27 11:11:54 -07:00
Sunny Goyal fd0f8b0d1a Fixing corner radius not properly scaled in TaskViewSimulator
Bug: 155016285
Change-Id: Ib49e79cb30fbd448f86806a98557ec27718e3499
2020-04-27 18:03:09 +00:00
TreeHugger Robot fbb6d6a73a Merge "Import translations. DO NOT MERGE" into ub-launcher3-rvc-dev 2020-04-25 21:03:52 +00:00
Bill Yi 0d3d73a402 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I9fc4e7de6693ab7fee98740c1c09e92dfbd82eda
2020-04-25 03:09:04 -07:00
TreeHugger Robot 1016bf410d Merge "Don't scale workspace when going to all apps if ENABLE_OVERVIEW_ACTIONS" into ub-launcher3-rvc-dev 2020-04-25 06:21:30 +00:00
Tony Wickham 00dc219309 Merge "Use OverviewWithoutFocusInputConsumer for sharesheets over home" into ub-launcher3-rvc-dev 2020-04-25 06:00:01 +00:00
Vinit Nayak 482435c01b Merge "Use DeviceProfile to check multiWindowMode" into ub-launcher3-rvc-dev 2020-04-25 02:11:50 +00:00
TreeHugger Robot ea0c4f57be Merge "Hide shelf in 2-Button Landscape" into ub-launcher3-rvc-dev 2020-04-25 01:14:10 +00:00
Vinit Nayak 11c6671d27 Use DeviceProfile to check multiWindowMode
Prevent extra IPC calls when checking for
multiWindowMode by using existing DeviceProfile.
This might be made irrelevant by b/142282126

Fixes: 149571513
Change-Id: Ia41cbfd56c67dd78f4d9c10bf1469d0d2a9e581d
2020-04-24 17:22:30 -07:00
TreeHugger Robot c6800e40e2 Merge "Creating default implementation for state lisnter method" into ub-launcher3-rvc-dev 2020-04-24 23:49:33 +00:00
Vinit Nayak 9b5795a579 Hide shelf in 2-Button Landscape
Disable overview rotation in 2-Button
until we can figure out the correct
transition/animation.
TODO: b/154665738

Fixes: 154181816
Test: Tested no button and 2 button,
overview actions worked as before.

Change-Id: Ib67906b11e24def870a39f57b5156e29db258fd7
2020-04-24 16:43:37 -07:00
TreeHugger Robot 2450f524c6 Merge "Clear swipe region cache on nav mode switch" into ub-launcher3-rvc-dev 2020-04-24 23:31:04 +00:00
Sreyas 6bb2be1526 Assistive chip: Adding background scrim for chip.
Change-Id: Ic6d0f0e0809c0c4acad4bb31c0e005d653cd0ae3
Bug: 153372670
2020-04-24 23:12:31 +00:00
Sunny Goyal aeec80ddbb Creating default implementation for state lisnter method
> The transition start is used rarely

Change-Id: I0d33f0f6372eb4ef89bfbb66968612693b7c6033
2020-04-24 15:41:29 -07:00
Vinit Nayak dcec265f0d Clear swipe region cache on nav mode switch
Fixes: 154955192, 150958400
Test: Switched from gesture nav to 3 button,
was no longer able to swipe up

Change-Id: Icc7b27eb7bd1eb5ddf25d7e7c3464a77a3a88f24
2020-04-24 15:05:17 -07:00
Tony Wickham bf2f066fff Use OverviewWithoutFocusInputConsumer for sharesheets over home
Test:
- start sharesheet from overview action, swipe up
- start sharesheet after taking screenshot on home, swipe up
- start sharesheet from an app, e.g. Chrome
The first two use OWFIC, last one uses OtherActivityInputConsumer
as normal.

Bug: 153673244
Change-Id: I7d7887e1f6818346ada75776ec63b43aaf3708f1
2020-04-24 15:01:32 -05:00
TreeHugger Robot a29a69943a Merge changes I38874b8b,I627ed7c6 into ub-launcher3-rvc-dev
* changes:
  Adds ripple effect for successful Back gestures in tutorial.
  Adds feedback to Home and Back tutorials.
2020-04-24 19:58:48 +00:00
TreeHugger Robot acafb3a287 Merge "Detects nav bar gestures to progress through Home tutorial." into ub-launcher3-rvc-dev 2020-04-24 18:58:30 +00:00
Andy Wickham e992fab187 Adds ripple effect for successful Back gestures in tutorial.
Emanates from where the gesture was started.

Demo: https://drive.google.com/open?id=1oaXOSUiZP6Hi7J6W4H2NIFVVu0tQfKWm
Bug: 148542211
Change-Id: I38874b8b731864cbfdf963a5e44a59c8c3d30c51
2020-04-24 18:16:43 +00:00
Andy Wickham 64a91132c5 Adds feedback to Home and Back tutorials.
Back feedback:
 - Too far from edge of screen
 - Cancelled (reversed gesture, swiped upwards, etc.)
 - Inside nav bar region
 - Demo: https://drive.google.com/open?id=1pc_hr7i-iZmgF37CN8oijPjhOvvsJoEG

Home feedback:
 - Too far from edge of screen
 - Paused too long (Overview detected)
 - Swiped sideways instead of up
 - Demo: https://drive.google.com/open?id=1NGYAlqV2wJtM2DOJ1pZM-r8N1SYVtMos

Bug: 148542211
Test: Manual
Change-Id: I627ed7c6e9b005d35794e4ae568529b5613cbf70
2020-04-24 18:15:23 +00:00
Andy Wickham 6b6287f414 Detects nav bar gestures to progress through Home tutorial.
Home gesture also exits Back and Home tutorials on the
completion screens (as does back gesture).

Test: Manually verified Back and Home tutorial flows.
Bug: 148542211
Change-Id: I8026745e875e9ccb8cfd60bc438213b2d896254d
2020-04-24 18:13:05 +00:00
Vinit Nayak 49d3fe598c Merge "Rotate Overview Task Action Menu" into ub-launcher3-rvc-dev 2020-04-24 17:48:01 +00:00
Ming-Shin Lu 4f07525417 Fix AlwaysOnTop stack may covered by RemoteAnimation
Now with hierarachical animation, the layer of
RecentsAnimation / RemoteAnimation are controlled by system.

Now Launcher side don't need to have other way to set layer for ZBoost
case, so remove setLayer & withLayer related logics for cleaning up.

Fix: 151024899
Test: manual, launch google map app -> enter PiP mode,
      swipe up to overview screen or launch activity from shortcut,
      make sure the PiP window is not covered by other apps.

Change-Id: I8028cd50d66f7d77e5d1ec6514e953c8be9935d6
(cherry picked from commit 99f7da7dd2)
2020-04-24 02:18:16 +00:00
TreeHugger Robot d73d39b45a Merge "Makeshift analog of Strictmode leak detector" into ub-launcher3-rvc-dev 2020-04-23 03:22:31 +00:00
vadimt b3e8ae8230 Makeshift analog of Strictmode leak detector
Strictmode leak detector is still a goal, but we might not be able to
achieve it in R. Strictmode has several framework-side bugs that perhaps
hide Launcher-side strictmode violations, while the time to fix
everything is limited, and new leaks get introduced all the time.

For now, implementing a check that is slightly more relaxed than
Strictmode, but still ensures the absence of leaks. I’ll keep
eliminating Strictmode violations as well as keep strengthening the
makeshift checker conditions until we’ll be able to enable Strictmode in
continuous testing.

I’m disabling Strictmode checks for now so that they don’t generate
unnecessary hprof dumps, but leaving the code dealing with strictmode.

Bug: 139137636
Change-Id: Ib10136b0d4e9892f70a19cd052ae5a54cf0a4efb
2020-04-22 19:00:12 -07:00
TreeHugger Robot 8d5a000071 Merge "Always return RecentsView to translation 0 on drag end" into ub-launcher3-rvc-dev 2020-04-23 01:25:06 +00:00
TreeHugger Robot 1bb37acb5d Merge "Don't allow swiping from overview to all apps in 3 button mode" into ub-launcher3-rvc-dev 2020-04-23 00:04:35 +00:00
Tony Wickham 6a6301c569 Always return RecentsView to translation 0 on drag end
After reaching overview, we let the user translate RecentsView
if they continue dragging around. But when they let go, we need
to return RecentsView to translation 0 since that's no longer
part of the state machine.

Change-Id: I30b51485339a3b6c3dd52bda113b1a05b6e885fa
2020-04-22 18:42:40 -05:00
TreeHugger Robot cea3ed48e5 Merge "Stop computing scroll if handler is invalidated" into ub-launcher3-rvc-dev 2020-04-22 23:39:11 +00:00
TreeHugger Robot 2309597c9a Merge "[Overview Actions] Update the navigation mode immediately when switch." into ub-launcher3-rvc-dev 2020-04-22 23:34:00 +00:00
Tony Wickham 22757e840c Don't allow swiping from overview to all apps in 3 button mode
Bug: 154761926
Change-Id: I155faec27f3b96e2f11aaec318d6846a893885e6
2020-04-22 23:13:48 +00:00
Becky Qiu 72c53af896 [Overview Actions] Update the navigation mode immediately when switch.
This would fix the issue that overview actions UI visibility was not set correctly.

Test: local
Bug: 152047880
Change-Id: Ia335c5c8947b39e580403090f461f87e78645af1
2020-04-22 15:57:34 -07:00
TreeHugger Robot 3e60577fa1 Merge "Fixing recentsView getting translated in NavBarToHomeTouchController" into ub-launcher3-rvc-dev 2020-04-22 22:42:46 +00:00
TreeHugger Robot 65a0cc72ae Merge "Assistive chip: Adjusting chip UI" into ub-launcher3-rvc-dev 2020-04-22 21:50:02 +00:00
Sunny Goyal de4815bdad Fixing recentsView getting translated in NavBarToHomeTouchController
Bug: 154657409
Change-Id: I4d7f3cac52b563370d612dd29d5e7322645b5cbe
2020-04-22 14:23:55 -07:00
Vinit Nayak e553e380d0 Rotate Overview Task Action Menu
Fixes: 153371258
Test: Tap on icon in portrait,
landscape and seascape. Open menu
then rotate phone.

Change-Id: I38b018371561b502fe211a3c2ddea4ff7fde4274
2020-04-22 14:16:05 -07:00
TreeHugger Robot cf3bed973c Merge "Fixing animation player not overshooting spring animation; tuning springs" into ub-launcher3-rvc-dev 2020-04-22 20:52:35 +00:00
Sreyas 71a091fe8a Assistive chip: Adjusting chip UI
Change-Id: I2970107f4324a5f01e0df4a6adf21875412582c6
2020-04-22 13:33:36 -07:00
Sunny Goyal 7f9e8e2d27 Fixing animation player not overshooting spring animation; tuning springs
=> setCurrentPlayTime is bounded between [0, duration] by the animation framework
Instead using interpolator so that we can go outside the bounds

=> Tune spring stiffness and dampening for overview card dismiss animations

Bug: 154061408
Change-Id: Iaa31491fff499db916b36d9779ec159b8a89a2de
2020-04-22 12:54:31 -07:00
TreeHugger Robot 6db6a59f86 Merge "Moving various orientation related config in RecentsOrientaedState" into ub-launcher3-rvc-dev 2020-04-22 19:19:34 +00:00
TreeHugger Robot cee56f039e Merge "Adding common code for instrumentation and robolectric tests" into ub-launcher3-rvc-dev 2020-04-22 17:49:22 +00:00
Sunny Goyal b7833f8193 Moving various orientation related config in RecentsOrientaedState
> Fixing RecentsOrientationState values for fallback recents
> Using proper rotation in task simulator

Change-Id: I770e7c8850e469f5dc0ce6f89889672f2decdc0d
2020-04-22 10:49:02 -07:00
Jonathan Miranda 8451542a25 Merge "Ensures that the swipe up to home animation is ended prior to view recycling." into ub-launcher3-rvc-dev 2020-04-22 05:31:37 +00:00
TreeHugger Robot 585628e270 Merge "Fixing activity leak via ActivityInitListener" into ub-launcher3-rvc-dev 2020-04-22 03:07:01 +00:00
TreeHugger Robot 947905d28b Merge "Fixing crash when emptyView gets added twice" into ub-launcher3-rvc-dev 2020-04-22 00:30:43 +00:00
vadimt 5a804dcbaf Fixing activity leak via ActivityInitListener
Bug: 139137636
Change-Id: I49ac81dfc69f63211d832bf558517c534f51eab8
2020-04-21 15:35:23 -07:00
Jon Miranda d08f8ac409 Ensures that the swipe up to home animation is ended prior to view recycling.
Bug: 154163960
Change-Id: I70b2c6290a2a17be8b80ba0209528173d6627332
2020-04-21 15:12:40 -07:00
Tony Wickham 9df3f0cebf Stop computing scroll if handler is invalidated
Bug: 153589287
Change-Id: I0282ec82fe4ae1f74a0f4342471ffd53f43095d7
2020-04-21 16:24:47 -05:00
Winson Chung 674e38fdb6 Merge "Disable blurs while in multiwindow mode" into ub-launcher3-rvc-dev 2020-04-21 19:39:17 +00:00
Sunny Goyal f2393f1d20 Adding TaskViewSimulator for simulating taskView layout on a remote target
1. Tanslating contents of RecentsView instead of recentsView itself. When
   translating, we keep the current TaskView from moving. This allows
   the remoteTarget to follow an individual taskView.
2. Removing translationY in recentsView and setting the pivot instead
3. Using TaskViewSimulator for swipe handler. This allows using similar
   animation creation as Launcher window animation.

Change-Id: I0b7b16c367d9d8cd8dd0ed59061e46853e2f8c83
2020-04-21 11:16:21 -07:00
Vinit Nayak 0755ac908c Merge "Rotate overview only if system rotation allowed" into ub-launcher3-rvc-dev 2020-04-21 17:57:00 +00:00
Winson Chung b330d6e6f8 Disable blurs while in multiwindow mode
- With hierarchical animations, the split-secondary shell root
  is moved above the split-primary shell root immediately during
  transitions, which means that setting the blur on the launcher
  surface will also affect the primary docked surface

Bug: 154125518
Change-Id: I21dd01738ee9bc974d41e5964364917a30143a2a
2020-04-21 10:28:43 -07:00
Vinit Nayak 94541b99b9 Rotate overview only if system rotation allowed
Don't rotate overview if all of launcher can
be rotated.

Fixes: 154243745, 154299710
Test: Toggled system rotation while overview
was showing. Also toggled home rotation to
ensure no intermediate overview rotation
animation.

Change-Id: I49acf2dafb84e7f05c46f8908ba9ffdd43f1d1e7
2020-04-20 23:22:47 -07:00
TreeHugger Robot 0f6ecb675e Merge "Removes Sandbox from gesture-excluding activities." into ub-launcher3-rvc-dev 2020-04-21 00:19:46 +00:00
Samuel Fufa 1b3f77724f resolve syntax issue introduced by ag/11174880
Change-Id: I46911fb32384c40dac42459bb391001be8774ae8
2020-04-20 16:56:14 -07:00
TreeHugger Robot fe68150f35 Merge "Predicted icon ring embellishments" into ub-launcher3-rvc-dev 2020-04-20 23:47:11 +00:00
Samuel Fufa 9b7d913901 Predicted icon ring embellishments
Screenshot: https://screenshot.googleplex.com/yFfiDbHiyq6

- Wrap ring around badge
- Add shadow to ring

Bug: 153201272
Bug: 152560070
Test: Manual
Change-Id: Ic1f726d080a8e6768417e5174a855a57f3241166
2020-04-20 16:46:14 -07:00
Andy Wickham 7a478e25a2 Removes Sandbox from gesture-excluding activities.
Not needed now that Sandbox runs in Launcher's process/task.

Change-Id: I9e3e03be89d5305a3a7afe201164512d59aea470
2020-04-20 23:35:13 +00:00
TreeHugger Robot e922b06cf4 Merge "Don't show shelf bounce when there's no shelf in Overview" into ub-launcher3-rvc-dev 2020-04-20 22:30:40 +00:00
Sunny Goyal 34ff8cb3c1 Adding common code for instrumentation and robolectric tests
Change-Id: Ia338f0565868bb174ef5f6721924944792866be6
2020-04-20 14:42:30 -07:00
Winson Chung f66e7c19bd Merge "Dedupe non-perceptable depth updates" into ub-launcher3-rvc-dev 2020-04-20 21:10:20 +00:00
TreeHugger Robot 19b873d0bd Merge "Dump nav mode with TIS" into ub-launcher3-rvc-dev 2020-04-20 21:10:08 +00:00
Tony Wickham 853ac99e47 Don't show shelf bounce when there's no shelf in Overview
Bug: 154513651
Change-Id: Ia31fd46dc174fcb6362b11e5970f92f4acff66ac
2020-04-20 21:05:19 +00:00
TreeHugger Robot f5a10fe9c2 Merge "Update predicted icon outline drawing" into ub-launcher3-rvc-dev 2020-04-20 19:17:49 +00:00
Samuel Fufa 28f1db6dfa Update predicted icon outline drawing
Video: b/153203071#comment2
Bug: 153203071
Test: Manual
Change-Id: I786300f953553c98c63c8b48e40354b1672e930c
2020-04-20 11:27:28 -07:00
Sunny Goyal 01d8541f14 Fixing actions view getting visible sometimes
> Linking actions view to state flags
> Creating multiple visibility channels that can be controlled separately

Bug: 153906903
Change-Id: I33d20f5fdc8bcdf0520dae3aac986548eb7e0058
2020-04-20 09:59:13 -07:00
Vinit Nayak 8699bf5626 Merge "Re-enable home screen rotation" into ub-launcher3-rvc-dev 2020-04-18 05:22:26 +00:00
Winson Chung 20aeddd853 Dedupe non-perceptable depth updates
Bug: 154304487
Change-Id: I6d96aca555932f4a51aed576d25f7150952bb562
2020-04-17 16:16:44 -07:00
Winson Chung e9edbabbe2 Dump nav mode with TIS
- Also skip logging touches when not handling gestures

Change-Id: Ie25f28fe62594f22ebe73f276ccef628b7f8e734
2020-04-17 16:16:14 -07:00
Vinit Nayak 326d93bd56 Re-enable home screen rotation
Launcher home screen rotation now works with fixed
transform. When using Quickstep while holding
the phone from an orientation different than
the orientation of the touch, the overview
shown will be that of the phone orientation,
not the touch orientation.
Easier to see this be quickswitching from
portrait to landscape app, turning phone, then
going to overview from the original region you
swiped.

Fixes: 150214193
Test: Created test apps and fixed them
to various rotations to test.

Change-Id: Ic6565cd0ed33c951f45ccb97278045c6070e438e
2020-04-17 14:38:12 -07:00
Tony Wickham c09e8fbe9d Merge "Remove mPendingCallback from ActivityTracker" into ub-launcher3-rvc-dev 2020-04-17 19:35:49 +00:00
TreeHugger Robot e0f58a0f79 Merge "When dragging down on task, base end displacement on thumbnail" into ub-launcher3-rvc-dev 2020-04-17 16:30:32 +00:00
Tony Wickham 0bbdf3a9fd When dragging down on task, base end displacement on thumbnail
TaskView height has a lot of other factors such as icon margin
and actions. Since the thumbnail is what we are dragging to fill
the screen, use its height to determine the progress factor.

Test: swipe down on a task in portrait, landscape, and seascape,
and verify that it follows your finger to the bottom of the
screen. Swiping up also follows your finger for dimiss.

Bug: 151770407
Change-Id: I114a261a06b11f550822178945266cc4a6fd54fe
2020-04-17 10:27:40 -05:00
Sunny Goyal fd04f702d9 Fixing crash when emptyView gets added twice
Bug: 152129003
Change-Id: Id86279ace164453d0126773af89e3c9309d40202
2020-04-16 18:06:50 -07:00
TreeHugger Robot 71c63c6fda Merge "Simplifies Tutorial fragment layout." into ub-launcher3-rvc-dev 2020-04-16 23:46:25 +00:00
TreeHugger Robot 08c6c94398 Merge "Removes more Back references for generic tutorial styles." into ub-launcher3-rvc-dev 2020-04-16 21:54:18 +00:00
TreeHugger Robot 74974e802e Merge "Add resume callback to animate back to appropriate depth." into ub-launcher3-rvc-dev 2020-04-16 21:47:38 +00:00
Jonathan Miranda a976a2212d Merge "Add AnimationFlag for SKIP_DEPTH_CONTROLLER." into ub-launcher3-rvc-dev 2020-04-16 20:10:05 +00:00
Jon Miranda 172302686c Add resume callback to animate back to appropriate depth.
This fixes the bug where depth gets stuck to 1 after opening a transluscent
activity.

Bug: 152950633
Change-Id: I8bf5f61c57ef79d41656865b1ff1fbadb298fc36
2020-04-16 13:03:48 -07:00
Andy Wickham 4f66dc3bef Adds dummy HomeGestureTutorialFragment.
- Adds a new launch target in Dev options
 - Moves Back handling to the parent TutorialFragment
   (so all Tutorials can handle it as necessary)
 - Currently uses a dummy translating rectangle in
   place of a proper hand animation
 - No actual home gesture recognition is in place yet

Test: Manual
Bug: 148542211
Change-Id: Ic5a545eb9f5003914803272c8ffe367220d63336
2020-04-16 18:23:08 +00:00
Andy Wickham 00e241f82f Simplifies Tutorial fragment layout.
Removes nested LinearLayout and RelativeLayout, as well
as a Space (instead just aligning buttons to the bottom).

Test: Manually verified result looks same as before.

Change-Id: I773079107be5f8862bae68c0f8f5bf6edff79ce8
2020-04-16 18:16:56 +00:00
Andy Wickham ed7c8a41d0 Removes more Back references for generic tutorial styles.
Change-Id: Ie959f897ee19d636eabfd8cbe9a8a2615264d4cf
2020-04-16 18:15:34 +00:00
TreeHugger Robot a359556bff Merge "Fix regression where recents button had no animation" into ub-launcher3-rvc-dev 2020-04-15 23:56:26 +00:00
Tony Wickham 73ff6ddeac Remove mPendingCallback from ActivityTracker
Instead, all callers should use EXTRA_SCHEDULER_CALLBACK, set via
addToIntent(), to provide a callback for the next handleIntent().
The updated runCallbackWhenActivityExists() will do that for the
caller if the activity doesn't already exist (otherwise it will
run the callback synchronously as before).

Bug: 151389129
Change-Id: Idbec264354fd6de166ff3bae98249230078d5674
2020-04-15 18:48:39 -05:00
Tony Wickham 6ebf3d4434 Fix regression where recents button had no animation
Change-Id: I76102b4a9f3581b71285bfa9aa0c9dc29dd3165d
2020-04-15 18:06:28 -05:00
Jon Miranda dc186e68a1 Add AnimationFlag for SKIP_DEPTH_CONTROLLER.
We use this flag to prevent the depth from being immediately set to 0 when
preparing to animate home.

Bug: 152327671
Change-Id: I614c6ae08b9f9e56ecb94fb51748791a38504583
2020-04-15 15:19:49 -07:00
TreeHugger Robot 2e201a887d Merge "Import translations. DO NOT MERGE" into ub-launcher3-rvc-dev 2020-04-15 22:00:38 +00:00
TreeHugger Robot 62d493d50b Merge "Removing tracing for a fixed bug" into ub-launcher3-rvc-dev 2020-04-15 21:57:31 +00:00
vadimt f528fa6518 Removing tracing for a fixed bug
Bug: 138251824
Change-Id: Icd0d5001bfce0b1dabc102a2bbb0212a57d5839a
2020-04-15 13:51:47 -07:00
Bill Yi 4e74aa88b5 Import translations. DO NOT MERGE
Auto-generated-cl: translation import
Change-Id: I2a0d72250768648248eba861a61975553eb39322
2020-04-15 13:04:03 -07:00
Andy Wickham 28095168e9 Refactors Sandbox to more easily add new tutorials.
- Extracts abstract classes for common functionality
 - Renames some layouts, etc. to not be back-specific
 - Consolidates more logic in the controllers rather
   than classes like BackGestureTutorialTypeInfo
 - Removes redundant TutorialStep enum (combining it
   with TutorialType)

Still considering removing additional layers of
abstraction like the Fragment itself (instead
keeping UI within the Activity, which would still
be controlled by a TutorialController).

Test: Built and went through the Back tutorial to
confirm existing funcitonality was not disrupted.
Bug: 148542211

Merged-In: Id893869cb59609141dcdbdca01744d0f5952b546
Change-Id: Id893869cb59609141dcdbdca01744d0f5952b546
2020-04-15 18:18:48 +00:00
TreeHugger Robot c730304898 Merge "Revert "Use UiEvent for constants inside StatsLogManager"" into ub-launcher3-rvc-dev 2020-04-15 17:32:22 +00:00
Hyunyoung Song 1505d2f2e6 Revert "Use UiEvent for constants inside StatsLogManager"
This reverts commit 6b99a7d397.

Reason for revert: Launcher3 AOSP cannot link to uieventloggerlib because it's private API

Change-Id: Id652b8a4cba54b97d1d8b8644c2939903cc0e88a
2020-04-15 16:52:19 +00:00
Andy Wickham 9f7e434244 Fixes issue where back tutorial animation didn't always appear.
Specifically, when switching from right to left edge, the
animation disappeared. This change forces the animation
to restart whenever you switch to another tutorial.

Bug: 148542211

Change-Id: Ie74c636a4afd1018c7c8e6998a1e7a176bf8099e
(cherry picked from commit e725b6fe56)
2020-04-15 06:06:55 +00:00
Hyunyoung Song a613217bd0 Merge "Use UiEvent for constants inside StatsLogManager" into ub-launcher3-rvc-dev 2020-04-15 00:09:13 +00:00
TreeHugger Robot 08860aed19 Merge "Cache hotseat predictions" into ub-launcher3-rvc-dev 2020-04-14 23:36:34 +00:00
TreeHugger Robot c505a95aaf Merge "Fixing issue with removing tasks immediately after boot" into ub-launcher3-rvc-dev 2020-04-14 21:46:23 +00:00
TreeHugger Robot 04455cdf42 Merge "Trigger onTaskAppeared when a task started from recents becomes ready." into ub-launcher3-rvc-dev 2020-04-14 21:30:23 +00:00
Winson Chung 1c32f49199 Fixing issue with removing tasks immediately after boot
- Due to tasks only being loaded in the task list and not in the
  task hierarchy, ensure that we listen to the task list callback
  to invalidate the cached list as well.

Bug: 144892997
Change-Id: I0aa2ac0e629b8883410ebafbdc4ca2d5d9bc0fca
2020-04-14 21:03:40 +00:00
Hyunyoung Song 6b99a7d397 Use UiEvent for constants inside StatsLogManager
Bug: 137777105
Bug: 148533500
Change-Id: I8ebf1110e8d25ab28f7496add9734bd7386b272f
2020-04-14 13:59:31 -07:00
lumark 9494f58409 Trigger onTaskAppeared when a task started from recents becomes ready.
Launcher can now receive onTaskAppeared callback from
RecentsAnimationController to get remote animation target when in quick
switch mode.

Note: This CL just demonstrates how to receive callback and then
calling removeTask & finish recents animation,
in order to really improve quick switch flicking, launcher side needs
to implement the rest of logic to animate task's remote animation target
to make task switching more smoothly.

Bug: 152480470
Test: WIP
Change-Id: Id0371db7339cfe84942cc905a89b0a2c1fab62ec
(cherry picked from commit bec41bc5b9)
2020-04-14 20:51:40 +00:00
TreeHugger Robot a8c63ecb13 Merge "Revert regression where we no longer reverse translation for RTL" into ub-launcher3-rvc-dev 2020-04-14 18:07:26 +00:00
TreeHugger Robot c5d145f390 Merge "Change logged hotseat values for beta" into ub-launcher3-rvc-dev 2020-04-14 16:27:30 +00:00
Samuel Fufa 40846c6a35 Change logged hotseat values for beta
Bug: 153741765
Test: Manual
Change-Id: I8514264a2ea36809f6d3398c7aed4ca18e2d1a7f
2020-04-14 08:46:53 -07:00
Tony Wickham 08f9a5878d Don't scale workspace when going to all apps if ENABLE_OVERVIEW_ACTIONS
Before the two-zone model introduced with ENABLE_OVERVIEW_ACTIONS, we
scaled down the workspace when swiping up, since you could pause at
any time to go to overview (which has workspace scaled down behind it).
But in the two-zone model, that scaling is potentially confusing since
it looks similar to the HintState (when swiping from the nav bar).

Bug: 143361609
Change-Id: I3ee9f6eb45abb0123563d283a3145f27c3a63dd5
2020-04-14 10:24:24 -05:00
TreeHugger Robot ba45b6707c Merge "Show migrated items on the last page" into ub-launcher3-rvc-dev 2020-04-14 15:14:31 +00:00