Commit Graph

13211 Commits

Author SHA1 Message Date
Tracy Zhou
8089ffaced Pass the captured snapshot data to Launcher when recents animation is
cancelled.

In the current implementation, when recents animation is cancelled due
to stack order change, window manager replaces the surface with a
snapshot before cancellation. Launcher needs to acquire the snapshot in
order to switch the live tile into snapshot mode, and yet because the
recents animation is cancelled, that snapshot can no longer be acquired
anymore. This change takes care of this "relay" process.

Fixes: 138683199
Test: N/A
Change-Id: I1c11af38c2bdc442e3b45d0b5f0c7e7e37c2b0f0
2019-08-11 17:00:38 +00:00
Qasid Sadiq
0dd1be75c3 Merge "The source of subtree chagnes should be the viewParent" 2019-08-07 18:46:51 +00:00
TreeHugger Robot
d1845aa160 Merge "Add GPU draw stats to gfxinfo and GraphicsStatsService" 2019-08-06 21:45:20 +00:00
Adrian Roos
304f75603b GestureNav: Log exclusion rect heights am: 5f2c9a14f5 am: fde134f106
am: e4b2440287

Change-Id: If3f626a85dcf93482ad580e93c1c5b49299fd78f
2019-08-05 14:43:57 -07:00
Adrian Roos
fde134f106 GestureNav: Log exclusion rect heights
am: 5f2c9a14f5

Change-Id: I6b72f4b68773a21575296601f5545746d012524e
2019-08-05 14:17:15 -07:00
Adrian Roos
5f2c9a14f5 GestureNav: Log exclusion rect heights
Logs the rejected and requested exclusion rect heights.

Test: adb shell device_config put android:window_manager key_system_gesture_exclusion_log_debounce_millis 1000
Bug: 135152789
Change-Id: Ie12640f4bf0a8b40b666e604188a0bedd85e8981
Exempt-From-Owner-Approval: DeviceConfig.java: Adding constant to WindowManager namespace.
2019-08-05 21:19:40 +02:00
Jorim Jaggi
5534e159c1 Merge "Fix overlapping remote and recents animations" into qt-r1-dev am: b248a0343f am: dd40a0c75a
am: c7b3ff1c52

Change-Id: Iaba42814773ab7333aae3fbc90d3bbd2ea8bac87
2019-08-05 12:01:12 -07:00
Jorim Jaggi
dd40a0c75a Merge "Fix overlapping remote and recents animations" into qt-r1-dev
am: b248a0343f

Change-Id: I103ff225bbf69e6945cb90430130ae233dd6cb9f
2019-08-05 11:39:05 -07:00
Jorim Jaggi
b248a0343f Merge "Fix overlapping remote and recents animations" into qt-r1-dev 2019-08-05 18:12:56 +00:00
Jorim Jaggi
589c5ba0fa Fix overlapping remote and recents animations
Test: Open app and immediately swipe up while opening. Verify
Thread prioties in systrace

Test: WindowProcessControllerTests
Fixes: 137881181
Change-Id: Ic1d7403d2a648e6f1d1b6a3d55b56bf37bc57a2c
2019-08-05 17:10:18 +02:00
TreeHugger Robot
f80171ef5c Merge "Dispose InputChannel when dispose InputEventReceiver" 2019-08-05 05:28:21 +00:00
TreeHugger Robot
b4cbc8ad29 Merge "Prevent SurfaceView from drawing over parent surface insets" 2019-08-03 00:56:09 +00:00
Vishnu Nair
8cb00aee22 Prevent SurfaceView from drawing over parent surface insets
Parent SurfaceView to a bounds layer that enforces a crop preventing it
from drawing over the surface insets. The bounds layer crop is set to the
surface insets and updated when the parent surface size changes or the
parent surface insets change.

The SurfaceView has a z order relative to the ViewRootImpl surface so
that it can be behind or in front of the main content. If the ViewRootImpl
surface changes, then SurfaceView takes advantage of the
ViewRootImpl.SurfaceChangedCallback to update the relative z order.

Bug: 132205507
Test: go/wm-smoke
Test: test preserve surfaces code path with split screen and ensure relative z is preserved
Test: test SurfaceView apps, YouTube, maps & camera.
Test: try to repro maps pip issue described in bug
Change-Id: I0b2a3612b7e12ba66abb39b6bad4968442743cdd
2019-08-02 15:20:51 -07:00
Abodunrinwa Toki
d311e06c5b Merge "Ensure userId is set in TCEvent." 2019-08-02 15:41:04 +00:00
Adrian Roos
47dc37d983 Merge "GestureNav: Clarify javadoc in regards to exclusion limits" into qt-dev am: c9f4bcae57 am: dbab020f04 am: 6344ea3020
am: 7dd171b9af

