Commit Graph

10181 Commits

Author SHA1 Message Date
Bryce Lee
a89a8cdef9 Merge "Always send configuration to client from resize and relayout." into oc-dr1-dev am: 392ac74f37
am: 4c201983cf

Change-Id: Ie0a49f094952dbd717dc1a71de4aafd267e9c214
2017-06-30 16:42:10 +00:00
Bryce Lee
bb7965ed90 Merge "Add rotation to configuration." into oc-dr1-dev am: 2050dc66e2
am: 2004fc1387

Change-Id: If3a3975a2e07a96de1120b1a0744eab466284764
2017-06-30 16:40:58 +00:00
Bryce Lee
392ac74f37 Merge "Always send configuration to client from resize and relayout." into oc-dr1-dev 2017-06-30 16:17:34 +00:00
Bryce Lee
2050dc66e2 Merge "Add rotation to configuration." into oc-dr1-dev 2017-06-30 16:17:34 +00:00
Bryce Lee
f858b5788e Always send configuration to client from resize and relayout.
Previously, the server side would omit reporting new configurations
during resize and relayout if the current configuration matched the
last reported. However, if the last reported came through a resize,
the client side handling would be enqueued as a Handler message. This
leads to the possibility of the client getting a new window frame but
not a new configuration where this is synchronously handled, such as
ViewRootImpl::performTraversals.

To address this issue, we now always send the current configuration
from the server to the client. The client then identifies changes
against its own record of last reported configuration and updates as
appropriate.

This changelist also adds a call to force window relayout during
updateConfiguration, as it's possible this is called after
performTraversals is called or resize is handled, leading to a stale
window frame.

Bug: 24671393
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: I0d5143dfe80400f6a43ce710750f9fc9d4b93f74
2017-06-30 06:42:50 -07:00
Albert Chaulk
c8600632b1 Merge "Add getCurrentImeTouchRegion to the WindowManager API" into oc-dr1-dev am: 4bf79089c4
am: 1bfecb614e

Change-Id: I17be0a9b64ae628fedcfa61dbddb4cbcaaa58b79
2017-06-30 03:34:13 +00:00
TreeHugger Robot
4bf79089c4 Merge "Add getCurrentImeTouchRegion to the WindowManager API" into oc-dr1-dev 2017-06-30 03:22:45 +00:00
Phil Weaver
2b94b2ad75 Merge "Revert "Added PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS window flag."" 2017-06-30 02:06:00 +00:00
Phil Weaver
909eda1faf Revert "Added PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS window flag."
I submitted this change by accident after confusing it with one of mine. Sorry.

Bug: 62196835

This reverts commit 6f2a1a18fc.

Change-Id: Ib6d89690d1d761d38da3131131ff807a3fac0d2b
2017-06-30 02:03:32 +00:00
Phil Weaver
d442642c1d Merge "Added PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS window flag." 2017-06-30 01:55:42 +00:00
Ricardo Loo
7af458a415 Merge "docs: Updated isAutofillSupported description." into oc-dev am: a89dfb5439 am: 824b41d77a
am: a29c9a9466

Change-Id: Id7b3e0f72b60b0450aa9b6aa181faae8a22109e7
2017-06-30 01:06:58 +00:00
Ricardo Loo
824b41d77a Merge "docs: Updated isAutofillSupported description." into oc-dev
am: a89dfb5439

Change-Id: Ie43f37efa9e268b04dbad09ad04795089de68adf
2017-06-30 00:51:55 +00:00
Chet Haase
54f91d66e8 Merge "Add docs for new padding/margin attributes." into oc-dev am: 8cdbd6e184 am: d73f6a985d
am: 95e6c38eb0

Change-Id: Id397296039d2ca9bd8fe6bf4130a3308296843da
2017-06-30 00:47:56 +00:00
Ricardo Loo
a89dfb5439 Merge "docs: Updated isAutofillSupported description." into oc-dev 2017-06-30 00:44:50 +00:00
Bryce Lee
c1f2f2a9d3 Add rotation to configuration.
Certain activities are dependent on the rotation of the device to
determine layout. In these cases, orientation does not provide enough
details.

This CL adds the field (hidden) to the configuration.

