Commit Graph

8222 Commits

Author SHA1 Message Date
Mihai Popa
c00e2718d0 Merge "[Magnifier-87] Fix deadlock causing ANR" 2019-06-17 21:13:15 +00:00
Mihai Popa
afee43bfa1 [Magnifier-87] Fix deadlock causing ANR
Before this CL, the magnifier could deadlock when the following
happened:
1. the renderer is asked to draw (and a frame callback is provided)
2. a #dismiss() happens on the UI thread. This acquires mDestroyLock
(previously line 309)
3. InternalPopupWindow#destroy() is called, and this calls
mRenderer.destroy(). This attempts to destroy the renderer on the UI
thread, however the UI thread will wait until the pending frame callback
corresponding to step 1 is executed on the render thread.
4. The frame callback starts executing on the render thread, and tries
to acquire mDestroyLock (previously line 1093). However, this is held by
the UI thread, so a deadlock happens.

This CL completely removes mDestroyLock, relying on the existing
synchronization between the UI and render threads described in step 3.

Bug: 134584742
Test: manual testing
Change-Id: Ia4c75b5b997e0ed94d5a3814dd4507a8fffa124d
2019-06-17 12:46:16 +01:00
Qasid Ahmad Sadiq
addec39fb7 Merge "Disabled items shouldn't also be marked as unactionable." into qt-dev am: 0963cc2418 am: f695023309
am: 315cd7d00f

Change-Id: Ia47380572b48df0d43f923791c1750b59cc3cb3c
2019-06-12 14:24:30 -07:00
Qasid Ahmad Sadiq
315cd7d00f Merge "Disabled items shouldn't also be marked as unactionable." into qt-dev am: 0963cc2418
am: f695023309

Change-Id: Ic6d82df2a5d16235acf241f845274c8a844cb5e8
2019-06-12 13:42:15 -07:00
Qasid Ahmad Sadiq
f695023309 Merge "Disabled items shouldn't also be marked as unactionable." into qt-dev
am: 0963cc2418

Change-Id: I990a85b223694123bbf9114e038373253fd4f25f
2019-06-12 13:26:09 -07:00
TreeHugger Robot
0963cc2418 Merge "Disabled items shouldn't also be marked as unactionable." into qt-dev 2019-06-12 20:10:31 +00:00
Qasid Ahmad Sadiq
08de63ea45 Disabled items shouldn't also be marked as unactionable.
Something can be clickable and disabled. Returning early here prevents that state to be reflected in ListView items.
The reported bug was happening because the items were disabled, but they weren't being reported as clickable.
Talkback doesn't read "disabled" for disabled items unless they are also actionable in certain ways.
Test: CTSAccessibility*, CTS AbsListViewTest, CTS ListViewTest, tried UI with sample app.
Fix: 131281972

Change-Id: Ic9b8c995398151f084d194e272ce082ec345e517
2019-06-11 18:58:21 -07:00
Adam Powell
2541038909 Merge "Gesture exclusion for seekbar thumbs/edit handles" into qt-dev am: 2b2d6f58c1 am: 076200294d
am: b2e12dec14

Change-Id: Id9d305327690ad41501c31d474790c9a92d332e8
2019-06-11 14:15:53 -07:00
Adam Powell
b2e12dec14 Merge "Gesture exclusion for seekbar thumbs/edit handles" into qt-dev am: 2b2d6f58c1
am: 076200294d

Change-Id: Iae84b29fe0d4e0e8e6874114944b981a9911c34a
2019-06-11 14:09:19 -07:00
Adam Powell
076200294d Merge "Gesture exclusion for seekbar thumbs/edit handles" into qt-dev
am: 2b2d6f58c1

Change-Id: I7485be0f36776fd3cd08aa4b3b20b7bf623c5eb1
2019-06-11 13:46:21 -07:00
Adam Powell
8624121b27 Gesture exclusion for seekbar thumbs/edit handles
Track gesture exclusion rects for seekbars and EditText selection and
cursor handles.

Bug: 133845668
Bug: 129338678
Test: cts/manual
Change-Id: I029d8ba465459f8ecaa14ee8ad0f5f4139b24e65
2019-06-10 20:24:20 +00:00
Feng Cao
d57c9734ec Merge "Only send text update for TextView after VIEW_ADDED is notified" into qt-r1-dev am: 691fa971ec
am: a1a275e63c

Change-Id: Ie5e4104e6111c3a5d326e621c2528ece42879ebf
2019-06-08 11:11:54 -07:00
Feng Cao
a1a275e63c Merge "Only send text update for TextView after VIEW_ADDED is notified" into qt-r1-dev
am: 691fa971ec

Change-Id: I7cd136b96fa62c79557768ecd1f75243bb75c670
2019-06-08 11:06:53 -07:00
Feng Cao
9e4ca44e28 Only send text update for TextView after VIEW_ADDED is notified
Test: atest CtsContentCaptureServiceTestCases (sanity check)
Fixes: 134309443