Change-Id: I4bceb19da7534f649ee4ee4065b3a74058ebd05a
2019-08-02 06:16:09 -07:00
Adrian Roos
6344ea3020 Merge "GestureNav: Clarify javadoc in regards to exclusion limits" into qt-dev am: c9f4bcae57
am: dbab020f04

Change-Id: Ia21ae36cf8c244af8d56027e7a251daa303bc6f0
2019-08-02 05:52:49 -07:00
Adrian Roos
dbab020f04 Merge "GestureNav: Clarify javadoc in regards to exclusion limits" into qt-dev
am: c9f4bcae57

Change-Id: I3ae8a19bd59ede69caae781f47dd05865a07cd7a
2019-08-02 05:42:27 -07:00
Adrian Roos
91ce40fa1a Merge "GestureNav: Clarify javadoc in regards to exclusion limits" into qt-dev
am: c9f4bcae57

Change-Id: I0581305f01ebdaa121ce0e70ab9d44f142c9f99f
2019-08-02 05:42:10 -07:00
Adrian Roos
c9f4bcae57 Merge "GestureNav: Clarify javadoc in regards to exclusion limits" into qt-dev 2019-08-02 12:17:11 +00:00
Stan Iliev
7203e1f55a Add GPU draw stats to gfxinfo and GraphicsStatsService
Test: ran dumpsys with gfxinfo and graphicsstats
Change-Id: Id9950de87dc4343c6878baa6a6dd42fbc8aeddef
2019-08-01 18:53:21 +00:00
Artur Satayev
70507ed5a1 Add @UnsupportedAppUsage annotations for max-p.
See go/UnsupportedAppUsage for more details.

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 137350495
Test: m
Change-Id: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
2019-08-01 19:46:29 +01:00
Abodunrinwa Toki
1480ed10ed Ensure userId is set in TCEvent.
Part of security fix in I2fdffd8eb4221782cb1f34d2ddbe41dd3d36595c

TCContexts that existed outside a TC session did not have userId
set by the SystemTC. This CL ensures SystemTC always sets the
userId for all TCEvents (and deprecated SelectionEvents).

Bug: 136483597
Test: atest android.view.textclassifier
      Manual test ensuring that ConvActions was logging TCEvent with
      userId.

Change-Id: Ie2a362f8f4758d5dc0390aeb2dbf23f9d78a378e
2019-08-01 15:26:19 +01:00
TreeHugger Robot
cf695aabfd Merge "Move InputMethodSytemProperty to server from client." 2019-08-01 00:41:25 +00:00
Adam He
2eaec69928 Merge "Implement AssistStructure.ViewNode.getHintIdEntry()." 2019-07-30 21:32:27 +00:00
TreeHugger Robot
2b551ea603 Merge "Add cursor position to synthesized events." 2019-07-30 16:38:09 +00:00
Garfield Tan
1da8628ae3 Add cursor position to synthesized events.
Synthesized events consist of injected, split and clamped events.
Instead of letting caller specify it, we fill cursor position fields by
deriving from pointers. Thus we can maintain the property between
pointer coodinates and cursor position. If there is need we can add a
new obtain method later as well anyway.

I decided to update the value for split events because it would be
unnatural to have a out of bound cursor position when a gesture crosses
view boundaries, but ultimately we probably shouldn't split mouse
events. Nevertheless that's out of the scope of this CL and I chose to
be on the safe side at this moment.

Bug: 134788085
Bug: 136607870
Test: atest TooltipTest#testMouseHoverTooltipWithHoverListener
Test: atest MotionEventTest (and select running all candidates)
Test: atest DragDropTest
Change-Id: I4f3dec0f3c4c1ab2ff5cb986b94b0e007d9fe41b
2019-07-30 09:22:27 -07:00
John Reck
aa712c5d4b Merge "Fix ReliableSurface to be more reliable" 2019-07-29 19:40:55 +00:00
John Reck
59dd2ea974 Fix ReliableSurface to be more reliable
Handle TIMED_OUT better by rescheduling (TODO: give up after N
attempts?)

Fix SYNC_SURFACE_LOST_REWARD_IF_FOUND path to actually go fetch
a new surface.

