Commit Graph

10045 Commits

Author SHA1 Message Date
Rob Carr
198aa2bcda Merge "SurfaceView: Correct inverted alpha detection condition." into oc-dev am: 3946916d56
am: 8296054d4e

Change-Id: Iaf35647355f48300199d888eb884a23750c0059b
2017-06-07 00:03:51 +00:00
TreeHugger Robot
d131f19c50 Merge "Add new haptic feedback constant for virtual key release." 2017-06-06 21:35:51 +00:00
Robert Carr
851e7e4394 SurfaceView: Correct inverted alpha detection condition.
Careless mistake on my part :). Sorry about that.

Test: Try an app with two SV like Netflix verify top SurfaceView doesn't occlude bottom one.
Bug: 62375611
Bug: 62113351
Change-Id: Ia33aabf8b8e276f70365d62b82f113ecd3bee2fa
2017-06-06 14:04:50 -07:00
Bryce Lee
906fdb24e6 Merge "Coordinate configuration changes and window frame size." into oc-dev am: 749cbb1911
am: 42e95f8b54

Change-Id: I6ecf592612f5c9d54c37ae9df9525b2f9e14826d
2017-06-06 16:10:17 +00:00
Robert Carr
17c340bb8b Merge "Reinstate SurfaceView Background from N" into oc-dev am: 71044d6ba1
am: 6f0f995120

Change-Id: I69cf4465b8900abea6e4e803b0d2c1cd033a0635
2017-06-06 15:56:31 +00:00
Jeff Sharkey
ec68b46bc8 Merge "Annotate @SystemApi with required permissions." into oc-dev am: c1406978a4
am: 7a2e4a8486

Change-Id: Ib629e25dbf047c110feaf03e4ff744b5c6df9aeb
2017-06-06 15:48:24 +00:00
Bryce Lee
afb45bba83 Coordinate configuration changes and window frame size.
Previously, it was possible for the view hierarchy to be measured,
laid out, and drawn around a window frame size that did not match
the current configuration. This stems from new configurations not
always propagating back from WindowSession#relayout, which is
called from ViewRootImpl.

This changelist makes WindowManagerService#relayoutWindow always
return the latest configuration. It also adds rotation to the
configuration.

Fixes: 32839232
Test: go/wm-smoke
Test: Open Camera while rotating phone to landscape. Added
      temporary logs to detect inconsistencies between measurements
      and reported rotation on draw.
Change-Id: I39daca338b4f87eff1a509eb99493f01e710ced1
2017-06-05 20:55:46 -07:00
TreeHugger Robot
71044d6ba1 Merge "Reinstate SurfaceView Background from N" into oc-dev 2017-06-05 23:57:06 +00:00
Jeff Sharkey
d86b8fea43 Annotate @SystemApi with required permissions.
Most @SystemApi methods should be protected with system (or higher)
permissions, so annotate common methods with @RequiresPermission to
make automatic verification easier.

Verification is really only relevant when calling into system
services (where permissions checking can happen on the other side of
a Binder call), so annotate managers with the new @SystemService
annotation, which is now automatically documented.

This is purely a docs change; no logic changes are being made.

Test: make -j32 update-api && make -j32 offline-sdk-docs
Bug: 62263906
Change-Id: I2554227202d84465676aa4ab0dd336b5c45fc651
2017-06-05 13:27:11 -06:00
Winson Chung
e0e3512045 Merge "Workaround to ensure that PIP activities have a visible shadow." into oc-dev am: c3504d4f33
am: d288ca8d2d

Change-Id: I80aed8fd0d0a8573bd4b6cec7bf8c14878a0935c
2017-06-05 17:19:14 +00:00
TreeHugger Robot
c3504d4f33 Merge "Workaround to ensure that PIP activities have a visible shadow." into oc-dev 2017-06-03 20:41:18 +00:00
John Reck
92134759d5 Merge "Workaround glitches from SOFT_INPUT_ADJUST_PAN" into oc-dev am: a2f747c57c
am: 427eb020a6

Change-Id: I567e04d71350c8176a9b39f776fc3ba356c253fa
2017-06-03 01:19:57 +00:00
TreeHugger Robot
a2f747c57c Merge "Workaround glitches from SOFT_INPUT_ADJUST_PAN" into oc-dev 2017-06-03 01:01:26 +00:00
Winson Chung
4d8681ff6a Workaround to ensure that PIP activities have a visible shadow.
- When the window for the activity enters PIP, update the outline provider
  to override the alpha of the shadow (to be opaque) to ensure that is is
  visible.  Only applies to the task root activity.

