Commit Graph

14741 Commits

Author SHA1 Message Date
TreeHugger Robot
9b8510327e Merge "Pass window type to the InputWindowHandle of embedded window" into rvc-dev am: 0e58daf022 am: 64015d9f80 am: 2c6f9b7d6b am: 28013344c8
Change-Id: I1cd208e92579df9831a5aed083ce9bcd5f3fd57a
2020-05-15 16:05:16 +00:00
TreeHugger Robot
ec463ead03 Merge "Remove divider view when exiting splitscreen" into rvc-dev am: 3a6ec37a71 am: 9da5177ac9 am: 1453c98f03 am: 79f1e50e2a
Change-Id: Ic6d26f278251a0eec16d026a264f9175fcd74836
2020-05-15 16:02:36 +00:00
TreeHugger Robot
28013344c8 Merge "Pass window type to the InputWindowHandle of embedded window" into rvc-dev am: 0e58daf022 am: 64015d9f80 am: 2c6f9b7d6b
Change-Id: I61f88b963ebd405f1e60dd9536a851519e3bf4b0
2020-05-15 15:45:52 +00:00
TreeHugger Robot
79f1e50e2a Merge "Remove divider view when exiting splitscreen" into rvc-dev am: 3a6ec37a71 am: 9da5177ac9 am: 1453c98f03
Change-Id: I1c99b595c1025c986de7827b45e9d028173313a0
2020-05-15 15:44:11 +00:00
TreeHugger Robot
0e58daf022 Merge "Pass window type to the InputWindowHandle of embedded window" into rvc-dev 2020-05-14 08:32:00 +00:00
arthurhung
d3f17d7df7 Pass window type to the InputWindowHandle of embedded window
A windowless SurfaceControl could grant input via
IWindowSession.grantInputChannel, but other window may receive the
obscured events because of the type value of input window is always 0.

The obscured or partially obscured flag indicates that the window
received this motion event is wholly or partially obscured by another
visible window above it.

We have to filter out the trusted overlap so the motion event could
properly dispatch to the view if it is a security sensitive application.

Bug: 156063505
Test: enter split window mode and check the motion event
Change-Id: I10f63ea131a70ee8cc7d5c4b3e5ca4e5f06fdbad
2020-05-14 11:59:23 +08:00
TreeHugger Robot
3a6ec37a71 Merge "Remove divider view when exiting splitscreen" into rvc-dev 2020-05-14 02:25:24 +00:00
TreeHugger Robot
8c510436bb Merge "SurfaceView: positionLost locking fix" into rvc-dev am: bff3812e82 am: f19bd92daf am: 32cdfa7563 am: 6a9370151a
Change-Id: I8348ac9835bded022092cd098ec824ba0d8dddba
2020-05-13 23:12:59 +00:00
TreeHugger Robot
6a9370151a Merge "SurfaceView: positionLost locking fix" into rvc-dev am: bff3812e82 am: f19bd92daf am: 32cdfa7563
Change-Id: I286e82ba4fed89034d5c503cc972b7b93d8dd0a8
2020-05-13 22:50:11 +00:00
TreeHugger Robot
bff3812e82 Merge "SurfaceView: positionLost locking fix" into rvc-dev 2020-05-13 22:04:58 +00:00
TreeHugger Robot
d1e91dda51 Merge "Fix inline suggestion ref counting to not over-count" into rvc-dev am: 730fb0d97d am: 7c30f15869 am: 3890fc3bef am: 4f3e3795f0
Change-Id: Id9a1526e777cf0d0c4a0ee00db367cfac331b23a
2020-05-13 21:52:38 +00:00
TreeHugger Robot
3890fc3bef Merge "Fix inline suggestion ref counting to not over-count" into rvc-dev am: 730fb0d97d am: 7c30f15869
Change-Id: I38518dc99f8315ab43b2d03f0a000d6c3376b2e0
2020-05-13 21:12:00 +00:00
TreeHugger Robot
730fb0d97d Merge "Fix inline suggestion ref counting to not over-count" into rvc-dev 2020-05-13 20:58:15 +00:00
Feng Cao
723ba2e82b Fix inline suggestion ref counting to not over-count
* Imagine this event sequence:
  1) the IME tries to re-attach an inline suggestion view to the
  window (e.g. because IME layout changes), it calls into the system
  server which causes recreating the backing view because it was
  destroyed earlier due to 0 ref-count (this happens under the hood
  without IME knowing it happens, so the view is still attached to
  the window).
  2) the IME receives a new inline suggestion pointing to the same
  backing view (perhaps due to filtering kicks in).
  3) the recreation from step 1 finishes, but now it will callback
  to the new inline suggestion, therefore the old view doesn't receive
  the new SurfacePackage. See RemoteInlineSuggestionUi for why.
  4) the view in step 1 is detached from window, since it never
  receives a SurfacePackage from the remote view, its detach shouldn't
  cause a reference count down on the remote view.

