Commit Graph

10251 Commits

Author SHA1 Message Date
Jeff Sharkey
67f9d5070a Fix broken javadocs.
Bug: 64337634
Test: make -j32 doc-comment-check-docs
Change-Id: I20fdd3dcddef09111d35946c41c596c7689effa6
2017-08-06 07:37:08 -06:00
TreeHugger Robot
38bbbdfae6 Merge "Remove LangId related code." into oc-mr1-dev 2017-08-03 17:54:29 +00:00
Robert Carr
76136dcf45 Merge "Inform SurfaceFlinger of which Surface is the RoundedCorners overlay." into oc-dr1-dev
am: 48ed8aa4d0

Change-Id: I3030c64c30f6c16dc9c8a01e21a5dc6b58cbd273
2017-08-03 12:53:38 +00:00
TreeHugger Robot
48ed8aa4d0 Merge "Inform SurfaceFlinger of which Surface is the RoundedCorners overlay." into oc-dr1-dev 2017-08-03 12:45:07 +00:00
Tarandeep Singh
9c4115a562 Merge "Fix keyboard focus in VR" into oc-dr1-dev
am: 986995d481

Change-Id: I693c1256583dc1081c6402668401c6aab2337d16
2017-08-02 22:59:51 +00:00
Evan Rosky
64dd913f68 Merge "Gracefully handle focus loops created by app dev." into oc-dr1-dev
am: ae938cee71

Change-Id: I0b0fe6f7cc07362e98f7a5a2b54aa66bbd5ffc7f
2017-08-02 22:42:21 +00:00
Tarandeep Singh
986995d481 Merge "Fix keyboard focus in VR" into oc-dr1-dev 2017-08-02 20:33:02 +00:00
Tarandeep Singh
e1cfcf4c4d Fix keyboard focus in VR
Consider this VirtualDisplay (VD) scenario:
HostActivity creates a VD which holds SettingsActivity. When EditText
on SettingsActivity is tapped, it gains focus.
On eventual taps, it loses focus i.e. the Window in VD loses focus and
the host activity in primary display gets the focus instead. This
happens because WM's TaskTapPointerEventListener.onPointerEvent()
is called on the default display only.

Root cause:
1. Tap detector isn't registered for non-default display.
2. Tap detector has no info on which displayId touch was received.
3. InputFlinger doesn't deliver InputMonitor events for
non-default displays (fixed in a separate CL)

Fixing above results in onPointerEvent(MotionEvent) to deliver the
Touch events successfully to VD. We restrict these changes to physical
multi-displays and VR VirtualDisplays (which uses virtual touch device).
[VrManagerService calls WMInternal.setVr2dDisplayId(int)]

In future, displayId should be part of InputEvent. Bug: 64258305

Bug: 62033391
Test: bit FrameworksServicesTests:com.android.server.wm.DisplayContentTests
Change-Id: I3626f4de5aa9bcf905da9abd39f3ab1baefc4c48
2017-08-02 10:46:22 -07:00
Evan Rosky
9d93486ed6 Gracefully handle focus loops created by app dev.
Instead of ANR in an infinite loop, this will detect
a cycle and return null.

Bug: 62960867
Test: Added in CTS FocusFinderTest#testChainVisibility
Change-Id: Ifb4638e3350642f065c40b3bea112cc12efff447
2017-08-02 17:33:32 +00:00
Dake Gu
8eb3a3979f Merge "View: fix setTransientState" into oc-mr1-dev 2017-08-02 17:18:00 +00:00
Robert Carr
132c9f5140 Inform SurfaceFlinger of which Surface is the RoundedCorners overlay.
We need to omit it from screenshots, and screen mirroring, so SurfaceFlinger
will have to have some knowledge. Eventually we'd like to do this by
having everything else have a parent, and mirroring and screenshotting will
operate on that parent. Since we aren't comfortable doing that for DR though, here's
a quick and dirty hack to tide us over with low risk.

