Commit Graph

82 Commits

Author SHA1 Message Date
Winson Chung
3e562ca567 Use package context for loading task description icon resource
Bug: 73816146
Test: Manual, swipe up, ensure we still load icons
Change-Id: I21d39da5891e2f4cdf5427bcb03049ed05780c87
2018-03-27 10:48:37 -07:00
Matthew Ng
fba3969463 Remove quick switch and simplify quickstep code for scrub
Remove quick switch code and the concept of a threshold for starting
quickscrub from system ui. Quickscrub starts (and is sent to launcher)
after touch slop (in the direction parallel to nav bar) is passed.

Change-Id: I59fa25c9a9d50298adcf877590b3beee6d887308
Fixes: 73820325
Test: drag home button when quick step enabled
2018-03-22 14:40:03 -07:00
Sunny Goyal
040a10aabb Adding a empty constructor so that the class can be emulated
Test: N/A
Bug: 75979063
Change-Id: I21f168e25d1d4f3ef6fea9d13df3bc74bbe4e6f8
2018-03-20 15:55:36 +00:00
TreeHugger Robot
4cda02f25f Merge changes I0c466350,I09a9cd43,I8b2a0819 into pi-dev
* changes:
  Reset dummy stack view tasks after computing transition into Recents
  Don't update onboarding if there is no valid running task.
  Only check screen pinning state on touch down.
2018-03-20 00:16:57 +00:00
Winson Chung
4a088432b6 Reset dummy stack view tasks after computing transition into Recents
- Also clear up references from the app transition spec future to the
  parent implementation, which can also leak memory.

Bug: 73961798
Test: Enter recents, ensure that dummy stack view holds no task refs
Change-Id: I0c466350c1c1dd490f8776ca23f13de0d698e060
2018-03-19 15:20:29 -07:00
Tracy Zhou
43513086d2 Move default pip position to right above the shelf.
This change takes care of the flow from WindowManagerService to
PinnedStackController, all the way to PipTouchHandler. It also
introduces a WindowManager hook that allows Launcher to pass in
shelf visibility and height. A separate change is made to send
signals from Launcher to SysUI. (ag/3724896)

Bug: 73961893
Change-Id: I2ff54e78bc2dc35c806b902464048b051a4d6394
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerPinnedStackTests
2018-03-19 17:41:08 +00:00
TreeHugger Robot
6a9088e093 Merge changes from topic "centralize-quick-3s" into pi-dev
* changes:
  Fixes crash on navbar using 3rd party launchers
  Revert "Revert "Centralized quick step/scrub/switch logic (1/2)""
2018-03-15 00:53:19 +00:00
Jorim Jaggi
c175631670 Merge "Add ability to filter remote animation adapter by activity type" into pi-dev 2018-03-14 21:55:07 +00:00
Matthew Ng
2ea93b708d Revert "Revert "Centralized quick step/scrub/switch logic (1/2)""
This reverts commit 0e490d9208.

Reason for revert: Will be merged with fix
Bug: 74726495
Test: manual

Change-Id: I36ea9c2702107b23eff4adb1f3ba9fdc1be12999
2018-03-14 13:51:26 -07:00
Winson Chung
6d4bdc5381 Merge "Revert "Centralized quick step/scrub/switch logic (1/2)"" into pi-dev 2018-03-14 19:42:13 +00:00
Winson Chung
0e490d9208 Revert "Centralized quick step/scrub/switch logic (1/2)"
This reverts commit b06ae3bf13.

Reason for revert: b/74726495
Bug: 74726495

Change-Id: I4bce8df13f9fa9e1b420382f7a96f9855510196f
2018-03-14 19:41:16 +00:00
Jorim Jaggi
77be157a9e Add ability to filter remote animation adapter by activity type
Such that Launcher can choose not to use the remote animation
for assistant.

Test: Open assistant, close it
Test: go/wm-smoke

Bug: 72702760
Change-Id: Ib97cb5dd076afe5535e4e7951f423ccf9e78e720
2018-03-14 17:12:45 +01:00
TreeHugger Robot
d854d917ec Merge "Allow controlling SystemUI flags during RecentsAnimation" into pi-dev 2018-03-14 16:00:49 +00:00
Jorim Jaggi
50bf59ca0d Allow controlling SystemUI flags during RecentsAnimation
Such that the bars can flip from light/dark depending on animation
progress.

