Commit Graph

8193 Commits

Author SHA1 Message Date
Feng Cao
23f11427f8 Merge "Make content capture send text update event for TextView even when it is not editable (EditText)" into qt-r1-dev am: f2f679afac
am: 5f69e0c361

Change-Id: Ia03b2a27b9e9beae3ddfed501770f209380b9b17
2019-05-29 17:48:53 -07:00
Feng Cao
5f69e0c361 Merge "Make content capture send text update event for TextView even when it is not editable (EditText)" into qt-r1-dev
am: f2f679afac

Change-Id: Ic51dfb3955783a015a4ae56c00c9746761517228
2019-05-29 17:40:50 -07:00
Feng Cao
2a42d99897 Make content capture send text update event for TextView even when it is not editable (EditText)
Test: atest CtsContentCaptureServiceTestCases
Fixes: 124203774

Change-Id: Ib79c847d68dfcde89155e18feea1bc34206269f9
2019-05-29 01:09:47 +00:00
sallyyuen
8f223c591e Set the a11yNodeInfo unclickable if the TextView has a
LinkMovementMethod and there are no onClickListeners or
onLongClickListeners

A view with links shouldn't be exposing itself as clickable to
an a11yService if only the links are clickable. If a movement method is
set, the view turns both clickable and long-clickable. This has brought
a number of bugs where an a11yService will notify users the element is
clickable but performing the action does nothing.

We can't delete years-old code without breaking a lot of things, so try
to minimize the consequences by adding logic in onInitializeA11yNodeInfo.
Add checks so a view with links and no click listeners will be made un-clickable.

Bug: b/131758159
Test: Tested on several bugs with TalkBack, CtsAccessibilityTests, CtsTextTestCases,
CtsWidgetTestCases:TextViewTest
Change-Id: I53b695139ecea2c34d125e7077fd2077593adbe1
2019-05-28 22:56:12 +00:00
Bin Chen
6294913428 Merge "[Magnifier-86] Fix deadlock causing ANR" into qt-dev am: 0c7e69bdb6
am: 009fecb8ad

Change-Id: Ic75473ac042db97c995a3b990422e95a9a86d981
2019-05-24 11:56:55 -07:00
Bin Chen
009fecb8ad Merge "[Magnifier-86] Fix deadlock causing ANR" into qt-dev
am: 0c7e69bdb6

Change-Id: I9946c147c60f1704a9af9f4d0f50cf0a4e4e2e40
2019-05-24 10:34:29 -07:00
TreeHugger Robot
0c7e69bdb6 Merge "[Magnifier-86] Fix deadlock causing ANR" into qt-dev 2019-05-24 17:03:21 +00:00
Mihai Popa
ffd67eb222 Merge "[Magnifier-84] Improve PixelCopy failures handling" into qt-dev am: 612f71b1df
am: b82fd2d7d3

Change-Id: I85b4a34e1fb65f6611fbeb30193ce6cc253953b2
2019-05-24 10:01:14 -07:00
Mihai Popa
b82fd2d7d3 Merge "[Magnifier-84] Improve PixelCopy failures handling" into qt-dev
am: 612f71b1df

Change-Id: Id5b3d1a582d7119b2a967e6759d0e8e939ff20c8
2019-05-24 09:32:04 -07:00
Mihai Popa
d88a953a78 Merge "[Magnifier-84] Improve PixelCopy failures handling" into qt-dev
am: 612f71b1df