Bug: 63311708
Test: screencap, screenrecord, android.view.cts.SurfaceViewSyncTest
Change-Id: I2b43be00567ee19cf27aeef344e5415f4a69297f
2017-08-02 09:03:05 -07:00
Felipe Leme
27eb322ed2 Merge "Cherry-picked some Autofill Javadoc improvements from master." into oc-dev
am: 6829a1dace

Change-Id: I41dec3cb31e6b523927717950f827f45dadabd8b
2017-08-02 00:26:37 +00:00
Dake Gu
43ad57e548 View: fix setTransientState
Following four steps with RecyclerView - CardView - ImageView:
a. fade in imageview in onBind:
calling imageView.setTransientState(true)
b. RecyclerView animate the item: calling
cardView.setTransientState(true)
c. fade-in finishes, calling imageView.setTransientState(false)
d. RecyclerView animation finishes: calling
cardView.setTransientState(false)

After these four steps, RecyclerView unexpectedly has transient
state.

The problem is in step b, when calling cardView.setTransientState()
it incorrectly calls parent.childHasTransientStateChanged(this, true)
which causes RecyclerView's mChildCountWithTransientState increased
to 2. And it's decreased to 1 in step d and stay as 1 forever.

The child should only call childHasTransientStateChanged() when
actual hasTransientState() changed.

Bug: 64235615
Test: ViewTransientStateTest
Change-Id: I99ed35cc9c49e54d36590d8f1d206501fd3288f2
2017-08-01 14:17:39 -07:00
Abodunrinwa Toki
5820875975 Remove LangId related code.
FYI: We have plans to reintroduce this in some form in the near future.

Fixes: 62571798
Fixes: 64096360

Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Change-Id: I864d6c1143af6a2485cabdfe85116b5922a3e315
2017-08-01 21:22:46 +01:00
Felipe Leme
33681a94cf Cherry-picked some Autofill Javadoc improvements from master.
Test: m update-api

Bug: 64125551
Bug: 63669555
Bug: 63985284

Merged-in: Iba4817f682670e9fd6d891ae221e1fa415252e99
Change-Id: I82cbb54a522b2cf1dfb11aacc9735c932aa9af90
2017-07-31 10:18:03 -07:00
Yohei Yukawa
7a1ad6d97c Remove a compat hack SurfaceView#setWindowType()
This CL logically reverts a compatibility hack I introduced [1] for
apps that had relied on @hide method SurfaceView#setWindowType(int).

 [1]: I5217f6417a73690ae8a978754218b7b089070fdd
      3b5011afc9

Fixes: 62054282
Test: Manually verified that Bug 36345857 is still not reproducible
Change-Id: Icee198c554de558cfa4ffe0b264064969839654e
2017-07-30 20:54:08 -07:00
Bryce Lee
84fa183e7d Merge "Remove rotation and app bounds from Configuration diff." into oc-dr1-dev
am: 5b76ce1b2b

Change-Id: Ibf899e9a08cdab31ae38897add813fc4c8089474
2017-07-28 21:28:05 +00:00
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
db3c4ee787 Merge "Checks if mResponses is null before using it." into oc-mr1-dev 2017-07-27 01:00:58 +00:00
Felipe Leme
afdfe7665c Checks if mResponses is null before using it.
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testFillResponseAuthWhenAppCallsCancel
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Fixes: 63806922
Bug: 63985284

Change-Id: I8d7cfa34ba88a1d351967e17717b387c805dd00d
2017-07-24 12:38:47 -07:00
Michael Wright
d487520e4c Merge "Remove non-safe mode boot vibration." into oc-dr1-dev
am: 149ff697ff

Change-Id: Ie8964116ffb3dccd6b683f0fff764d128107ac4f
2017-07-24 12:52:43 +00:00
TreeHugger Robot
149ff697ff Merge "Remove non-safe mode boot vibration." into oc-dr1-dev 2017-07-24 12:46:25 +00:00
Selim Cinek
3a82a4a0f2 Merge "Removing contents hidden string for public notifications" into oc-dr1-dev
am: 8650c7c0f1

