Commit Graph

102 Commits

Author SHA1 Message Date
Mehdi Alizadeh
eb914118f4 Merge "Adds SettingsCompat to mirror settings names used in Launcher" into pi-dev 2018-04-13 04:33:23 +00:00
TreeHugger Robot
6dfad28bed Merge "Exposing activity type in targets so that we can handle home activity differently" into pi-dev 2018-04-13 02:32:38 +00:00
Mehdi Alizadeh
501ff41a52 Adds SettingsCompat to mirror settings names used in Launcher
Bug: 77732469
Test: verify it builds
Change-Id: I2d0dee714a7d5eb59f189302d97414f3117a624b
2018-04-12 19:05:38 -07:00
Sunny Goyal
c5b69b8b91 Exposing activity type in targets so that we can handle home activity differently
Test: Verified library with launcher
Bug: 77830202
Change-Id: I072013725190aced116093808029973b278ed263
2018-04-12 18:10:40 -07:00
Tracy Zhou
0ad27632ca Move QuickStep onboarding strings from Launcher to SysUI
Test: N/A
Bug: 70180942
Change-Id: Ic3bd63899017f23c011a41a7a5a9e73a87b9eec1
2018-04-12 11:23:17 -07:00
Sunny Goyal
3eb4d642c1 Fixing missing reportDrawFinish method in windowCallbacksCompat
Test: Verified on launcher that there is no ANR
Bug: 77695434
Change-Id: I1c382ea24fee15835637ed9d4055161a99ff3625
2018-04-11 11:30:26 -07:00
Sunny Goyal
788800c7cd Adding a compatibility implementation for WindowCallbacks
Test: Verified the library with launcher changes
Bug: 77695434
Change-Id: Id1c051896b542cb582c778c7c7709191f7a7957f
2018-04-10 16:19:01 -07:00
TreeHugger Robot
cfccbf9106 Merge "Workaround fetching user's package resources" into pi-dev 2018-04-10 04:36:29 +00:00
Winson Chung
d9635968e6 Workaround fetching user's package resources
Bug: 77747389
Test: Manual, create work profile user, create an apk with an icon resource
      in its task description, and ensure that launcher can load the icon.

Change-Id: I33c7eaca9481fe44440b4b584b64531835e2fe9e
2018-04-09 18:38:32 -07:00
Sunny Goyal
9159850734 Exposing the getHomeActivities() to allow the launcher detect the current home app
Test: Build and verified the lib with Launcher3
Bug: 75979063
Change-Id: I77c2b2178030e083336b2e51ee850f5753f03aba
2018-04-09 12:02:39 -07:00
Jorim Jaggi
4c1453ac45 Merge "Early wake-up for transitions (2/2)" into pi-dev 2018-04-06 21:44:28 +00:00
Jorim Jaggi
e4428857d3 Add ThreadedRendererCompat for Launcher use
Bug: 75985430
Change-Id: Ia9a7c68cdff8a3263aa75f1178cb90bf4cf6f3de
2018-04-06 12:12:19 +00:00
Jorim Jaggi
aa763cd35f Early wake-up for transitions (2/2)
On some devices it's very likely that we fall into GL comp during
app transitions. However, SF offsets are chosen in a way such that
the time to finish a frame is just too tight to be completely jank
free when hitting GL composition in SurfaceFlinger. Thus, we
introduce the concept of a separate early offset, and wakeup
SurfaceFlinger at that time if we think that hitting GL comp is
likely, or we already hit GL comp in the last frame.

Test: Open app, check vsync offsets in systrace
Test: Open many dialogs/apps to fall into GPU comp.
Bug: 75985430
Change-Id: I461fdcd573583f3ea0348c8b23cc9945d33f8976
2018-04-06 13:36:14 +02:00
TreeHugger Robot
4b436a930d Merge "Fix issue with quickstep recents button not unlocking before entering PIP." into pi-dev 2018-04-05 23:34:35 +00:00
Sunny Goyal
5067909efa Adding a utility method to show Assist session
Bug: 72122079
Test: Verified the library works with launcher
Change-Id: Ic1e9131687ea85fdcce16c71054ce7940c190504
2018-04-04 14:41:42 -07:00
TreeHugger Robot
e81e6faf08 Merge "Added two touch slops for easier home press (1/3)" into pi-dev 2018-04-03 22:31:57 +00:00
Matthew Ng
9a22363a50 Added two touch slops for easier home press (1/3)
The first slop starts the drag either for quick step or scrub. At this
point either launcher can animate swipe up or the home button moves for
scrub, however the home button is still active and can be pressed or
long pressed. The second slop is for activating quick step or scrub.
Similar to before when an operation has activated, the home button
cannot be pressed or long pressed. This allows the home button to have a
larger area to be clicked.

Change-Id: I0a3dd2b5e0f41748a7ba9ebb6241283291995228
Fixes: 76430825
Test: scrub or swipe up
2018-04-03 13:34:59 -07:00
Winson Chung
e3dd59c86a Fix issue with quickstep recents button not unlocking before entering PIP.
Bug: 77152886
Test: Lock the screen with any show-over-lockscreen activity, then press
      the recents button, ensure you are prompted to unlock

Change-Id: Iaa402c8c0fbf743c3410882a888a487d45085fa5
2018-04-02 16:32:15 -07:00
Winson Chung
f557c3b565 Allow recents animation to override divider minimized state
- When swiping up while in split-screen, the animation should be able to
  adjust the docked divider minimized state so that we don't wait until
  launcher is repositioned to the front in order for the divider to
  update.

Bug: 73118672
Test: Enter split screen, swipe up and ensure the dock divider moves
      (Note, there are still unrelated clipping issues)

Change-Id: Id71f91eaf2f06b3c33628a2199cc94c82e235471
2018-03-30 10:25:16 -07:00
Winson Chung
6a38fca2d8 Prevent unnecessary reordering of the home stack
- Just cancel the recents animation in-place when handling the home button
  to prevent it from being repositioned to the bottom (which stops home)
  and then starting it again (which restarts it)

Bug: 74405472
Test: Press home from an app, ensure launcher stop is only called once
Change-Id: Id41aa2f77c01767cc2c35445458b8f2db81200fc
2018-03-30 10:25:09 -07:00
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