Change-Id: I44978468da2e25534945596f6d750e3d4e9b49a1
2019-05-24 09:22:20 -07:00
Bin Chen
c8beb5c0f0 [Magnifier-86] Fix deadlock causing ANR
"main" prio=5 tid=1 Blocked
  | group="main" sCount=1 dsCount=0 flags=1 obj=0x74aeca00 self=0x7021814c00
  | sysTid=27953 nice=-10 cgrp=default sched=0/0 handle=0x70a85ff548
  | state=S schedstat=( 31382082536 9164116362 28130 ) utm=2661 stm=477 core=0 HZ=100
  | stack=0x7ff7a52000-0x7ff7a54000 stackSize=8MB
  | held mutexes=
  at android.widget.Magnifier$InternalPopupWindow.destroy(Magnifier.java:607)
  - waiting to lock <0x0ef5c351> (a java.lang.Object) held by thread 13
  at android.widget.Magnifier.dismiss(Magnifier.java:191)
  - locked <0x01cd07b6> (a java.lang.Object)

 "hwuiTask1" prio=5 tid=13 Blocked
  | group="main" sCount=1 dsCount=0 flags=1 obj=0x12f815d8 self=0x70000e7800
  | sysTid=28075 nice=-2 cgrp=default sched=0/0 handle=0x70046ba4f0
  | state=S schedstat=( 138800095 85604746 532 ) utm=10 stm=3 core=1 HZ=100
  | stack=0x70045bf000-0x70045c1000 stackSize=1009KB
  | held mutexes=
  at android.widget.Magnifier$InternalPopupWindow.lambda$doDraw$0(Magnifier.java:663)
  - waiting to lock <0x01cd07b6> (a java.lang.Object) held by thread 1
  - locked <0x0ef5c351> (a java.lang.Object)
  at android.widget.-$$Lambda$Magnifier$InternalPopupWindow$vZThyvjDQhg2J1GAeOWCNqy2iiw.onFrameDraw(lambda:-1)

Bug: 133396461
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Idf0373ab0d5033d56da0f6f45d7d953f7e796813
Merged-In: Idf0373ab0d5033d56da0f6f45d7d953f7e796813
2019-05-23 10:18:02 +00:00
Felipe Leme
3fe70c6af0 DO NOT MERGE - Re-add ContentCapture support from standard SDK toolkit.
am: 911cb1fa76

Change-Id: I15c8da47beb6b4dd64b627aebb0288fcb359c3e5
2019-05-22 16:00:20 -07:00
TreeHugger Robot
0ac85feb6f Merge "DO NOT MERGE - Re-add ContentCapture support from standard SDK toolkit." into qt-r1-dev 2019-05-22 20:15:34 +00:00
Felka Chang
69f09de8fc Merge "Fix sysui's security issue of cross-user copy/paste" into qt-dev am: 743288a029 am: 01fc17e00a
am: 18f0cb4147

Change-Id: Ie27b43da8b5ed2668c0817ca61cf3c08b2c5fdb1
2019-05-22 04:16:28 -07:00
Mihai Popa
30b1fe3dd0 [Magnifier-84] Improve PixelCopy failures handling
The CL adds PixelCopy failure handling in Magnifier. Previously, if the
content copy failed, the Magnifier would still render the shadow,
therefore displaying an empty rectangle shadow frame. The CL fixes this,
avoiding displaying anything if the PixelCopy request fails.

Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Bug: 132136368
Change-Id: I66715c56770380afafa5af5a3ee976bcaaa5ba1e
(cherry picked from commit 3aa46b2dd0)
Merged-In: I66715c56770380afafa5af5a3ee976bcaaa5ba1e
2019-05-22 11:09:27 +00:00
Mihai Popa
8d1f52a25e Merge changes from topic "magnifier_improve_pixelcopy_failure_handling"
* changes:
  [Magnifier-84] Improve PixelCopy failures handling
  [Magnifier-86] Fix deadlock causing ANR
2019-05-22 10:14:19 +00:00
Felka Chang
01fc17e00a Merge "Fix sysui's security issue of cross-user copy/paste" into qt-dev
am: 743288a029

