Commit Graph

10148 Commits

Author SHA1 Message Date
Bryce Lee
0e4a6dfb3f Remove rotation and app bounds from Configuration diff.
The presence of these new flags leads to issues with application that
do not expect their presence. Since these flags can appear at
critical times, such as on orientation change, these issues are
brought to the surface often.

This CL remedies this problem by first removing the rotation
property. It is not used and the original issue of orientation and
Configuration alignment has been addressed. For app bounds, the CL
reverts the behavior back to identifying diffs as a screen size
change.

Fixes: 64004417
Test: bit FrameworksServicesTests:com.android.server.wm.AppBoundsTests
Test: go/wm-smoke

Change-Id: I1fabb564dfb5c13d897336708523cf7cd5099fa0
2017-07-28 07:49:01 -07:00
TreeHugger Robot
149ff697ff Merge "Remove non-safe mode boot vibration." into oc-dr1-dev 2017-07-24 12:46:25 +00:00
TreeHugger Robot
8650c7c0f1 Merge "Removing contents hidden string for public notifications" into oc-dr1-dev 2017-07-23 12:51:43 +00:00
Michael Wright
33d6c08aa6 Remove non-safe mode boot vibration.
Ding, dong the BZZZT is dead.

Bug: 22414771
Test: manual
Change-Id: I011a9b475a6497db6e9440647d6d5c60dcf171b7
2017-07-21 19:11:24 +01:00
Jorim Jaggi
089d45de8f Merge "Fix snapshots for dialogs" into oc-dr1-dev 2017-07-21 16:10:52 +00:00
TreeHugger Robot
cb423e42b3 Merge "Add config to force display to transition to off after doze" into oc-dr1-dev 2017-07-21 14:53:44 +00:00
Jorim Jaggi
e6c6ecb2b0 Fix snapshots for dialogs
When taking a snapshot, always include the full stack bounds.

When showing a snapshot starting window, use the SystemUI flags
from the top fullscreen window in the task - this is the same way
as we do it when the real windows are going to be visible.

Test: Revoke contacts permissions, launch contacts, go to recents,
go back.
Test: go/wm-smoke
Fixes: 63268663

Change-Id: If8d9701f6d34abd56116ed04fe27fe82688e506a
2017-07-21 13:39:19 +02:00
Selim Cinek
499c20f25d Removing contents hidden string for public notifications
We're now only showing the notification header instead of the
repetitive contents hidden string. On Aod, we're still showing
a string however, since without it, it looked too empty.

Test: manual, set sensitive setting on lockscreen, observe notifications
Change-Id: If2bb66b9b3b366715aa68087e5c35cf1cdff3693
Fixes: 63741232
2017-07-20 14:16:13 -07:00
Rob Carr
f62e79791b Merge "Fix incorrect SV calculation in non-RT codepath." into oc-dr1-dev 2017-07-20 18:32:31 +00:00
Michael Wright
05e76fe38f Add config to force display to transition to off after doze
Some display hardware can't do the transition from doze display states
to the on display state cleanly, so in order to hide any janky-ness of
the transition we force the display off and cover the screen with a
black surface. This lets us keep the screen black until SystemUI and the
display are both ready.

Bug: 63531607
Test: manual
Change-Id: I66bd483e5f01e1dbd5069465aa122828af5f1903
2017-07-20 18:21:29 +01:00
Adrian Roos
7c89480c0e AOD: Prevent animations and rotations while going to sleep
A recent change allowed animations while the screen is
turning on, but not fully turned on; this allows rotations
while the device is going to sleep though. To prevent that,
we now disallow animations if the device is going to sleep too.

In addition, we also prevent the rotation animation when the screen
is not fully on or non-interactive.