Change-Id: Idb3ba10cb4de8838737c25e92264e6cee224e264
Fixes: 32839232
Test: go/wm-smoke
2017-06-29 17:40:23 -07:00
Chet Haase
d73f6a985d Merge "Add docs for new padding/margin attributes." into oc-dev
am: 8cdbd6e184

Change-Id: Iacf5e069e0e6a2b38a1566f36f81ab8de693e634
2017-06-30 00:32:26 +00:00
chaviw
59b9885bc8 Added Activity flags to show on lock screen.
Added two new flags to the Activity to turn the screen on and
show on the lock screen. These can be used instead of the Window flags
LayouParams.FLAG_TURN_SCREEN_ON and LayoutParams.FLAG_SHOW_WHEN_LOCKED
to prevent the double onStart/onResume lifecycle events.

The flags can be set as an attr for the Activity in the AndroidManifest
using android:showWhenLocked="true" and android:turnScreenOn="true".
They can also be set through methods in the Activity class using
setShowWhenLocked(true) and setTurnScreen(true).

Fixes: 36850100
Test: Created sample application, tests/ShowWhenLockedApp, that set the
      flags in the manifest and code. Tested multiple scenarios to
      launch the Activity with the flags set and unset.
Test: cts-tradefed run commandAndExit cts-dev --module CtsServicesHostTestCases -t android.server.cts.KeyguardTransitionTests
Test: cts-tradefed run commandAndExit cts-dev --module CtsServicesHostTestCases -t android.server.cts.ActivityManagerActivityVisibilityTests
Test: cts-tradefed run commandAndExit cts-dev --module CtsServicesHostTestCases -t android.server.cts.KeyguardTests

Change-Id: I44f0e313df4531d49c7ac56108b6bf80e41fefc1
2017-06-29 13:33:43 -07:00
Wale Ogunwale
6f2a1a18fc Added PRIVATE_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS window flag.
When a window with this flag is visible, then any other window added
by an application process that requires OP_SYSTEM_ALERT_WINDOW
permission or that are of TYPE_TOAST will be hidden.

Bug: 62196835
Test: TODO
Change-Id: I07605b52af893945250b0212f406e0e92bfd92bd
2017-06-29 12:59:31 -07:00
Albert Chaulk
2ccb0b72e3 Add getCurrentImeTouchRegion to the WindowManager API
This is a followup to ag/2370980/ to expose the API more
externally as a WindowManager API. This allows application
access without needing to reflect on IWindowManager.Stub.

We require this to get the current IME touch region to
display it properly in VR contexts.

Test: Manual
Bug: 62194867

Change-Id: Ibbf336e1e473b65d4c76a1492da187d50cfda424
2017-06-29 13:44:19 -04:00
Chet Haase
353d397d17 Add docs for new padding/margin attributes.
The attributes for View, paddingHorizontal and paddingVertical,
were added in the O release and are documented in R.attr. But they
should also be referenced in View itself, alongside the other
padding parameters.

Similarly, the new layout_MarginHorizontal and
layout_marginVertical should be referenced in
ViewGroup.MarginLayoutParams.

Bug: 63128350  Add docs about new padding/margin params
Test: built docs, checked the result
Change-Id: I3021df5ea83c469811b4a6ec6ecd3ab2966ec384
2017-06-29 07:54:19 -07:00
Ricardo Loo
33d226c953 docs: Updated isAutofillSupported description.
The description for `AutofillManager.isAutofillSupported` doesn't make
clear that either the device or the user can make autofill unsupported.

Bug: 62604325
Test: Ran 'make ds-docs -j16' and staged content to
go/dac-stage/reference/android/view/autofill/AutofillManager.html#isAutofillSupported()

Change-Id: I298b9f535e23dc3cb54fabed36642523753c13a5
2017-06-27 14:17:33 -07:00
TreeHugger Robot
ab620613b9 Merge "Fixes grammatical error in InputMethodManager doc" 2017-06-27 19:54:23 +00:00
Nick Felker
8efc3ee3ee Fixes grammatical error in InputMethodManager doc
Fixes: 29645208
Test: This is not a code change, so tests should be unaffected.
Change-Id: I8b76166f3a7f1c825dc9725f6d7fd8e8c96fe410
2017-06-27 17:59:36 +00:00
Jeff Sharkey
5ab0243330 Only require that system UIDs tag their sockets.
Apps with a normal UID are typically isolated enough to not require
socket tagging; we're mostly interested in tracking down internal
UIDs that have lots of code sharing the same UID.