Change-Id: I7e67f0f6f4372b62bfac875ab6ebdcfb43aef3c7
2019-05-21 21:40:49 -07:00
Mihai Popa
3aa46b2dd0 [Magnifier-84] Improve PixelCopy failures handling
The CL adds PixelCopy failure handling in Magnifier. Previously, if the
content copy failed, the Magnifier would still render the shadow,
therefore displaying an empty rectangle shadow frame. The CL fixes this,
avoiding displaying anything if the PixelCopy request fails.

Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Bug: 132136368
Change-Id: I66715c56770380afafa5af5a3ee976bcaaa5ba1e
2019-05-21 17:08:52 +01:00
Bin Chen
d263141c4b [Magnifier-86] Fix deadlock causing ANR
"main" prio=5 tid=1 Blocked
  | group="main" sCount=1 dsCount=0 flags=1 obj=0x74aeca00 self=0x7021814c00
  | sysTid=27953 nice=-10 cgrp=default sched=0/0 handle=0x70a85ff548
  | state=S schedstat=( 31382082536 9164116362 28130 ) utm=2661 stm=477 core=0 HZ=100
  | stack=0x7ff7a52000-0x7ff7a54000 stackSize=8MB
  | held mutexes=
  at android.widget.Magnifier$InternalPopupWindow.destroy(Magnifier.java:607)
  - waiting to lock <0x0ef5c351> (a java.lang.Object) held by thread 13
  at android.widget.Magnifier.dismiss(Magnifier.java:191)
  - locked <0x01cd07b6> (a java.lang.Object)

 "hwuiTask1" prio=5 tid=13 Blocked
  | group="main" sCount=1 dsCount=0 flags=1 obj=0x12f815d8 self=0x70000e7800
  | sysTid=28075 nice=-2 cgrp=default sched=0/0 handle=0x70046ba4f0
  | state=S schedstat=( 138800095 85604746 532 ) utm=10 stm=3 core=1 HZ=100
  | stack=0x70045bf000-0x70045c1000 stackSize=1009KB
  | held mutexes=
  at android.widget.Magnifier$InternalPopupWindow.lambda$doDraw$0(Magnifier.java:663)
  - waiting to lock <0x01cd07b6> (a java.lang.Object) held by thread 1
  - locked <0x0ef5c351> (a java.lang.Object)
  at android.widget.-$$Lambda$Magnifier$InternalPopupWindow$vZThyvjDQhg2J1GAeOWCNqy2iiw.onFrameDraw(lambda:-1)

Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Idf0373ab0d5033d56da0f6f45d7d953f7e796813
Signed-off-by: Bin Chen <chenbin@vivo.com>
2019-05-21 17:08:45 +01:00
Lucas Dupin
96bc353645 Merge "Merge "Refresh should always update the field" into qt-dev am: ae61369c0d am: b87abd1b90" into qt-r1-dev-plus-aosp
am: 300b7ac0d8

Change-Id: I95368f7a6f83a738edbd8af99495fce3d31ce68c
2019-05-21 00:33:41 -07:00
Felka Chang
33f56060d5 Fix sysui's security issue of cross-user copy/paste
Background:
The applications with the granted INTERNAL_SYSTEM_WINDOW and
INTERACT_ACROSS_USERS_FULL means that it could show the same
window for all of users. i.e. to use user 0 presents all of
UI things to all of users.

INTERNAL_SYSTEM_WINDOW usually comes with INTERACT_ACROSS_USERS_FULL
because it will serve all of users to know the information that
comes from framework and system server.

Solution:
Because SystemUI never restarts after the user changing,
ClipboardService can't tell if the callingUid has the the same userId
with the current user or not.  The solution is to use the permission
check. Especially, INTERACT_ACROSS_USERS_FULL and
INTERNAL_SYSTEM_WINDOW. To check INTERACT_ACROSS_USERS_FULL by using
ActivityManagerInternal.handleIncomingUser.

Caution:
The application with INTERNAL_SYSTEM_WINDOW usually use user 0
to show the window. But, the current user is user 10, WindowManager
know the focus windows is belong to user 0 rather user 10. That's
why user 10 can't copy the the text from systemui directly reply to
the other applications.

Readability:
ClipboardService use callingUid everywhere but actaully it is not
appropriated to fix this kind of bug. This patch refactor the naming
to produce two name. i.e. intendingUid and intentdingUserId that are
validated by ActivityManagerInternal.handleIncomingUser.

Test: manual test
Test: atest android.widget.cts.TextViewTest
Test: atest CtsTextTestCases
Test: atest CtsContentTestCases

Bug: 123232892
Bug: 117768051
Change-Id: Ie3daecd1e8fc2f7fdf37baeb5979da9f2e0b3937
2019-05-21 14:16:59 +08:00
Lucas Dupin
2b68305b15 Merge "Refresh should always update the field" into qt-dev am: ae61369c0d
am: b87abd1b90

Change-Id: I99e1eb973042cc1c8e81767567552060638c226f
2019-05-20 17:48:48 -07:00
Lucas Dupin
60e01d99a8 Merge "Refresh should always update the field" into qt-dev
am: ae61369c0d