Test: go/wm-smoke
Test: Swipe up from light bar app
Test: WindowStateTests
Bug: 73498721
Change-Id: Ie4b99c75840474a01225720fcd7372191f035a3e
2018-03-14 15:11:52 +01:00
TreeHugger Robot
6852177153 Merge "Centralized quick step/scrub/switch logic (1/2)" into pi-dev 2018-03-14 04:54:24 +00:00
Matthew Ng
b06ae3bf13 Centralized quick step/scrub/switch logic (1/2)
Moved all the logic for quick step/scrub/switch to QuickStepController
so touch events can be used for deciding which gesture is used. Once a
gesture is decided, the rest will not handle the other gestures.

Quickstep will trigger when passing a touch slop on navigation bar. The
event onQuickStep (with a motion event) will be sent to launcher when
this occurs telling it that systemui is not handling anymore motion
events. During quickstep motion events will still be proxied.

Used raw X and Y motion events for Opalayout and KeyButtonView so that
the moving over the touch slop can be detected to ignore button (long)
press state.

Fixes: 73971902
Fixes: 74456391
Test: swipe up
Change-Id: I40b931aa0a9f123b810ff9206c9b1ce040a68a56
2018-03-13 17:21:22 -07:00
TreeHugger Robot
70d4ddece8 Merge "Passing the TaskDescription to the IconLoader" into pi-dev 2018-03-13 03:14:59 +00:00
Winson Chung
4aee38fd01 Merge "Expose whether a snapshot is a real snapshot" into pi-dev 2018-03-12 20:34:07 +00:00
Sunny Goyal
308ed7266c Passing the TaskDescription to the IconLoader
Bug: 74445840
Test: Verified corresponding launcher change
Change-Id: I82a7d595aa0c128b50a699d7ac2ba688dc3cec9f
2018-03-12 11:36:35 -07:00
TreeHugger Robot
82bc5baeb5 Merge "Adding generation of ACTION_TOGGLE_RECENTS to shared lib" into pi-dev 2018-03-12 18:13:16 +00:00
Vadim Tryshev
2f4d2af93a Adding generation of ACTION_TOGGLE_RECENTS to shared lib
Bug: 72967764
Test: atest google/perf/app-transition/sysui-latency-test, watch for 1_*
entries in output

Change-Id: I0bfaa46df4f3167687099742cb3063e88dab30ae
2018-03-09 19:15:56 -08:00
TreeHugger Robot
fe700fc694 Merge "Adding isNotInRecents to RemoteAnimationTarget" into pi-dev 2018-03-10 01:11:27 +00:00
Vadim Tryshev
593e9567fd Adding isNotInRecents to RemoteAnimationTarget
For animations required by Recents, we calculate whether the task is
going to be presented in Recents UI.

Bug: 70789568
Test: Manual: swipe a normal app to Recents; swipe an app with a
      half-screen assistant on top of it to Recents.

Change-Id: I1ec9c36865dd4f57e843ae58811f90f3096365a5
2018-03-09 14:00:32 -08:00
Winson Chung
f3e412e502 Expose whether a snapshot is a real snapshot
- This allows launcher to distinguish between a real snapshot and an app
  theme snapshot, which it will decorate differently.

Bug: 72809891
Test: atest com.android.server.wm.TaskSnapshotPersisterLoaderTest
Change-Id: Ia94591ab83ef312556f138cf11398cc5680ad798
2018-03-09 13:34:41 -08:00
TreeHugger Robot
8b4b86981c Merge "Tapping overview button when quickstep enabled shows overview" into pi-dev 2018-03-08 03:51:17 +00:00
Matthew Ng
8a8c89ce40 Tapping overview button when quickstep enabled shows overview
This is the systemui side of showing launcher's overview when it decides
to allow users to trigger overview with the overview button in the
navigation bar when quickstep is enabled.

Test: manual - tap overview button in nav bar
Bug: 67957962
Change-Id: I0d59d60d4b4ce1df9dcf2a745f9a5efd415b8582
2018-03-07 17:49:17 -08:00
Anton Hansson
d137c872cd frameworks/base: Set LOCAL_SDK_VERSION where possible.
This change sets LOCAL_SDK_VERSION for all packages where
this is possible without breaking the build, and
LOCAL_PRIVATE_PLATFORM_APIS := true otherwise.

Setting one of these two will be made required soon, and this
is a change in preparation for that. Not setting LOCAL_SDK_VERSION
makes the app implicitly depend on the bootclasspath, which is
often not required. This change effectively makes depending on
private apis opt-in rather than opt-out.