Change-Id: I9b84f68a02a07067e48b11c008bcaf4bcb7c41a0
Fixes: 63760853
Test: Turn phone to landscape on an app that can rotate. Press power button. Verify AOD shows without a rotation; go/wm-smoke
2017-07-20 13:24:52 +00:00
Robert Carr
c90e5f8656 Fix incorrect SV calculation in non-RT codepath.
We were using width/height as top/bottom...not much more to it
than that :).

Bug: 62752640
Test: go/wm-smoke
Change-Id: I57f081b4fab555f0f551e753618725bdd3780305
2017-07-18 14:52:52 -07:00
Robert Carr
427ba4ff55 Fix rotation animation selection.
The default manifest value needs to be unspecified, not rotate,
as rotate overrides the LayoutParams specified value.

Bug: 63151981
Test: Manual from bug. go/wm-smoke.
Change-Id: I2ad6e3fdd06eeef0166bbe09d07b57cc45ed6e50
2017-07-17 18:37:06 -07:00
Andrii Kulian
3a1619d68e Position app with short aspect ratio opposite of nav bar
When an application doesn't support tall aspect ratio of the
screen where it's displayed, it should be positioned on the
opposite side from navigation bar. It's supposed to create
an effect of extended black nav bar.

Bug: 62893418
Test: go/wm-smoke
Test: ActivityRecordTests#testPositionLimitedAspectRatioNavBarBottom
Test: ActivityRecordTests#testPositionLimitedAspectRatioNavBarLeft
Test: ActivityRecordTests#testPositionLimitedAspectRatioNavBarRight
Change-Id: I2cd3d236ee8d0cc263fee4c0a436d78c755eb9b7
2017-07-12 14:04:35 -07:00
Robert Carr
5482790a3f Merge "SurfaceView: Avoid initializing Surface from an invalid SurfaceControl." into oc-dev
am: 401b8907d0

Change-Id: Ib7a916fb484fb3a7924315169d162f4fdddd8a06
2017-07-07 03:22:50 +00:00
TreeHugger Robot
401b8907d0 Merge "SurfaceView: Avoid initializing Surface from an invalid SurfaceControl." into oc-dev 2017-07-07 03:10:12 +00:00
Robert Carr
7c67b7d097 SurfaceView: Avoid initializing Surface from an invalid
SurfaceControl.

In a recent CL we introduced a call to Surface#createFrom, in order to
recreate the Surface object from the underlying SurfaceControl, as a
workaround to emulate when it was parcelled over binder in the past.
However this is causing BufferQueue abandoned errors when stopping and
resuming some applications. To understand them, we need to revisit the
SurfaceView destruction process when handling onStop.