Change-Id: I1cc3170916480ee2722f12ee1c5c2f75ad2db5c5
2019-05-20 15:58:37 -07:00
Lucas Dupin
01c783823b Refresh should always update the field
Otherwise it's hard to keep track of things happening or not, since
the request would be postponed, leading to bugs elsewhere.

Test: Wait for time to pass on lock screen
Test: Enter/leave AOD
Fixes: 132955195
Change-Id: I54f806f9dd2d1cf4acac420bab08d4579f867a5f
2019-05-20 11:29:45 -07:00
Felipe Leme
911cb1fa76 DO NOT MERGE - Re-add ContentCapture support from standard SDK toolkit.
This reverts commit ef1c0b36ab.

Test: atest CtsContentCaptureServiceTestCases
Test: m update-api

Bug: 130726495

Change-Id: Iecda9df96722ac8a3184710796032b6c01bd8ea3
2019-05-16 16:05:51 -07:00
Ian Pedowitz
c338d744af Merge "Revert "Revert "Removing deprecated APIs added to Q""" into qt-dev am: 028b649f71
am: dc6e6cb522

Change-Id: I8d939062c7f4f77dd5dfaca5633bb66c06bf4b42
2019-05-15 23:48:42 -07:00
Ian Pedowitz
dc6e6cb522 Merge "Revert "Revert "Removing deprecated APIs added to Q""" into qt-dev
am: 028b649f71

Change-Id: Iaea4b1d980a21469a74f6571b7e41c4db070594f
2019-05-15 18:04:33 -07:00
Ian Pedowitz
164aa62fb2 Merge "Revert "Revert "Removing deprecated APIs added to Q""" into qt-dev
am: 028b649f71

Change-Id: Ifa06fa782c807fe282f38b028f33dbb481c0ddcc
2019-05-15 13:42:34 -07:00
Ian Pedowitz
028b649f71 Merge "Revert "Revert "Removing deprecated APIs added to Q""" into qt-dev 2019-05-15 16:28:54 +00:00
RyanlwLin
e2fa23b367 Fix Announcement of EditText when showing NumberPickerDialog
TYPE_WINDOW_CONTENT_CHANGED is sent from TextView when it's showing.
Talkback announce it because of ACCESSIBILITY_LIVE_REGION_POLITE.

Bug: 132309392
Test: manually test
Change-Id: Id1c9e63e40fbebea694991011e38084da167f66d
2019-05-14 03:50:22 +00:00
Ryan Mitchell
539cddfd0a Merge "Fix RelativeLayout rules" into qt-dev am: a04e6a22ea
am: edf745d255

Change-Id: I52904b32b6ec9ef1a6334dead39c594389868b2d
2019-05-12 21:11:14 -07:00
Ryan Mitchell
edf745d255 Merge "Fix RelativeLayout rules" into qt-dev
am: a04e6a22ea

Change-Id: I9d662f1faf113ab25cafddc909f0e569c1796651
2019-05-12 20:50:42 -07:00
Ian Pedowitz
cece8d3bd5 Revert "Revert "Removing deprecated APIs added to Q""
This reverts commit 1600c5a615.

Reason for revert: Rolling forward for Q-Finalization

Bug: 129975435
Change-Id: I1ffb8162cb5e6f386fd3c417fabfd4298ef86ffd
2019-05-12 19:46:31 +00:00
Ryan Mitchell
400bc93c71 Fix RelativeLayout rules
A previous change restricted rules that are added to the rule dependency
graph to resource ids rather than just integers greater that zero.
Restore the previous behavior and also allow for negative resource ids
to work as expected.

Bug: 132447676
Test: loaded maps and view looks as expected
Change-Id: I88d86c77c696d1e494a743fdd2e398283383c64e
2019-05-10 17:48:58 -07:00
George Mount
f0aff30653 Fix NPE in TextClock.
Fixes: 111901732
Test: Ran TextClockTest cts
Change-Id: Icaf7a7f6e3985bd58e22f74588e95d8a02b52187
2019-05-10 10:14:28 -07:00
Ian Pedowitz
f6f30d3a14 Revert "RESTRICT AUTOMERGE Removing deprecated APIs added to Q"
This reverts commit f6ed8afa40.

Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th

Bug: 129975435
Change-Id: If94098b7cc9cf75cf9782d2b70e01881f9c40430
(cherry picked from commit 1600c5a615)
2019-05-03 04:44:27 +00:00
Ian Pedowitz
a5ea4b9476 Merge changes from topic "QT-SDK-Finalization" into qt-dev am: 917936172f
am: a17eabdc62

