Commit Graph

34 Commits

Author SHA1 Message Date
Winson Chung
317ee507c2 Revert "Nav icons and quick step states are determined by service enabled"
This reverts commit 8a7c97a16d.

Reason for revert: b/77566214

Bug: 77566214

Change-Id: Iba3ef20a304e3a47f1affe0b38598c7d7f0daef7
2018-04-04 15:17:00 +00:00
Matthew Ng
8a7c97a16d Nav icons and quick step states are determined by service enabled
When the device quickly changes states (such as language or font size),
it would disconnect and then reconnect the service and as a result a
flash of the nav buttons will occur. Since the nav bar is connected to
launcher service unless 3rd party launchers are used, that should
determine if the icons should change or quick step should be
enabled/disabled instead of if there is a connection. Also hold the last
interaction flags and apply on startup until service is disabled (using
3rd party launcher).

Test: go to settings and change the font size under display
Change-Id: Ibebc8c3f8493574dd21774bd292c2096cfdad469
Fixes: 74199057
Fixes: 73483047
Fixes: 72225004
2018-04-02 16:45:34 -07:00
TreeHugger Robot
4565da3da7 Merge "Fixes OpaLayoutTest to pass by adding SysuiTestCase (1/2)" into pi-dev 2018-03-29 20:09:42 +00:00
Matthew Ng
10b6c41a76 Fixes OpaLayoutTest to pass by adding SysuiTestCase (1/2)
Copied SysuiTestCase to systemui Google to be able to inflate
KeyButtonView that is dependent on StatusBar. Also fixed the connection
failure catch exception when proxy cannot connect to service in tests.

Test: atest com.google.android.systemui.OpaLayoutTest
Change-Id: Ica2a894ce92e06af30c208afcc6a22adeac3a843
Fixes: 76416916
2018-03-28 16:27:28 -07:00
Matthew Ng
c1a97b12fe Opalayout can check quickstep icons without needing navbarview (1/2)
Opalayout should not need NavigationBarView to determine if the icon
should be for quickstep icons. It does not need to know if recents is
disabled because of lock tasks and so the check is now in
OverviewProxyService. Then when Opalayout needs to layout the home
button it should be able to get the information regardless if
NavigationBarView is available or not.

Bug: 76210393
Fixes: 76434966
Fixes: 74071465
Test: change language in settings

Change-Id: I246175c3e2d5c990da6823df4108d48522b258bd
2018-03-28 15:54:08 -07:00
Sunny Goyal
09c12d743b Using an intent-action instead of a fixed compoenent for quick-step service
Bug: 76856007
Test: Verified everything builds and works
Change-Id: Ia8258356f84edc9fddc9ac1d2787ffde25c2ecf0
2018-03-27 10:15:26 -07: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
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
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
Matthew Ng
1b1d346b35 Creating new user correctly connects to the system OverviewProxy
When creating a new user, it creates a new OverviewServiceProxy which
connects to launcher instead of the system user version. Since the new
proxy does not have any callbacks connected to it, launcher cannot send
any data to change systemui. Preventing the new proxy from connecting
allows the original to connect.

Test: manual, create new user, wait for connection, play with quick step
Change-Id: I0838fe8294c7a3ee89062c0c9855caf5ab52482b
Fixes: 74001992
2018-03-02 11:43:38 -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
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
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
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
Matthew Ng
09e6fbde50 Fixes overview connecting to correct launcher when changing users
When switching users, it would always connect to the system user's
launcher because the user was gained incorrectly so the new user would
lose its recents button and other issues may occur. Getting the actual
user fixes it to connect to the current user's launcher.

Bug: 67957962
Test: change users
Change-Id: If49b9bea3920242c2653913b127ac65a16c13b92
2018-02-01 16:56:45 -08:00
Winson Chung
caf2b81186 Expose call to start screen pinning on a task.
Bug: 70294936
Test: Manual
Change-Id: I7b8a079b928a9a8bf887aab7ae0bd6f93ac9d7e4
2018-01-26 11:22:09 -08:00
Winson Chung
cbb15a9963 Revert "Revert "4/ Update SysUI shared lib for Recents transition""
This reverts commit f6401c0284.

Reason for revert: Testing relanding changes with ag/3515280

Change-Id: Ibb8d4868fe2cc1053b528ed757bd3ec1f9c10355
2018-01-25 13:45:22 -08:00
Jorim Jaggi
f6401c0284 Revert "4/ Update SysUI shared lib for Recents transition"
This reverts commit 9f6ba8df3b.

Breaks presubmits
2018-01-25 15:21:18 +01:00
Winson Chung
9f6ba8df3b 4/ Update SysUI shared lib for Recents transition
- Ensures that we cancel the recents animation when handling touch
- Moving InputConsumerController to shared lib
- Add compat classes for recents controller/listener

Bug: 70180552
Test: Manual, swipe up with suitable launcher build
Change-Id: Ib57ea73ff75545b91922df188ffb7152e9d4cebd
2018-01-24 19:20:21 -08:00
Tony Wickham
fb63fe85f2 Add swipe up onboarding from apps
After launching 3 apps, we create a window at the bottom
attached to the nav bar to teach users to swipe for recents.
There is an X on this window to dismiss it, but we will keep
showing the onboarding every time they open apps until they
perform the swipe up action.

Test: manual