First mWindowStopped will be set to true (SurfaceView#windowStopped),
and we should then enter updateSurface. Our requested visibility will
now be false and so we emit the Surface destroyed callbacks. Notice in
the finally block in mUpdateSurface, we will release mSurface, but we
will NOT null mSurfaceControl. Inline documentation explains why.

In the case that the activity is not actually being destroyed, it's
possible that we may not get a dispatchDetachedFromWindow. This means
that we will not null mSurfaceControl. Now if the activity is
un-stopped and we re-enter updateSurface we encounter a problem
state. "creating" will be set to false since mSurfaceControl != null,
however mSurfaceControl will not point to a valid surface.

Prior to the introduction of the #createFrom call, this unwanted state
didn't cause any problems. Because mSurface was released back in the
finally block as we were stopping we now fall out of the
mSurface.isValid() block in updateSurface. As we reach the finally
block again, we would now set mSurfaceControl=null since the app was
no longer stopped. Later when we reach updateSurface again (which
tends to happen quite often) it will now be null and we will correctly
set creating=true, create a valid SurfaceControl, and move along
happily. However following, the introduction of this
Surface#createFrom call we will now reinitialize the Surface from an
invalid underlying SurfaceControl. This means we will enter the
mSurface.isValid block, but will proceed to emit an invalid Surface to
the client in the callbacks.

We avoid this state by making creating=true even if
SurfaceControl=non-null when the calculated visibility changes from
invisible to visible.

Bug: 63251745
Test: Manual of app from bug and apps from previous related bugs. go/wm-smoke. Additional manual testing of many SV apps.
Change-Id: Icc32a34cac239d65267da705cc23feb23e1ceb67
2017-07-06 15:53:04 -07:00
TreeHugger Robot
92b6b7090c Merge "AOD: Skip window animations while dozing" into oc-dr1-dev 2017-07-06 17:53:24 +00:00
Adrian Roos
e94c15ca96 AOD: Skip window animations while dozing
Fixes: 37245619
Test: go/wm-smoke; Go to home, turn off phone, observe that during the transition to AOD the navigation bar hide animation does not play.
Change-Id: I9a2fce4295900648a680e8e7e8fee0fbb447dd3d
2017-07-06 17:13:07 +02:00
Siarhei Vishniakou
ff1121a735 Hide VIRTUAL_KEY_RELEASE constant.
The constant will become visible once
the corresponding feature is supported.

Bug: 62433331
Test: make
Change-Id: I310338033dd861e9fd0cc1492a8e34fb53ce0415
2017-06-30 11:02:02 -07: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
TreeHugger Robot
4bf79089c4 Merge "Add getCurrentImeTouchRegion to the WindowManager API" into oc-dr1-dev 2017-06-30 03:22:45 +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
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
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
10a41f9b12 Merge "Protect a11y against multi-threaded UIs" into oc-dr1-dev 2017-06-24 04:44:12 +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
8d4ff1b34f Merge "Only enable wide color gamut support on capable devices" into oc-dr1-dev 2017-06-20 23:41:39 +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
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
Jonathan Solnit
e07567cc0b Merge "Check for keyguard occlusion on camera lift" into oc-dr1-dev 2017-06-20 16:24:28 +00:00
Siarhei Vishniakou
305fe47d65 Merge "Revive DeadZone" into oc-dev
am: b278424fa6

Change-Id: I5a06302eaad1e955aaea6ae8d2785c0b12e53cc4
2017-06-19 23:59:46 +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
Vladislav Kaznacheev
2102c3211c Merge "Do not update currently open tooltip." into oc-dev
am: 139dbe5c1c

Change-Id: Ia3fc1f16e71a4a12a0a84704b7ca7a9d2ec33514
2017-06-19 21:12:45 +00:00
Siarhei Vishniakou
6ad0e39f33 Revive DeadZone
Override dispatchTouchEvent for the root FrameLayout
of NavigationBar to process ACTION_OUTSIDE MotionEvents
and dispatch directly to DeadZone to keep track of the
most recent outside tap.
Clarified documentation of ACTION_OUTSIDE behaviour.

Bug: 37552674
Test: open IME, tap any key, then quickly tap on top half
of the home button. The home button tap is ignored
and device does not go to homescreen.

Change-Id: Icb5cf6c76959f3514b8b94c09e38cc5434f31b23
2017-06-19 14:06:21 -07:00
TreeHugger Robot
139dbe5c1c Merge "Do not update currently open tooltip." into oc-dev 2017-06-19 21:01:47 +00:00
Wale Ogunwale
71f3099c53 Added back removed ctor from DisplayEventReceiver
...because some app can't help but access hidden APIs...

Test: builds
Change-Id: Ia1d4a71b46a53b44e3ebe5844e446009785a90ac
Fixes: 62719884
2017-06-19 13:53:32 -07:00
TreeHugger Robot
280acdb88b Merge "Introduce HapticFeedbackConstants.TEXT_HANDLE_MOVE" into oc-dr1-dev 2017-06-19 19:44:52 +00:00
Felipe Leme
730924cd65 Merge "Revert "Trim text from autofillvalue when checking for empty."" into oc-dev
am: 215ebb941d

Change-Id: I058b5fd135e4165214116055ccdc04e9d99955b0
2017-06-17 01:04:08 +00:00