Test: make relevant packages
Bug: 73535841
Exempt-From-Owner-Approval: Global cleanup
Change-Id: I26458e41ecb84de91ac9a356a5d4bafb44f463c1
2018-03-07 11:42:04 +00:00
TreeHugger Robot
dd33df2393 Merge "Prevent nav bar vibrations when overview proxy is connected (1/2)" 2018-03-03 00:36:28 +00:00
Matthew Ng
64543e668f Prevent nav bar vibrations when overview proxy is connected (1/2)
Systemui can control when to allow vibrations on virtual key vibrations
on key down when overview proxy service is connected. This prevents
vibrations from KeyButtonView when swiping up over a navigation button.
This gives more control over haptics to systemui so that in the future
launcher can send haptic feedback when quick step begins.

Bug: 73919295
Bug: 73942704
Test: swipe up from navigation bar
Change-Id: I5de2a6f199d7e08b4d146e729f4b9c89b2adcded
2018-03-02 12:12:59 -08:00
Matthew Ng
390d75277a Removing depreciated fn isLockToAppEnabled in ActivityManagerWrapper
Removing function isLockToAppEnabled in favor of isScreenPinningEnabled.

Test: manual
Bug: 72799389
Change-Id: I532d6bd0aed37ae2526b6ce516015643b5e94514
2018-03-01 11:53:44 -08:00
Matthew Ng
6ff33b7f53 Fixes set lock task (and screen pinning) state with/out quickstep
When quickstep is enabled, ensures that the home button is gone when
locked to task without home access and prevents quickstep when overview
access is disabled. When quickstep is disabled, fixes recents visibility
according to overview access. Also prevent screen pinning after locking
task to app.

Bug: 72799389
Fixes: 73886663
Test: manual - use quickstep when locked to task
Change-Id: Iacfa0b12374217511602cee6c2ca5ceafd6e2964
2018-02-28 13:47:06 -08:00
Winson Chung
c1674270b5 1/ Fixing docked task animation when entering split screen from home
- Update the minimized state when docking an app from home to ensure that
  the animation of the docked task goes to the right bounds
- Temporarily block the invocation of the old recents activity when showing
  recents as a part of setting the windowing mode of another task (this is
  fine right now because quickstep only allows docking via the UI and not
  from the nav bar while another task is open).
- Add proto field so we can determine whether to check the recents activity
  from the split screen CTS tests
- Also fix issue with invisible docked task due to wrong bounds calculated
  due to launcher not notifying the divider of the first docked frame

Bug: 73118672
Test: go/wm-smoke
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerSplitScreenTests
Test: atest CtsActivityManagerDeviceTestCases:ActivityManagerTransitionSelectionTests

Change-Id: Ib1208501c311de009a9e706103134865c521cb63
2018-02-27 16:49:30 -08:00
Sunny Goyal
af42c8427a Extrating out icon generation logic so that it can customized
Test: Created jar and varified launcher is works properly
Change-Id: Ic07083d6394bb65d857b665fd86fa67f6323ed7b
2018-02-23 12:41:36 -08:00
Jason Monk
1fc931a38a Switch to inline mockito for a bunch of tests
So we can mock final stuff

Test: The tests
Change-Id: Ia3a47c6655c4b0b9af0aea0ee6f8f6cb9ebaab09
2018-02-18 13:02:25 -05:00
Matthew Ng
8f25fb96e2 Add more controls for launcher to control sysui
Added a 4 flags to control the state of system ui:
1. Disable swipe up navigation (prevents motion events going through)
2. Disable quick scrub (& step)
3. Show overview button (hidden by default)
4. Hide back button (shown by default)

Test: manual
Bug: 67957962
Bug: 70180755
Change-Id: Ibc44af9bbdfa9611688fe12285a999d81b8287e9
2018-02-14 15:27:37 -08:00
Winson Chung
c4e062015d Adding hit target hint from SysUI to launcher to defer recents animation
Bug: 73242451
Test: Swipe up over back with suitable launcher build and ensure that we
      don't start the recents animation on touch down

Change-Id: I3022ced8803caf9555efdbd9681c8ee2e627a216
2018-02-13 18:36:50 -08:00
Winson Chung
f64d2ec247 Merge "Fix several issues with RecentsAnimation" 2018-02-13 23:23:04 +00:00
Winson Chung
ddf6297579 Fix several issues with RecentsAnimation
- Prevent starting the recents animation while an app transition is already
  set, if the animation was canceled before the pending start animation
  could be processed, or if there are truly no visible tasks to animate