Bug: 70180942
Change-Id: I4b15fac918b7b1633a3c09ab0819f2acb1dce697
2018-01-23 16:02:27 -08:00
Matthew Ng
bd8245718d Added logging for OverviewProxyService
Added debug logs for OverviewProxyService. Use "OverviewProxyService" as
the tag to get logs. The logs cover all of the binder calls from
IOverviewProxy.adl.

Test: manual
Bug: 67957962
Change-Id: Ia46848e54683fc1aacdb633644b5161c1ac58b16
2018-01-17 17:05:43 -08:00
Matthew Ng
c361fa1963 Reconnect overview service to launcher when its package name changes
Listen for broadcast intent filter ACTION_PACKAGE_ADDED to reconnect the
connection from overview to launcher.

Test: manual - enable/disable feature from launcher settings
Bug: 67957962
Change-Id: Ic069498ec2036bcb6ab6d95002d5c34027395360
2018-01-08 12:50:27 -08:00
Winson Chung
11f53e9683 Minor optimizations to task loading/screenshot
- Pass graphic buffer instead of bitmap for current screenshot
- Add option to skip preloading titles
- Adding some more compat classes

Bug: 67510855
Test: Build quickstep

Change-Id: Idf4642683d3121e69f0854ac909a8c22c7238b9a
2017-11-16 09:41:46 -08:00
TreeHugger Robot
38ca5ccb6a Merge "Dump the overview proxy service information" 2017-11-15 00:52:21 +00:00
Matthew Ng
1e43ebdda7 Dump the overview proxy service information
Dumps into the dependency chain of its number of connection attempts, if
user has completed setup and if the connection is currently established.

Test: adb shell dumpsys activity service com.android.systemui
Bug: 67957962
Change-Id: I1d5ffc51f99f08c21495d51a32a103ab8fed757c
2017-11-14 14:49:13 -08:00
Matthew Ng
30c0a02075 Listen for launcher package added to connect to it faster
When launcher is reinstalled, it may take time for it to get ready and
to reconnect to. If not available immediately it would try to connect it
later after a timeout. Instead of waiting, receive a broadcast when it
gets installed to connect immediately.

Test: manual - reinstall launcher
Bug: 67957962
Change-Id: I1e531db9646d11a1eae99abe46d5e6f852c5eeda
2017-11-10 16:29:30 -08:00
Matthew Ng
fac8783159 Fixes the connection listener wrong thread crash for overview proxy
Sending connection callbacks from binder thread crashes any layouts
called from the listener. Use the original handler to post connections
to fix this crash.

Bug: 67957962
Test: manual, reinstall launcher to re-establish the connection
Change-Id: I958d86346c41cbf1e9a0dc8bdeae957ec64f8a55
2017-11-10 11:40:16 -08:00
TreeHugger Robot
d9db81bb10 Merge "Reconnect service when disconnected by launcher reinstall" 2017-11-10 04:09:08 +00:00
Matthew Ng
eb6893b4c8 Reconnect service when disconnected by launcher reinstall
When launcher is reinstalled, the current service is disconnected, now
reconnect it. Also added some unlinking with the death recipient.

Bug: 67957962
Test: manual, reinstall launcher
Change-Id: Id776948df50ce27de9e73037573be1e7eac989f5
2017-11-09 17:31:20 -08:00
Matthew Ng
7d05e77d5b Remove add slippery flag to nav bar when connected to launcher service
Added a listener for OverviewProxyService to get updates when the
service is connected to the launcher so that the nav bar can toggle the
slippery flag to allow more touch inputs after dragging out of the it.

Bug: 67957962
Test: manual
Change-Id: Ib1ebaec318252021fa986ec554136f19d61126f8
2017-11-09 15:33:57 -08:00
Winson Chung
38d31c211b Provide interface to temporarily fetch screenshot.
Bug: 68774229
Test: Build nexus launcher and verify we can call to get the screenshot
Change-Id: I6a5456efca94f45cda000fe9e097ec524540592b
2017-11-08 15:03:19 -08:00
Matthew Ng
dfab86cd67 Fixes connecting to service after setup finishes for other users
Changed event to connect to launcher service using onUserSetupChanged
instead of onDeviceProvisionedChanged since it does not run when other
users finish setup wizard.

Test: manual - create new user and finish setup, check connection status
Change-Id: I37d55b6089ebddb0bd2ab9e5d0e0bb3fa8d73948
Fixes: 68994491
2017-11-07 15:46:51 -08:00
Matthew Ng
1fa3f7eebc Fixes service disconnect crash when changing users
Changing users crashes system ui because service disconnected from
unprovisioned user that had no connection. Fix by always disconnecting
if connected before trying to connect to service. Requires follow up
change to have new provisioned user to connect to service.

Change-Id: I350ec45b90fa297c6ffe4932325c3b07653538f3
Fixes: 68929438
Test: manual
2017-11-07 11:50:36 -08:00
Matthew Ng
13dbf878bd Started code to pipe overview events and info to launcher
The first event will have navigationbar send its x and y touch events
with no delay (upon vsync) to launcher so that launcher can detect and
animate a drag gesture.

If the user has provisioned setup, the connection between overview to
launcher service will be establish to send any information as a proxy
through binder calls. Connection will be reattached if device switches
between users. Each failure to connect to launcher service will have an
exponential backoff timeout to reconnect.

To implement call Dependency.get(OverviewProxyService.class) and then
getProxy() to get the proxy to pipe events or other information across
to launcher.

Test: manual
Bug: 67957962
Change-Id: I3828474147c37b2c514a682f9124e29a5e142736
2017-11-02 15:45:45 -07:00