Bug: 36741700
Test: Launch YT, ensure that there is a shadow when after it enters PIP
Test: go/wm-smoke
Test: android.server.cts.ActivityManagerPinnedStackTests

Change-Id: If089dae84e4916d3d0e7bbeb316215b46e522e05
2017-06-02 16:02:50 -07:00
John Reck
3e04f09136 Workaround glitches from SOFT_INPUT_ADJUST_PAN
Change-Id: I1ee0c7d434eb03667bd5e838ea891db73651a994
Fixes: 62073166
Test: Repro app in bug
2017-06-02 16:01:14 -07:00
Robert Carr
5523555293 Reinstate SurfaceView Background from N
In N we used a Dim-Layer to add a background to SurfaceView, from
the WM side. In O we forgot to reimplment this with the new SurfaceView
and so we once again can have holes for apps which don't implement
surfaceRedrawNeeded.

Bug: 62113351
Test: Manual from bug. go/wm-smoke
Change-Id: If3dac51886b9a8083140da7b5bc1b349da57860f
2017-06-02 14:21:03 -07:00
TreeHugger Robot
0ecc0ff5e0 Merge "Enable wide color gamut rendering" 2017-06-02 20:07:56 +00:00
Evan Rosky
b768493e55 Merge "Improve consistency in focusAfterDescendants behavior" into oc-dev am: 12ee4bd7a8
am: c0ff11a4c5

Change-Id: I5ededc798b40b3c4c5279bb253a885199c31a440
2017-06-02 18:16:51 +00:00
Michael Wright
e14b0647f1 Add new haptic feedback constant for virtual key release.
Test: None
Change-Id: I99cd2086b9f269ca3f3036c70304b0cb7c9369e9
2017-06-02 19:13:58 +01:00
Romain Guy
26a2b97dbe Enable wide color gamut rendering
When wide color gamut rendering is requested, hwui will now
use an rgba16f scRGB-nl surface for rendering. This change
also fixes the way screenshots are handled in the platform
to behave properly with wide gamut rendering.

This change does not affect hardware layers. They also
need to use rgba16f scRGB-nl; this will be addressed in
another CL.

Bug: 29940137
Test: CtsUiRenderingTestCases, CtsGraphicsTestCases

Change-Id: I68fd96c451652136c566ec48fb0e97c2a7a257c5
2017-06-02 11:02:13 -07:00
Evan Rosky
12ee4bd7a8 Merge "Improve consistency in focusAfterDescendants behavior" into oc-dev 2017-06-02 17:56:33 +00:00
Alan Viverette
8464e3101a Merge "Annotate test method visibility in WindowManager" into oc-dev am: 0b83588177
am: 35eb249ebb

Change-Id: I3d20aa3c99046b6185695f8e85f7a61474620d4d
2017-06-02 17:43:40 +00:00
TreeHugger Robot
0b83588177 Merge "Annotate test method visibility in WindowManager" into oc-dev 2017-06-02 17:26:54 +00:00
Evan Rosky
2ae1bf568b Improve consistency in focusAfterDescendants behavior
- focusAfterDescendant ViewGroups that were also clusters would
  continue to be remembered for restoreFocusedInCluster after
  gaining focusable children. This caused undesired cluster-focus
  loops
- focusableViewAvailable wasn't being called in all cases (specifically
  when views were added). This meant focusAfterDescendant views
  wouldn't transfer focus to children in some cases.
- 0-area views which became focusable weren't reporting
  focusableViewAvailable. Since views gaining area doesn't report
  focusableViewAvailable, this was another case of state change not
  being accounted for. Also, this restriction doesn't exist for
  gaining focus so these views are actually focusable despite having
  0 area.
- focusableViewAvailable was reporting focusable views even when
  ancestors (and therefore the new focusables) were not visible.
- restoreFocusNotInCluster tried to focus invisible views
- restoreFocusNotInCluster was sending focus to focusAfterDescendant
  viewgroups which had focusable children IN a cluster.

Bug: 38010274
Bug: 38009598
Bug: 38352147
Test: cycling works in situations reported in bugs.
      Added CTS tests around focusableViewAvailable and
      FOCUS_AFTER_DESCENDANTS