Bug: 137509524
Test: Injected errors randomly, verified nothing got permanently dead.
Change-Id: Id30f8ad1dd7196041ee84c16c8cf5c814002a6ce
2019-07-26 16:58:37 -07:00
Adrian Roos
e6feb7d198 GestureNav: Clarify javadoc in regards to exclusion limits
Bug: 124518180
Test: m checkapi
Change-Id: I43b0b890a763e339deb246cabf9adbf011eae088
2019-07-26 14:50:03 +02:00
Arthur Hung
12a06ce6ea Dispose InputChannel when dispose InputEventReceiver
There would be an error if an InputChannel didn't be disposed before
finalized. The client InputChannel created by ViewRootImpl or SystemUI
that would also create an InputEventReceiver to receive input events, and hold
the client InputChannel, so if the InputEventReceiver is going to be disposed,
the InputChannel should be disposed as well.

Test: manual
Bug: 128679213
Change-Id: I24c16f032403e8a982a84a5e0adbfabcdc016f0f
2019-07-26 19:14:17 +08:00
Vadim Caen
ef4e1cea9b Do not call drawableChanged pre Q
Some apps rely on not updating the window format when changing the
background of the DecorView. To keep the compatibilty with these app we
add only call DecoreView.drawableChanged() when the window background is
changed on app targetting Q and above.

Test: Manually test by lunching Instagram TV and pressing return twice.
The window should aninate with no flickering.
Bug: 136987724

Change-Id: I3593d30dc6f10519008151974e475f0dad86fc64
2019-07-25 15:25:19 +02:00
Vadim Caen
d6aa056512 DO NOT MERGE Do not call drawableChanged pre Q am: 843f9dee8b
am: 2106ef79ad

Change-Id: Ic5ceb704346deb38d1151f0e1fdc79fbb28ff82d
2019-07-24 16:38:48 -07:00
Vadim Caen
605e74c930 DO NOT MERGE Do not call drawableChanged pre Q
am: 843f9dee8b

Change-Id: I813f41905386da06e6eaebd6b7f85c17a6051456
2019-07-24 16:19:39 -07:00
Vadim Caen
2106ef79ad DO NOT MERGE Do not call drawableChanged pre Q
am: 843f9dee8b

Change-Id: Id54fa3b2327faec88c936228109643c8425eeb2a
2019-07-24 16:17:49 -07:00
Vadim Caen
843f9dee8b DO NOT MERGE Do not call drawableChanged pre Q
Some apps rely on not updating the window format when changing the
background of the DecorView. To keep the compatibilty with these app we
add only call DecoreView.drawableChanged() when the window background is
changed on app targetting Q and above.

Test: Manually test by lunching Instagram TV and pressing return twice.
The window should aninate with no flickering.
Bug: 136987724

Change-Id: I3593d30dc6f10519008151974e475f0dad86fc64
2019-07-24 21:29:12 +00:00
Winson Chung
df69ae467a Merge "Modify deferred recents animation cancel to work without screenshot" into qt-r1-dev am: 48e3cfc06a am: 932a656359
am: 71626be681

Change-Id: Ie5636139863163d42788314c0e8ca0c946a80ae1
2019-07-24 00:33:54 -07:00
Winson Chung
932a656359 Merge "Modify deferred recents animation cancel to work without screenshot" into qt-r1-dev
am: 48e3cfc06a

Change-Id: Id491b61fc851779bd398c5113a306ce1c89181dc
2019-07-23 22:24:38 -07:00
Winson Chung
7a545ae9cc Modify deferred recents animation cancel to work without screenshot
- Allow the recents animation runner to request deferring a cancel from
  stack order change until the next app transition start without using
  a screenshot. This allows launcher to set this state, then start an
  activity without a flash due to the animation not finishing immediately
- Always prepare a transition when using the deferred cancel to ensure
  an app transition callback
- Handle app transition canceled as well (if canceled, we continue to
  cancel recents the animation with/without the screenshot as requested)
- Remove internal lock and use the global WM lock when setting the defer
  cancel state
- Renamed a few methods to clarify the deferred cancel flow

Bug: 137196872
Test: atest FrameworksServicesTests:RecentsAnimationControllerTest
Test: atest WmTests:RecentsAnimationTest
Change-Id: Ie8f6f60b6bf6777e36f24749b30f90c8c26ee848
2019-07-23 15:50:33 -07:00
Vishnu Nair
3b037f7250 Consolidate ViewRootImpl callbacks for SurfaceView
Use ViewRootImpl surface created and destroyed callbacks to set window stopped state
and update the SurfaceView visibility accordingly.