Also fix up everyone doing manual string checks of Build.TYPE, since
we now have first-class fields for those.

Bug: 38126076
Test: builds, boots
Change-Id: I3a40348196bd8459289f2b9355d9783a07f1e7dd
2017-06-27 11:11:06 -06:00
TreeHugger Robot
10a41f9b12 Merge "Protect a11y against multi-threaded UIs" into oc-dr1-dev 2017-06-24 04:44:12 +00:00
Rob Carr
7ac7a1ea6d Merge "SurfaceView: Fix positioning issue when toggling visibility." into oc-dev am: 70f1565b55 am: bf78acda44
am: 90c4bbbd1a

Change-Id: I200243684a5a29f9f407d45a2826236bb32056c0
2017-06-21 03:12:55 +00:00
Rob Carr
90c4bbbd1a Merge "SurfaceView: Fix positioning issue when toggling visibility." into oc-dev am: 70f1565b55
am: bf78acda44

Change-Id: I98b615cd1f52385bb3cdbc4dcc287911f3eabad0
2017-06-21 02:50:51 +00:00
Rob Carr
2f666763e9 Merge "SurfaceView: Fix positioning issue when toggling visibility." into oc-dev
am: 70f1565b55

Change-Id: I88d205835ce91ea21d77a15649aad2d3b9c187d7
2017-06-21 02:38:55 +00:00
Rob Carr
70f1565b55 Merge "SurfaceView: Fix positioning issue when toggling visibility." into oc-dev 2017-06-21 01:47:58 +00:00
TreeHugger Robot
02d082dd0b Merge "Add Window.isWideColorGamut()" 2017-06-21 01:02:56 +00:00
Romain Guy
f979298b48 Merge "Only enable wide color gamut support on capable devices" into oc-dr1-dev am: 8d4ff1b34f
am: b11cf2d2e5

Change-Id: I6a8fe23b0c1c81142611fe5b0867b8d7f04a4e9b
2017-06-21 00:00:56 +00:00
TreeHugger Robot
8d4ff1b34f Merge "Only enable wide color gamut support on capable devices" into oc-dr1-dev 2017-06-20 23:41:39 +00:00
Romain Guy
adae59b020 Add Window.isWideColorGamut()
This API returns true when all the following conditions are met:
- The app has requested the window to be in wide color gamut mode
- The display has a wide color gamut
- The device supports wide color gamut rendering

Bug: 62832666
Test: CtsColorModeTest
Change-Id: Idae1527b88959689bb637b6dd4db756d09fabe77
2017-06-20 16:01:57 -07:00
Bryce Lee
4e0acc40f2 Merge "Limit creating new surface for legacy apps to size changes." into oc-dev am: d523125679 am: 80e1d8eb9a
am: 9a5595ef32

Change-Id: I7b59e572542449b54c835688cf8c9c0e2e5c74b0
2017-06-20 22:48:15 +00:00
Bryce Lee
80e1d8eb9a Merge "Limit creating new surface for legacy apps to size changes." into oc-dev
am: d523125679

Change-Id: Ie1c199bbc721f282dc0de788d36481fef9530460
2017-06-20 22:17:39 +00:00
Robert Carr
ad3a493106 SurfaceView: Fix positioning issue when toggling visibility.
There is an issue (seemingly preexisting) with getPositionInWindow
after toggling view visibility. We see it when showing a view,
hiding it, and then showing it again. At this point we end up
with this call-stack:
   SurfaceView#setVisibility->SurfaceView#updateSurface
   ->View#getPositionInWindow
and getPositionInWindow fills in the wrong values. This newly discovered
bug is tracked as 62839113.

In a second bug, introduced in the SurfaceView refactoring,
we are not appropriately clearing the last RenderThread reported
position when toggling visibility. This means that even after the
setVisibility call when getPositionInWindow begins returning
the correct values, we don't update the position. This CL fixes
that and fixes 62653411 as a result. However we still have a flicker
as we did in N as the initial position is wrong.