Change-Id: If2c086628f4a8f980acbb3f1e8a4f76cb8a1bbcf
2019-05-02 16:49:32 -07:00
Ian Pedowitz
78f0efd3f3 Merge "Revert "RESTRICT AUTOMERGE Removing deprecated APIs added to Q"" into qt-dev
am: 4acb8f46bc

Change-Id: Ideea53935ba743127298aaaa2b5a993be2679038
2019-05-02 15:02:55 -07:00
Ian Pedowitz
a17eabdc62 Merge changes from topic "QT-SDK-Finalization" into qt-dev
am: 917936172f

Change-Id: Ia7d0a4971a702966968abb59685dd1a13dff03ec
2019-05-02 14:14:57 -07:00
Ian Pedowitz
1600c5a615 Revert "RESTRICT AUTOMERGE Removing deprecated APIs added to Q"
This reverts commit f6ed8afa40.

Reason for revert: QT SDK Finalization. Will be merged again on/after May 13th

Bug: 129975435
Change-Id: If94098b7cc9cf75cf9782d2b70e01881f9c40430
2019-05-02 00:56:02 +00:00
Suprabh Shukla
f6ed8afa40 RESTRICT AUTOMERGE Removing deprecated APIs added to Q
Test: Builds, boots

Bug: 129975435
Change-Id: If083957effedf7987b200c366f65d6863b99bca1
2019-05-01 14:04:37 -07:00
Nader Jawad
b59a3549ef Merge "Added BlendMode equivalent APIs to replace deprecated PorterDuff variants" into qt-dev
am: 5c5ffcbd7a

Change-Id: I14bdd95afdc7c329e818cd9507c8138124bd2c88
2019-04-18 14:42:11 -07:00
Neil Fuller
fb6e3753e3 Merge "Fix incorrect leap year logic" am: 8b5eb92120 am: 669915a986
am: 3077e4fd7b

Change-Id: I5ce3dcd1936619aadccb556171ddd86e3c104a42
2019-04-18 04:44:22 -07:00
Neil Fuller
3077e4fd7b Merge "Fix incorrect leap year logic" am: 8b5eb92120
am: 669915a986

Change-Id: If63d0b5cb89fa458d3f4924e6cfe537f672e0816
2019-04-18 04:34:05 -07:00
Nader Jawad
531db61ac1 Added BlendMode equivalent APIs to replace deprecated PorterDuff
variants

Updated various framework Views to have equivalent BlendMode APIs
to replace the deprecated PorterDuff equivalents.
Updated InspectableProperty annotations to refer to the same
xml attributes as the original tintmode APIs

Bug: 126726419
Test: Added CTS tests to verify new BlendMode APIs
Change-Id: Id9ab36d3d4d29f351250723e9d13d49bc6062c83
Merged-In: Id9ab36d3d4d29f351250723e9d13d49bc6062c83
2019-04-17 21:11:39 +00:00
Nader Jawad
0933505678 Merge "Added BlendMode equivalent APIs to replace deprecated PorterDuff variants" 2019-04-17 18:06:53 +00:00
Paul Sowden
6f8ca2df76 Merge "Add javadoc references to styleable attributes." 2019-04-17 17:52:21 +00:00
Neil Fuller
6c0984a71c Fix incorrect leap year logic
Fixing an issue for 2100 in SimpleMonthView.

Tweak the logic in DatePickerCalendarDelegate to optimize
for the common case and save a calculation.

Bug: 28784177
Test: build only
Change-Id: I7395ab9f3dc90ac4f7cef1edee6f7bc156f4ab76
2019-04-17 17:41:04 +01:00
Neil Fuller
4670b6e044 Merge "Fix incorrect leap year logic" am: ca13216bd1 am: ef56b49dfd
am: 1e1e148848

Change-Id: Ib7ad577c83a1ff7fe65d6534a9acb70d3d01f912
2019-04-17 09:28:18 -07:00
Paul Sowden
c73adb2415 Add javadoc references to styleable attributes.
Change-Id: I655a9efeb57c07167a08514c3f9ec13b674352c5
Test: make -j20 docs
2019-04-17 09:27:38 -07:00