Test: atest android.autofillservice.cts.inline (sanity test)
Bug: 154683107

Change-Id: I2e6814ef3889de603f6e170efcb795b69ec9febe
2020-05-13 11:55:58 -07:00
Robert Carr
ebaaca1a46 SurfaceView: positionLost locking fix
positionLost can be called from CanvasContext::destroyHardwareResources
which runs asynchronously to the UI thread. This means we could be
simultaneously executing releaseSurfaces on the UI thread. We need
to expand the scope of mSurfaceControl lock in positionLost. While
we are here we add a block comment explaining the previously
undocumented locking strategy.

Bug: 156264048
Test: Existing tests pass
Change-Id: I9cdb6a0f7aeffd878f1755f240e8896f0fb8bf01
2020-05-13 18:29:59 +00:00
TreeHugger Robot
bce80d78fa Merge "Increase content capture buffer size to 500 Anecdotally this should cover typical messaging first screens whereas 100 events seems to be small." into rvc-dev am: 8ae0cfe36b am: b22a5298d7 am: 561eadaeca am: 513faa3609
Change-Id: I6af17cc24bcd3a0258e699d4e69bb5b2ce0e9afc
2020-05-13 02:46:47 +00:00
TreeHugger Robot
b22a5298d7 Merge "Increase content capture buffer size to 500 Anecdotally this should cover typical messaging first screens whereas 100 events seems to be small." into rvc-dev am: 8ae0cfe36b
Change-Id: Iddd15ad16e66e04674dd9a41a0c5236571ad18b9
2020-05-13 02:03:03 +00:00
TreeHugger Robot
8ae0cfe36b Merge "Increase content capture buffer size to 500 Anecdotally this should cover typical messaging first screens whereas 100 events seems to be small." into rvc-dev 2020-05-13 01:57:06 +00:00
Treehugger Robot
208b8afff0 Merge "Fix 'associated' javadoc typos" am: 3fd2c5c435 am: 2e789841a4 am: 67efc10f9d am: 881fcd8caa am: f7ec34e017
Change-Id: Ic06f8e3251b7916a66725c1b6fe1da311fe5e20d
2020-05-13 00:00:32 +00:00
Treehugger Robot
67efc10f9d Merge "Fix 'associated' javadoc typos" am: 3fd2c5c435 am: 2e789841a4
Change-Id: Iddb5675dced31eacb2cbffb76377eb6e3097655f
2020-05-12 23:07:26 +00:00
Julian Odell
82c92bcf3c Increase content capture buffer size to 500
Anecdotally this should cover typical messaging first screens
     whereas 100 events seems to be small.

Test: make -j
Test: Manually start WhatsApp - check for lost events
Bug: 154777879
Change-Id: I3090584ec03714656948045189e0e0c068740c82
2020-05-12 23:02:55 +00:00
Treehugger Robot
2e789841a4 Merge "Fix 'associated' javadoc typos" am: 3fd2c5c435
Change-Id: I2d94f1a8a7a2a9d811c122123012273900857c47
2020-05-12 22:52:35 +00:00
TreeHugger Robot
51822d01df Merge "Add OWNERS for display, haptics, input and power" into rvc-dev am: f30c225fcb am: 1e3fe956cf am: 689486059f am: 4623e80530
Change-Id: I80f338fc23ef80f544bc33d169f262346ab17786
2020-05-12 22:31:13 +00:00
TreeHugger Robot
f30c225fcb Merge "Add OWNERS for display, haptics, input and power" into rvc-dev 2020-05-12 20:17:39 +00:00
TreeHugger Robot
4f434f1e82 Merge "Fix cts fail for android.autofillservice.cts.augmented" into rvc-dev am: a76f65614e am: 8e04eab6fd am: 52b512a027 am: 81c09c975f
Change-Id: I308eebac4806c6bb78fb50ac15e5b26da43304d4
2020-05-12 18:49:37 +00:00
Michael Wright
2e7e81c950 Add OWNERS for display, haptics, input and power
Bug: 156349083
Test: N/A
Change-Id: Ia8afccfc2e470095ae3d52c827c0ac78b7c120ae
2020-05-12 19:11:13 +01:00
lpeter
8e815316dd Fix cts fail for android.autofillservice.cts.augmented
In the test we trigger the manual autofill request programmatically,
because the focus isn't on the field, we will not get the callback
from IME.
It would be better not to ask IME for inline request if the request
is manual and the view is not focused because it's a simpler/safer
approach and manual request without focus should be rare.