Bug: 132205507
Test: go/wm-smoke
Change-Id: Ie43e3cc81729a153e36fffbefe242d78d8e38222
2019-07-22 12:56:54 -07:00
Vishnu Nair
49230c4277 Add surface changed callbacks to ViewRootImpl
Allow SurfaceView to be notified when the ViewRootImpl surface changes, is created or
destroyed. The callbacks include a SurfaceControl Transaction object which can be used to
synchronize SurfaceControl changes by the system.

In particular, the transaction will be used to update the relative z order of the SurfaceView
surface when the ViewRootImpl surface changes. WMS is responsible for providing ViewRootImpl a
new surface as well as reparenting its children (SurfaceViews). The transaction will be applied by
the service when it is ready to show the new surface, synchronizing the reparenting with the
relative z update.

Bug: 132205507
Test: go/wm-smoke
Change-Id: Ie5aed430d09cc6d3a0a99f618094b3a50dbaa5cc
2019-07-22 12:56:54 -07:00
TreeHugger Robot
faaa4e62b9 Merge "IWindowSession.Default is not available" 2019-07-22 12:10:25 +00:00
Adam He
d55b16e73e Implement AssistStructure.ViewNode.getHintIdEntry().
Bug: 135134274
Test: atest CtsAutoFillServiceTestCases
Test: atest android.contentcaptureservice.cts.unit.ViewNodeTest
Change-Id: I7154cf97a5236ad975bd774c29b30e055cfca8bd
2019-07-19 15:33:51 -07:00
Tarandeep Singh
07b318bdfc Move InputMethodSytemProperty to server from client.
Moving InputMethodSystemProperty from android.view.inputmethod to
com.android.server.inputmethod so that it can be accessed only from
the system_server.

Change-Id: I41707a4e5dfe824cbe9e873ec598762d36c64c09
Fix: 137203823
Test: Build and flash
2019-07-18 11:30:17 -07:00
Jackal Guo
73715ca6c3 Merge "Add new APIs to support RegionInScreen in A11yWindowInfo" 2019-07-17 06:43:45 +00:00
Jackal Guo
f382371d77 Add new APIs to support RegionInScreen in A11yWindowInfo
To support non-rectangular visible area for windows, add new APIs
about RegionInScreen in A11yWindowInfo to represent the actual
interact-able area of a window.

Bug: 132146558
Test: a11y CTS & unit tests
Change-Id: I86bb6bc8c567e09f01a3f853a3cffd896ce934c8
2019-07-17 10:57:09 +08:00
Adrian Roos
66e52c79cd Merge "GestureNav: make reportSystemGestureExclusionChanged oneway" into qt-dev am: d4a50e6e72
am: 7c77af6371

Change-Id: I3de6ae14483976dc659fb5aadbedae2f2f8dc00c
2019-07-16 15:09:17 -07:00
Adrian Roos
374faa663c Merge "GestureNav: make reportSystemGestureExclusionChanged oneway" into qt-dev
am: d4a50e6e72

Change-Id: I6cedb58112f475f46d0b8caafb0824aacc9a3825
2019-07-16 15:00:35 -07:00
Adrian Roos
7c77af6371 Merge "GestureNav: make reportSystemGestureExclusionChanged oneway" into qt-dev
am: d4a50e6e72

Change-Id: I9f837989727c263517aa0d2f3dfd47a830f6170c
2019-07-16 15:00:35 -07:00
Adrian Roos
e6911497de GestureNav: make reportSystemGestureExclusionChanged oneway
When the WindowManager lock is contended, reportSystemGestureExclusionChanged can cause
jank. Making it oneway avoids this.

Fixes: 137650591
Test: make droid
Change-Id: I5d96b7e2225745b146014ad11cafaf0ad9a1b734
Merged-In: I5d96b7e2225745b146014ad11cafaf0ad9a1b734
2019-07-16 20:29:03 +00:00
Adrian Roos
2dccd145d3 GestureNav: make reportSystemGestureExclusionChanged oneway
When the WindowManager lock is contended, reportSystemGestureExclusionChanged can cause
jank. Making it oneway avoids this.

Fixes: 137650591
Test: make droid
Change-Id: I5d96b7e2225745b146014ad11cafaf0ad9a1b734
2019-07-16 17:58:15 +00:00