- Fix case where we were improperly cleaning up the recents animation if it
  was canceled while initializing. In particular we need to move the
  initialization out of the constructor for the cancel logic to work
  (which checks for a non-null controller before cleaning up). Similarly
  we were posting the timeout runnable after the initialization of the
  recents animation, even if that resulted in the animation being canceled.
  Instead, post it before initialization to ensure that canceling the
  animation will also remove the timeout.

Bug: 72953248
Test: Introduce artificial delay when starting recents animation such that
      it happens after starting an activity

Change-Id: Ie0ec37038822f28327e789e7e5a3c4c36f945ff9
Signed-off-by: Winson Chung <winsonc@google.com>
2018-02-13 10:54:41 -08:00
Sunny Goyal
2f1f06cbf2 Merge "Adding utility method to check the current home app" 2018-02-13 17:46:56 +00:00
Sunny Goyal
8b361d918e Adding utility method to check the current home app
Test: Verified the libary with Launcher
Change-Id: I37c0c0a6c74484e6a34497168d841e4a92207b5b
2018-02-12 10:16:13 -08:00
Winson Chung
58bd439042 Fix issue with quick switch animation not running.
- We were intercepting touch before the quickscrub controller had a chance
  to handle the touch, which meant that we canceled the recents animation
  before passing the quick switch event to launcher.  Instead, just move
  the cancel recents animation logic to the key button view (before
  handling up) and ensure that we intercept from the button only in the
  cases we desire (a quick switch/scrub, recents animation start, or if
  it's a dock drag (not currently enabled).

Test: Fling on the nav button to quickswitch, ensure recents animation
      runs

Change-Id: Id89fda56f2996a38a9aea99179b5e2870b531003
2018-02-09 12:35:49 -08:00
Winson Chung
4965884784 Fix issue with quickswitch happening after recents animation starting
- When the animation starts, prevent quickswitch until the next gesture
  starts
- Refactor recents animation started signal into the gesture helper to
  simplify the code in the nav bar view

Bug: 67957962
Bug: 70180755
Bug: 73080940
Test: Quick scrub on nav bar

Change-Id: I718d3e64c14569e5df2e6a0ffc1aecdb0125f54f
Signed-off-by: Winson Chung <winsonc@google.com>
2018-02-08 13:39:19 -08:00
Winson Chung
bc88614abe Merge "Revert "Revert "Exposing content insets and minimized home bounds for recents transition""" 2018-02-08 17:06:48 +00:00
Narayan Kamath
945356ac0f Merge "SystemUI: Remove obsolete dependency on android.car." 2018-02-08 12:40:53 +00:00
Winson Chung
584d652a1d Revert "Revert "Exposing content insets and minimized home bounds for recents transition""
This reverts commit bb5d97f00f.

Reason for revert: Launcher APK is landing shortly.

Test: Manual, swipe up to home in multi-window

Change-Id: I5d9050e51265bd4ca5ea2c28b7533571d03990f7
2018-02-07 17:51:29 -08:00
Winson Chung
0ee9c0db54 Merge "Revert "Exposing content insets and minimized home bounds for recents transition"" 2018-02-07 18:39:20 +00:00
Winson Chung
bb5d97f00f Revert "Exposing content insets and minimized home bounds for recents transition"
This reverts commit 67f31199fb.

Reason for revert: Need to wait for the Launcher drop at EOD today

Change-Id: I039cd3092d786c62a88f599eb79c0704c6257981
2018-02-07 18:30:40 +00:00
Winson Chung
bcaeb104c2 Merge "Exposing content insets and minimized home bounds for recents transition" 2018-02-07 17:34:50 +00:00
Tony Wickham
05c1f854ad Get swipe up onboarding text from launcher
Launcher sends the text when binding to the overview service,
which stores the text for when it needs to be shown.

Also renamed some files and strings to be more generic

Test: install launcher with updated text and ensure it is shown

Bug: 72999860
Change-Id: I5998ab8867754d877f954673e03e5faf44b606ed
2018-02-06 17:28:44 -08:00
Winson Chung
67f31199fb Exposing content insets and minimized home bounds for recents transition
- In order to calculate the final target rect and window clip for the
  app currently transitioning into the task view in launcher (similar to
  how we did in SysUI), we need to provide the content insets and bounds
  for both the app and launcher (whose activity may not yet have been
  shown).  For the existing recents transition, this was calculated
  internally in the AppTransition aspect-scaled transition, but now that
  we are implementing this via remote animations, the same information is
  needed in the implementation of the recents animation runner.

Bug: 70294936
Test: Swipe up from launcher with window transitions when in multi window
Change-Id: I2afc6bdfe112cc7bb1b07ba65213653f6f0634f9
2018-02-06 16:15:41 -08:00