Bug: 154661868
Test: atest CtsAutoFillServiceTestCases
Change-Id: I783b2542094cdea547ebd58ce89f30d9cd421708
2020-05-12 13:47:54 +00:00
Riddle Hsu
5b198db82d Merge changes from topic "b147213487" into rvc-dev am: 8e726a2ef7 am: 2d42c72f14 am: bd9a3d97c6 am: 9f1ad6529f
Change-Id: Icaff9e75d20f5c9b5ae0b1afddb5985576bf9019
2020-05-12 10:13:03 +00:00
Riddle Hsu
8e726a2ef7 Merge changes from topic "b147213487" into rvc-dev
* changes:
  Send fixed rotation adjustments to the associated client
  Add support to override display adjustments by token
  Add fixed rotation display adjustments
2020-05-12 09:05:17 +00:00
TreeHugger Robot
5a13d7be11 Merge "Provide a fixed transform hint if the layer is in a fixed orientation 2/2" into rvc-dev am: db5201d3ab am: a5014e1435 am: 2b5a43c341 am: 593cd4f3f7
Change-Id: Iff95173ca314d983d705d249400c5a81207e7c4c
2020-05-12 00:56:26 +00:00
TreeHugger Robot
db5201d3ab Merge "Provide a fixed transform hint if the layer is in a fixed orientation 2/2" into rvc-dev 2020-05-11 23:51:56 +00:00
Rob Carr
a18d4c7699 Merge "BLASTBufferQueue: Fix two conditions leading to freeze." into rvc-dev am: 85c13cf111 am: 8fa7ea91ba am: 2e4b6107a0 am: 8b67d0546a
Change-Id: I7593cb1f04585d35a438680dac4aef0e0ddc170d
2020-05-11 22:13:17 +00:00
Rob Carr
85c13cf111 Merge "BLASTBufferQueue: Fix two conditions leading to freeze." into rvc-dev 2020-05-11 21:46:19 +00:00
Josh Tsuji
1cd14df3de Merge "Add TYPE_TRUSTED_APPLICATION_OVERLAY." into rvc-dev am: 6282ff9bc2 am: 934882c88c am: 5483aba99b am: ccaab92b2a
Change-Id: I8bdf0394eb2049ffb6186b4df6d63f06345da48e
2020-05-11 21:18:36 +00:00
Josh Tsuji
6282ff9bc2 Merge "Add TYPE_TRUSTED_APPLICATION_OVERLAY." into rvc-dev 2020-05-11 20:24:34 +00:00
Vishnu Nair
eb53e52395 Provide a fixed transform hint if the layer is in a fixed orientation 2/2
The transform hint is used to prevent allocating a buffer of a
different size when a layer is rotated. The producer can choose to
consume the hint and allocate the buffer with the same size.

Provide the graphic producer a transform hint if the layer and its
children are in an orientation different from the display's
orientation. The caller is responsible for clearing this transform
hint if the layer is no longer in a fixed orientation.

Bug: 152919661
Test: atest VulkanPreTransformTest
Test: confirm with winscope trace, buffers are allocated taking into
account the transform hint in fixed orientation scenarios
Test: go/wm-smoke

Change-Id: I2ccc21ed8af015716e6cdfde1e3cec67c99f3339
2020-05-11 13:19:59 -07:00
Riddle Hsu
d490c57905 Send fixed rotation adjustments to the associated client
So the real information of display can be adjusted according
to the adjustments for the application started with fixed
rotation transform.

The enabling adjustments may be sent in different ways:
- Launch activity
  The information is bundled with LaunchActivityItem.