Change-Id: I77f214f5384dcf9092324e08fc1daa3f1155bbad
2017-06-01 20:50:01 +00:00
TreeHugger Robot
92d89fd7f4 Merge "Expose hidden apis used by CTS as TestApi" 2017-06-01 15:00:05 +00:00
Phil Weaver
61c67c14c2 Merge "Use correct default value for host view." 2017-06-01 01:18:36 +00:00
TreeHugger Robot
b376954167 Merge changes from topic 'master_hw_bitmaps'
* changes:
  Updating AnimationSpec and related internal APIs to use GraphicBuffer.
  Update code to draw into hardware bitmaps.
2017-05-31 21:31:41 +00:00
Felipe Leme
a1a4599878 Merge "Don't automatically autofill when manual request returned just 1 dataset." into oc-dev am: d8d9758363
am: 4e26aa3622

Change-Id: I5697f766a83a3a3d4092f66df58e3a2ed0958435
2017-05-31 21:14:08 +00:00
TreeHugger Robot
d8d9758363 Merge "Don't automatically autofill when manual request returned just 1 dataset." into oc-dev 2017-05-31 20:43:20 +00:00
Felipe Leme
727889c774 Merge "Always post AutofillManager operations in the UI thread." into oc-dev am: 21999d2895
am: 614e88711a

Change-Id: Iba0f1aa39aa6d3781796231ad32e200be4557163
2017-05-31 19:29:38 +00:00
Alan Viverette
39259dd33c Annotate test method visibility in WindowManager
Change-Id: I36714b4eb39c937cc3c42fac604fd0fa9900ae47
Fixes: 62066862
Test: n/a
2017-05-31 15:06:09 -04:00
TreeHugger Robot
21999d2895 Merge "Always post AutofillManager operations in the UI thread." into oc-dev 2017-05-31 18:49:38 +00:00
Winson Chung
4e73123c52 Merge changes from topic 'hw_bitmap' into oc-dev
* changes:
  DO NOT MERGE Updating AnimationSpec and related internal APIs to use GraphicBuffer.
  Update code to draw into hardware bitmaps.
2017-05-31 18:46:59 +00:00
Winson Chung
a31922f5b1 Updating AnimationSpec and related internal APIs to use GraphicBuffer.
THIS IS A MANUAL MERGE OF ag/2311240 (PART 1)

- This reduces the copy of the hardware bitmap when it is
  parceled/unparceled.

Bug: 38507414
Bug: 62021436
Test: Launch Overview to/from app, ensure that the header bar shows
Test: go/wm-smoke
Change-Id: If644b18d7ca11569bd6544c7438b03ca13a9f0f4
2017-05-31 09:44:15 -07:00
Winson Chung
aa7fa01353 DO NOT MERGE Updating AnimationSpec and related internal APIs to use GraphicBuffer.
- This reduces the copy of the hardware bitmap when it is
  parceled/unparceled.

Bug: 38507414
Bug: 62021436
Test: Launch Overview to/from app, ensure that the header bar shows
Test: go/wm-smoke

Change-Id: I85a9a59a0a3699d1642158061d10fddef34393c3
Signed-off-by: Winson Chung <winsonc@google.com>
2017-05-31 16:23:24 +00:00
Vladislav Kuzkokov
bf9a8ca2b2 Fix against accessibility event callback calling itself.
Bug: 62102349
Change-Id: I35c13505c5fb7f0004bd2d3cba8db9850ada1060
2017-05-31 15:57:32 +00:00
Wale Ogunwale
9ff881ad72 Merge "Merge "Fix unnecessary relaunches when unlocking with fingerprint sensor." into oc-dev am: c6700cac67" into oc-dev-plus-aosp
am: 788e9bbb25

Change-Id: Iee76e75331358802cd8d1df14304748ad5066b6c
2017-05-31 04:22:18 +00:00
TreeHugger Robot
c6700cac67 Merge "Fix unnecessary relaunches when unlocking with fingerprint sensor." into oc-dev 2017-05-31 03:54:58 +00:00
Felipe Leme
9876a6fba9 Always post AutofillManager operations in the UI thread.
Test: existing CtsAutoFillServiceTestCases pass
Fixes: 62194407

Change-Id: If878b2befc03706c000b3f31b60904072b2225f4
2017-05-30 19:54:43 -07:00
Wale Ogunwale
bfa81adfbe Fix unnecessary relaunches when unlocking with fingerprint sensor.
When the device is unlocked using the fingerprint sensor in an
orientation opposite to the lockscreen orientation, the app that
will be visible is first relaunched in the current lockscreen
orientation and then later relaunched in the correct orientation.
If the keygaurd is going away then:
- Don't let keyguard affect device orientation. We want to use the
orientation of the app that will be visible.
- Allow the rotation sensor to be enabled even though draw isn't
complete so window manager can get the updated or last rotation
reading.
- Don't clear the previous proposed sensor reading to allow
window manager to use the information to update the orientation as
needed vs. falling back to the previous orientation.