Change-Id: I10d7ab191f47bf167a5be5e0d11d7698aae58cd1
2017-07-23 12:57:19 +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
TreeHugger Robot
572cb5242d Merge "Expose shared buffer mode/auto refresh on Surface" into oc-mr1-dev 2017-07-22 03:01:02 +00:00
Romain Guy
0bbf0b41cc Expose shared buffer mode/auto refresh on Surface
These features can be set on a surface to reduce perceived latency
at the expense of visible tearing.

Bug: 63858546
Test: Manual, CTS test coming

Change-Id: Ica3f480bd1cb8f77dff57218d2fa8783433d3396
2017-07-21 16:11:17 -07: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
d8aa259df1 Merge "Fix snapshots for dialogs" into oc-dr1-dev
am: 089d45de8f

Change-Id: I6429fcdc5c012f653143cb8b8161b8f1626293f9
2017-07-21 16:17:39 +00:00
Jorim Jaggi
089d45de8f Merge "Fix snapshots for dialogs" into oc-dr1-dev 2017-07-21 16:10:52 +00:00
Michael Wright
f0613cdab7 Merge "Add config to force display to transition to off after doze" into oc-dr1-dev
am: cb423e42b3

Change-Id: Ie643ec6a1c917aa2d9364dbc431121f19a8a7e31
2017-07-21 15:00:18 +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
362a400f09 Merge "Fix incorrect SV calculation in non-RT codepath." into oc-dr1-dev
am: f62e79791b

Change-Id: I59fd7563e1bb82def0e9321b6340c97e249bdcfc
2017-07-20 18:47:17 +00: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
747938ed61 Merge "AOD: Prevent animations and rotations while going to sleep" into oc-dr1-dev
am: 29119b6f5f

Change-Id: I5deca2c8224d629eadc18a7f7742c6f8d43b133d
2017-07-20 16:12:21 +00: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
Rob Carr
e75643d542 Merge "Fix rotation animation selection." into oc-dr1-dev am: cee8098178
am: 228571391e

Change-Id: Idd2a3c23233f0758cc96a55da97b99c6ee8a7c94
2017-07-18 20:01:05 +00: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
Evan Rosky
99b254be5c Merge "Clean up @hide usages in cts tests" 2017-07-15 01:17:35 +00:00
TreeHugger Robot
eb5a57142a Merge "Revert "Revert "Make scrollbarSize in Material Design theme configurable""" 2017-07-14 19:12:51 +00:00
Evan Rosky
c5420ea31b Clean up @hide usages in cts tests
Bug: 62066671
Bug: 62067303
Test: ViewGroupTest and View_FocusHandlingTest still pass
Change-Id: I010a570bfcea212f1319a26f616c7841e841c00d
2017-07-13 15:36:56 -07:00
Abodunrinwa Toki
a49d2eedc9 Merge "TextClassification.text is nullable" 2017-07-13 20:06:12 +00:00
Andrii Kulian
917a641101 Merge "Position app with short aspect ratio opposite of nav bar" into oc-dr1-dev am: a40af83c32
am: 8d99ed44f2

Change-Id: I28cee4719647f5c1746e62fe8c73ebdc99be6c65
2017-07-13 03:47:30 +00: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
Abodunrinwa Toki
d44286f942 TextClassification.text is nullable
Removes the @NonNull requirement on TextClassification.text.
e.g. TextClassifier.NO_OP doesn't classify text and thus returns
TextClassification.EMPTY which doesn't set TextClassification.text.
This is ideal as we need not make copies of this object when NO_OP
was performed.

Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
bit FrameworksCoreTests:android.widget.TextViewActivityTest
bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I0b3ac5bf0027cbd67ba40d1110f1100280c8c3a2
2017-07-12 20:26:27 +01:00
TreeHugger Robot
d1e123cbad Merge "Autofill: Add API for virtual view visibility" 2017-07-12 17:36:29 +00:00
Svetoslav Ganov
4db89ba82e Autofill: Add API for virtual view visibility
Test: VirtualContainerActivityTest

bug:38509603

Change-Id: I3546c99d0b13316337c5015e003337b8019194a9
2017-07-11 19:43:01 -07:00