- Resume activity or update non-activity window
  Send a standalone FixedRotationAdjustmentsItem.

The disabling adjustments (null) are always sent by
FixedRotationAdjustmentsItem.

Bug: 147213487
Test: AppConfigurationTests#testRotatedInfoWithFixedRotationTransform
      TransactionParcelTests#testFixedRotationAdjustments

Change-Id: I5238888a5c8352db83fc12749f4de2bfabf46026
2020-05-11 22:17:03 +08:00
andrewlewis
5b075b8f2a Fix 'associated' javadoc typos
Change-Id: I4ff16ec3d6bd1d98bb04b647a38f12af87286a5e
2020-05-11 11:57:25 +00:00
Charles Chen
d4b479ad3d Merge "Add WindowMetricsHelper" into rvc-dev am: 5681f3e796 am: 8a1786f075 am: a02900fbf1 am: 242f71725b
Change-Id: I9558dc4196f1ffb9481b5c0330a401afdfc9acd6
2020-05-11 10:57:46 +00:00
Charles Chen
5681f3e796 Merge "Add WindowMetricsHelper" into rvc-dev 2020-05-11 10:17:37 +00:00
TreeHugger Robot
b8cba99992 Merge "Fix consumer closed input channel cause an error occurred (1/2)" into rvc-dev am: 488cd2c4ff am: c215136282 am: e88e03a02b am: ff239c5896
Change-Id: I749343e2685847e43060c59c0082014799bc4508
2020-05-11 07:16:24 +00:00
TreeHugger Robot
488cd2c4ff Merge "Fix consumer closed input channel cause an error occurred (1/2)" into rvc-dev 2020-05-11 05:56:35 +00:00
Riddle Hsu
ca70b01302 Add fixed rotation display adjustments
If an activity is launched with fixed rotation transform,
its window layout and configuration will be rotated. But
if it gets real information from the display, the values
(getRotation, getRealSize, getRealMetric, getCutout) are
inconsistent with the actual appearance.

This change provides the basic information to adjust the
returned values.

Bug: 147213487
Test: atest DisplayAdjustmentsTests#testFixedRotationAdjustments
Change-Id: I864d5759f41209d5f93c4a9011b720675c25e765
2020-05-11 13:30:14 +08:00
TreeHugger Robot
d81c9085f2 Merge "Make sure AmbiguousGestureMultiplier could start from 1" into rvc-dev am: 47059f7654 am: 3e24612818 am: b4cbed28e6 am: e38d71d745
Change-Id: I6238f7bb2eddd7e552a37b9d207258bea3338932
2020-05-11 03:58:18 +00:00
TreeHugger Robot
47059f7654 Merge "Make sure AmbiguousGestureMultiplier could start from 1" into rvc-dev 2020-05-11 03:08:31 +00:00
Vishnu Nair
4880a30fe0 Remove divider view when exiting splitscreen
Remove and re add divider view as needed so we do not allocate memory
while split screen is not active. Also release surface reference from
server when we are done with the SurfaceControl so we don't have to rely
on GC to remove the last reference.

Fixes: 150190730
Test: test split screen manually, check for offscreen or onscreen
divider layers in winscope

Change-Id: I1a6a1c1d4346aafeae85aaf61ec4df23722e75ab
2020-05-08 18:10:47 +00:00
Chris Ye
8ffd02ac9c Merge "Represent VelocityTracker Strategy as enum class." 2020-05-08 17:58:39 +00:00
Tiger Huang
249640ebb2 Merge "Prevent unnecessary updateRequestedState" into rvc-dev am: d8bb9b4dd8 am: 84e4c327db am: 647abf7832 am: 9a81ced1d1
Change-Id: I9c2c3620f886f314d233f56feafbd55308fc6b7d
2020-05-08 14:20:53 +00:00
Tiger Huang
d8bb9b4dd8 Merge "Prevent unnecessary updateRequestedState" into rvc-dev 2020-05-08 13:37:42 +00:00
Joanne Chung
c59a504b0d Merge "Prevent crash when AutofillManager.isEnabled() is called" into rvc-dev am: cdbd09bbcf am: aef6672fe9 am: 64f8a5e3ae am: e67d2a24c4
Change-Id: Iae5ee07e5bd10b61bbebd3fc66523552c994ce13
2020-05-08 11:17:55 +00:00