Change-Id: I8369723d6a77f2c602f1ef080371fa7cd9ee094e
Fixes: 38494778
Test: Launch an app that doesn't fix orientation like clock, hold
the device in landscape, press the power button, unlock the device
using the fingerprint sensor, and verify the the app isn't
relaunched.
2017-05-30 18:35:36 -07:00
Winson Chung
53afb853fd Merge "Fix issue with aspect ratio not applying correctly when PIP is expanded" into oc-dev am: 9c1b222fc1
am: e322d120cc

Change-Id: Ife88f1db852d49c31ddbbd5a6ebbe55f4ae02f51
2017-05-31 00:34:22 +00:00
TreeHugger Robot
9c1b222fc1 Merge "Fix issue with aspect ratio not applying correctly when PIP is expanded" into oc-dev 2017-05-31 00:01:00 +00:00
Phil Weaver
b37bfe904c Use correct default value for host view.
Bug: 62190714
Test: Now able to open pattern UI without a crash.
Change-Id: Ifff9b45ff23807445d4285d77b8e226c2d904f96
2017-05-30 16:23:10 -07:00
Robert Carr
edc37a6e21 Merge changes I5762a98d,I39f4e015 into oc-dev am: c56b1d3c98
am: 8a967672d5

Change-Id: I2566c88ca0a55e180fc795414e9ea92ae7322d5e
2017-05-30 21:53:08 +00:00
Felipe Leme
8697a31d3c Don't automatically autofill when manual request returned just 1 dataset.
When the user manually requested autofill and the service returned just 1
dataset, the app was automatically filled with it.

The motivation here was that since the user explicitly asked for autofill,
it'd ok - and better for the user - to release the data to the app without
the selecting a dataset.

This assumption was ok initially, but now the API to manually request autofill
is public, so a malicious app could use to get autofill data without user
interation.

Test: CtsAutoFillServiceTestCases pass
Fixes: 62164695

Change-Id: I47c3d8c557533526572aa67a4240c0a57f54268d
2017-05-30 14:34:27 -07:00
Winson Chung
a71febe2aa Fix issue with aspect ratio not applying correctly when PIP is expanded
- The current code always used the default min edge size to calculate the
  PIP bounds when the aspect ratio changes, so if a PIP app sets the aspect
  ratio in response to the an action, the bounds would be resized down
  incorrectly.
- This CL fixes the issue with current aspect ratio not being initialized
  correctly, and also ensures that SystemUI always updates the min edge
  size when expanding the PIP.

Bug: 38324839
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: go/wm-smoke

Change-Id: Ida0f68b2f8f93f9bf1915dda8762a156704d4709
2017-05-30 16:36:48 +00:00
Rob Carr
1a0f783f26 Merge "Fix SurfaceView handler." into oc-dev am: 5366cfbef3
am: 0fc7ca44e8

Change-Id: I39cbc26e1b9c05dd0da7b04c59480812125f2aca
2017-05-30 16:31:01 +00:00
Robert Carr
49cd9f882c ViewRootImpl: More careful draw accounting.
The strategy of beginning the count at 1 isn't enough
and we need to explicitly debt each request to report
draw. Imagine the case where a ViewRootImpl reports draw
multiple times, while we are waiting for a SurfaceView draw
completion callback. Without the explicit draw debt, the ViewRoot
would be counted as drawing for the SurfaceView and we could
notify the WM too early.

Test: Open Chrome a few hundred times. go/wm-smoke.
Bug: 38324871
Change-Id: I5762a98d1cc808125033ba3d1db8a3ea39a9e071
2017-05-30 09:27:44 -07:00
Robert Carr
b53670aecf SurfaceView: Avoid over-reporting DRAW_FINISHED.
To some extent we rely on the app to call the draw callback
if they want the app to work properly, but this case is fairly easy
to detect, so why not prevent it and provide a helpful log.

Bug: 62051758
Test: Warm start camera a few times. go/wm-smoke.
Change-Id: I39f4e015bfa15a1e0c37dba70b4a700803a6a274
2017-05-30 09:27:44 -07:00
Rob Carr
5366cfbef3 Merge "Fix SurfaceView handler." into oc-dev 2017-05-30 16:17:32 +00:00