Commit Graph

94 Commits

Author SHA1 Message Date
Sunny Goyal
0c477a8143 Merge "Adding a empty constructor so that the class can be emulated" into pi-dev am: eb37b9cbb0
am: b1d8f2bf06

Change-Id: Ib29f7b6020508368a555b82046776c79fca78818
2018-03-20 21:46:48 +00: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
Winson Chung
e465160c0c Merge changes I0c466350,I09a9cd43,I8b2a0819 into pi-dev am: 4cda02f25f
am: 9dcc7b982b

Change-Id: Id79f409381fa6b211329ef85b13cd7f4202dccb0
2018-03-20 06:40:24 +00:00
Tracy Zhou
8002e7f96c Merge "Move default pip position to right above the shelf." into pi-dev am: 017f44be88
am: 6f9ebab4ed

Change-Id: I65e587befec2dcba43b95fe6c6d8775a918fd332
2018-03-20 00:34:39 +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
Matthew Ng
f3ba484f6a Revert "Revert "Centralized quick step/scrub/switch logic (1/2)"" am: 2ea93b708d
am: 838386fbcb

Change-Id: Ib97ad4ae875d021dca9dbe71d4f95a3245474f94
2018-03-15 01:26:11 +00:00
Matthew Ng
838386fbcb Revert "Revert "Centralized quick step/scrub/switch logic (1/2)""
am: 2ea93b708d

Change-Id: Iea566c5e83acf561ac4112b0f594f965a7056097
2018-03-15 01:10:06 +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
7d872a74cc Merge "Merge "Add ability to filter remote animation adapter by activity type" into pi-dev am: c175631670" into pi-dev-plus-aosp
am: 79cbe6f986

Change-Id: I47c482f63121b7cbf50ec6ee76e18a7719ecde23
2018-03-14 23:02:39 +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
a77468496d Merge "Revert "Centralized quick step/scrub/switch logic (1/2)"" into pi-dev am: 6d4bdc5381
am: 5fe2c73450

Change-Id: I2a8aa287a71001221c00d51a1934ac0ea05b3d51
2018-03-14 20:13:07 +00: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
acb0c9f116 Merge "Allow controlling SystemUI flags during RecentsAnimation" into pi-dev am: d854d917ec
am: 7fc78d6c2a

Change-Id: Ic57ff6a3469520d250da3e29a8c96f45bc255186
2018-03-14 16:37:14 +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
Matthew Ng
240013f884 Merge "Centralized quick step/scrub/switch logic (1/2)" into pi-dev am: 6852177153
am: f71f5780fe

Change-Id: Ic1ec902e064cd9d6493c534638b4c386a8fba803
2018-03-14 05:27:52 +00: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
Sunny Goyal
a6023c5523 Merge "Passing the TaskDescription to the IconLoader" into pi-dev am: 70d4ddece8
am: 65c325a483

Change-Id: I9b18f3d94ed768a8c690d2a731dd8bb8037dbdb8
2018-03-13 06:41:03 +00:00
TreeHugger Robot
70d4ddece8 Merge "Passing the TaskDescription to the IconLoader" into pi-dev 2018-03-13 03:14:59 +00:00
Winson Chung
fc4eb903ca Merge "Expose whether a snapshot is a real snapshot" into pi-dev am: 4aee38fd01
am: 8f819832c0

Change-Id: Id90d6ce58d4c0f105756eb974fd64b5ae2eb002c
2018-03-12 23:27:58 +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
Vadim Tryshev
67a9abf4ad Merge "Adding generation of ACTION_TOGGLE_RECENTS to shared lib" into pi-dev am: 82bc5baeb5
am: 2eedba70d4

Change-Id: I8282727838e637421d35eaf4a023c721436bee85
2018-03-12 20:01:58 +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
TreeHugger Robot
4c2ef0271a Merge "Move display id into MotionEvent" 2018-03-12 18:02:43 +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
Siarhei Vishniakou
85ddfffd2f Move display id into MotionEvent
Display id is now part of MotionEvent.

Test: atest view.MotionEventTest view.KeyEventTest
Bug: 64258305

Change-Id: Ifadd6b34f4dd5a91669baf146daa62944d1de974
2018-03-06 11:53:07 -08: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