Test: Manual from bug, go/wm-smoke
Change-Id: I1037b8dfdb343f9ce8c8616eb9197c6d039ed133
Fixes: 62653411
Bug: 62839113
2017-06-20 14:55:21 -07:00
Romain Guy
e89d0bba66 Only enable wide color gamut support on capable devices
Bug: 62827458
Test: CtsColorModeTests, more tests going in MR1
Change-Id: Idca2804b04ae6bdcbec6bcda6fd74dc6ada89c31
2017-06-20 14:23:28 -07:00
TreeHugger Robot
6d81ed4c34 Merge "Do not restore same autofill id twice" 2017-06-20 19:15:34 +00:00
TreeHugger Robot
8446a3005f Merge "Add support for ACTION_OUTSIDE to Dialog" 2017-06-20 18:08:10 +00:00
Bryce Lee
453fc364c3 Limit creating new surface for legacy apps to size changes.
Creating the surface for every change (such as creation and
visibility) can lead to issues swapping buffers. This
changelist limits the action to only when the size changes.

Change-Id: Ic549d244613a93a43a9f4ddf284bbfb0c13300fa
Fixes: 62801621
Test: follow repro steps in bug, verified no crash.
Test: go/wm-smoke
2017-06-20 10:47:55 -07:00
Philip P. Moltmann
cb79781356 Do not restore same autofill id twice
View's are restored based on their id. The autofill id is part of the
id's state. Unfortunately the ids of the view are not neccessary
unique. In this case two views would store state of for the same id.
Also two views would be restored frome the same state. This causes
duplicate autofill ids which is not allowed. Hence make sure that for a
single state, the autofill id is only restored once.

Change-Id: I8d950486cb21d9f6afe6d0f5f668799305ae73e7
Fixes: 62658714
Test: cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
2017-06-20 10:08:21 -07:00
Jonathan Solnit
30f4c97aaa Merge "Check for keyguard occlusion on camera lift" into oc-dr1-dev am: e07567cc0b
am: 9a0894b930

Change-Id: I1e4a944ff83e46978cc4d15175347d0a44019ae5
2017-06-20 16:36:49 +00:00
Jonathan Solnit
e07567cc0b Merge "Check for keyguard occlusion on camera lift" into oc-dr1-dev 2017-06-20 16:24:28 +00:00
Michael Wright
ddec8fb43c Add support for ACTION_OUTSIDE to Dialog
Historically, Dialogs expected to be fullscreen in order to know when to
close.  By adding support for ACTION_OUTSIDE, they can now close when
the user touches outside of them without actually having to be
fullscreen

Bug: 62373955
Test: cts-tradefed run commandAndExit cts-dev \
      -m CtsAutoFillServiceTestCases -t \
      android.autofillservice.cts.LoginActivityTest#testSaveGoesAwayWhenTouchingOutside
Change-Id: I9cd2afc093ee6f252aaf6c23c029059584879004
2017-06-20 14:15:48 +00:00
Siarhei Vishniakou
3998a5ccc6 Merge "Revive DeadZone" into oc-dev am: b278424fa6 am: 305fe47d65
am: d5c0ef9467

Change-Id: Iec82102d862097ef3242da9103996afe94f0909c
2017-06-20 00:11:45 +00:00
Siarhei Vishniakou
305fe47d65 Merge "Revive DeadZone" into oc-dev
am: b278424fa6

Change-Id: I5a06302eaad1e955aaea6ae8d2785c0b12e53cc4
2017-06-19 23:59:46 +00:00
Wale Ogunwale
510fb72803 Merge "Added back removed ctor from DisplayEventReceiver" into oc-dev am: 113918f309 am: f4dc128aa2
am: c8f7cb6be7

Change-Id: I8355dfd4c6c3adb2fd34a01fb4a9b828f735788f
2017-06-19 23:57:42 +00:00
Siarhei Vishniakou
b278424fa6 Merge "Revive DeadZone" into oc-dev 2017-06-19 23:48:00 +00:00
Wale Ogunwale
f4dc128aa2 Merge "Added back removed ctor from DisplayEventReceiver" into oc-dev
am: 113918f309

Change-Id: I655721c29b22da375742628a9e7b8b3075b2dd27
2017-06-19 23:27:57 +00:00
TreeHugger Robot
113918f309 Merge "Added back removed ctor from DisplayEventReceiver" into oc-dev 2017-06-19 23:16:18 +00:00