Change-Id: Ia94194576db0a1679bbb2a9b76c84a871b965435
2019-06-08 00:56:43 +00:00
Aurimas Liutikas
b51c200cf9 Merge "Record textAppearance information for TextView." into qt-dev am: e53837182c am: c38e9716a8
am: 6fa3d16fda

Change-Id: Idbe6319682a7475541819c340d1841008ccc1063
2019-06-07 16:07:53 -07:00
Aurimas Liutikas
6fa3d16fda Merge "Record textAppearance information for TextView." into qt-dev am: e53837182c
am: c38e9716a8

Change-Id: I82607f8843f5f34a4f169efcb6cf0836738c6d53
2019-06-07 16:01:31 -07:00
Aurimas Liutikas
c38e9716a8 Merge "Record textAppearance information for TextView." into qt-dev
am: e53837182c

Change-Id: I93a7c449a72bab5f25690505453432b551e3ff94
2019-06-07 15:51:30 -07:00
TreeHugger Robot
e53837182c Merge "Record textAppearance information for TextView." into qt-dev 2019-06-07 22:35:55 +00:00
Sunny Goyal
1a9fa0380b Merge "Resetting widget cache when some configurations change" into qt-dev am: 5cb8996742 am: 0dc76428f8
am: 71afd32213

Change-Id: If2ce6af8fb82379814bf43e9140ced4562bc36f1
2019-06-07 11:47:17 -07:00
Sunny Goyal
71afd32213 Merge "Resetting widget cache when some configurations change" into qt-dev am: 5cb8996742
am: 0dc76428f8

Change-Id: I8d58a14815be7afa8c6f905af15c3d8ce31286f9
2019-06-07 11:42:31 -07:00
Sunny Goyal
0dc76428f8 Merge "Resetting widget cache when some configurations change" into qt-dev
am: 5cb8996742

Change-Id: If13799bd7bde4a39744c355c1766e602cb9e7de9
2019-06-07 11:37:31 -07:00
Sunny Goyal
758e88bd44 Resetting widget cache when some configurations change
Sometimes widget providers hardcode colors in their remoteViews
by loading them from resources. On UI mode change, this can lead to
inconsistent UI if some widgets use a different configuration
than others.

Test: Verified with calendar widget on device
Bug: 133064045
Change-Id: If47a6b1973f55b7590f5d4116813d6a332951697
2019-06-06 17:02:55 -07:00
Torne (Richard Coles)
a759af55a4 Merge "Clarify problems with Linkify.MAP_ADDRESSES." into qt-dev am: a0d66cf3f6 am: 0f0173f9e1
am: c2ed59a2da

Change-Id: Ibc2165020ad583db1c4488e68f8d688e9d7a8fe5
2019-06-06 11:13:16 -07:00
Torne (Richard Coles)
c2ed59a2da Merge "Clarify problems with Linkify.MAP_ADDRESSES." into qt-dev am: a0d66cf3f6
am: 0f0173f9e1

Change-Id: Ib8f8c29444f9cf6e1c4de4c15d3a0b4d12632556
2019-06-06 11:02:29 -07:00
Torne (Richard Coles)
0f0173f9e1 Merge "Clarify problems with Linkify.MAP_ADDRESSES." into qt-dev
am: a0d66cf3f6

Change-Id: I10e7f3f8d14d15e3dbc5fd6f97bafc7442c91bb4
2019-06-06 10:59:15 -07:00
Torne (Richard Coles)
a50d608b89 Merge "Clarify problems with Linkify.MAP_ADDRESSES." into qt-dev
am: a0d66cf3f6

Change-Id: I264a589322b87b09a5d250f1a7e71b7f1795f3dd
2019-06-06 10:59:10 -07:00
Aurimas Liutikas
9504459279 Record textAppearance information for TextView.
Test: Added in CTS
Bug: 133773670
Change-Id: I1d66a75ef7aca11f577fe54b7ef393565a64da79
2019-06-05 15:49:20 -07:00
Torne (Richard Coles)
aa68ab8288 Clarify problems with Linkify.MAP_ADDRESSES.
Update the documentation for WebView.findAddress, as well as the related
functionality in Linkify and TextView, to clarify why the method is
deprecated, why it should not be used, and that it can cause unexpected
exceptions to be thrown from several places on older OS versions.

Fixes: 24676033
Test: m offline-sdk-docs
Change-Id: I45d82b9a4c9cf62d9566898dd21cd2139ad98f37
2019-06-04 14:14:05 -04:00
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
f752a6a86b Merge "[Magnifier-86] Fix deadlock causing ANR" into qt-dev
am: 0c7e69bdb6

Change-Id: Ib71dc3887e7501aa6a3abc71f0d23d2c6f5a32c5
2019-05-24 10:53:45 -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