Mihai Popa
272285b0bd
Merge changes from topic "am-2d17369d-a241-482f-bad0-edb5147de00b" into nyc-dr1-dev
...
* changes:
[automerger] Optimise the hit test algorithm am: 71ecf5bd5c
Optimise the hit test algorithm
2018-06-06 16:21:21 +00:00
Android Build Merger (Role)
42eaa8f932
[automerger] Optimise the hit test algorithm am: 71ecf5bd5c
...
Change-Id: If1c91f3bc1e785434f153c5bc0d14befbc75e6cb
2018-05-31 16:46:17 +00:00
Mihai Popa
71ecf5bd5c
Optimise the hit test algorithm
...
Layout#getOffsetForHorizontal was running in O(n^2) time, where n is the
length of the current line. The method is used when a touch event
happens on a text line, to compute the cursor offset (and the character)
where it happened. Although this is not an issue in common usecases,
where the number of characters on a line is relatively small, this can
be very inefficient as a consequence of Unicode containing 0-width
(invisible) characters. Specifically, there are characters defining the
text direction (LTR or RTL), which cause our algorithm to touch the
worst case quadratic runtime. For example, a person is able to send a
message containing a few visible characters, and also a lot of these
direction changing invisible ones. When the receiver touches the message
(causing the Layout#getOffsetForHorizontal method to be called), the
receiver's application would become not responsive.
This CL optimizes the method to run in O(n) worst case. This is achieved
by computing the measurements of all line prefixes at first, which can
be done in a single pass. Then, all the prefix measurement queries will
be answered in O(1), rather than O(n) as it was happening before.
Bug: 79215201
Test: manual testing
Change-Id: Ib66ef392c19c937718e7101f6d48fac3abe51ad0
Merged-In: Ib66ef392c19c937718e7101f6d48fac3abe51ad0
2018-05-31 17:45:42 +01:00
Android Build Merger (Role)
05086b1008
[automerger] Make safe label more safe am: 2263da9539
...
Change-Id: If833354e5ae2b056de124fe23f0414c7654f6c33
2018-05-22 21:59:24 +00:00
Todd Kennedy
2263da9539
Make safe label more safe
...
* limit the absolute maximum size of the label to 50000 characters
[which is probably far more than necessary, but, can be dialed down]
* use a string buffer while processing the string [instead of creating
multiple string objects]
Bug: 62537081
Test: Manual. Install APK in bug and see that it can be uninstalled
Change-Id: Ibf63c2691ad7438a123e92110d95b1f50050f8b1
Merged-In: Ibf63c2691ad7438a123e92110d95b1f50050f8b1
2018-05-22 21:59:22 +00:00
Android Build Merger (Role)
97f7498c18
[automerger] Nullcheck to fix Autofill CTS am: 6c68a69288 am: 743abb939a am: a99414f51f am: 6b95503960 am: 9e291fe8c2
...
Change-Id: Ia6ba75b4938ab6d9ec0ffe1bc39b6ce6995a808e
2018-05-09 17:19:32 +00:00
Android Build Merger (Role)
9e291fe8c2
[automerger] Nullcheck to fix Autofill CTS am: 6c68a69288 am: 743abb939a am: a99414f51f am: 6b95503960
...
Change-Id: Ia3658c17dc890ca2de951da5c701e953ce8c969b
2018-05-09 17:19:18 +00:00
Android Build Merger (Role)
6b95503960
[automerger] Nullcheck to fix Autofill CTS am: 6c68a69288 am: 743abb939a am: a99414f51f
...
Change-Id: I7aaceff0646a5e738ed862c34645e548aabf62f1
2018-05-09 17:19:12 +00:00
Android Build Merger (Role)
a99414f51f
[automerger] Nullcheck to fix Autofill CTS am: 6c68a69288 am: 743abb939a
...
Change-Id: Ia89ea1adb47be3b70f5db292677c4c19194a04db
2018-05-09 17:19:07 +00:00
Android Build Merger (Role)
743abb939a
[automerger] Nullcheck to fix Autofill CTS am: 6c68a69288
...
Change-Id: I379d54d926e01da53b637bba6b3b1ee8577cbdbb
2018-05-09 17:19:02 +00:00
Eugene Susla
6c68a69288
Nullcheck to fix Autofill CTS
...
Test: presubmit
Fixes: 70506475
Bug: 69981755
Change-Id: I187bed4889a4901a7137a2995178ea651ed09186
2018-05-09 17:18:59 +00:00
Android Build Merger (Role)
b906043c81
[automerger] DO NOT MERGE Truncate newline and tab characters in BluetoothDevice name am: b6cde9ecc1
...
Change-Id: I3f951fac78c6e2da84eac511d3b0e19141e90153
2018-04-26 21:18:47 +00:00
Hansong Zhang
b6cde9ecc1
DO NOT MERGE Truncate newline and tab characters in BluetoothDevice name
...
Test: manual
Bug: 73173182
Change-Id: I3c25af233742e63351a68e8c5a279b51a94e49e2
2018-04-26 21:18:46 +00:00
Android Build Merger (Role)
365fb1c844
[automerger] DO NOT MERGE Truncate newline and tab characters in BluetoothDevice name am: 984dfe074c am: 8fbe4bce1e am: 0cd0cef08f
...
Change-Id: I937e2d9a676b38f6a18cda70f42d06eaa22ce051
2018-04-26 21:18:27 +00:00
Android Build Merger (Role)
0cd0cef08f
[automerger] DO NOT MERGE Truncate newline and tab characters in BluetoothDevice name am: 984dfe074c am: 8fbe4bce1e
...
Change-Id: If7693b2ff5785a1a09920061b318aaac33f5d6b6
2018-04-26 21:18:21 +00:00
Android Build Merger (Role)
8fbe4bce1e
[automerger] DO NOT MERGE Truncate newline and tab characters in BluetoothDevice name am: 984dfe074c
...
Change-Id: Iac403f5118d55d9919745d98eba260dd2929d56c
2018-04-26 21:18:14 +00:00
Hansong Zhang
984dfe074c
DO NOT MERGE Truncate newline and tab characters in BluetoothDevice name
...
Test: manual
Bug: 73173182
Change-Id: I3c25af233742e63351a68e8c5a279b51a94e49e2
2018-04-26 14:17:52 -07:00
Android Build Merger (Role)
93d9547b61
[automerger] RESTRICT AUTOMERGE: Prevent reporting fake package name - framework (backport to nyc-dev) am: 33c37cb37c
...
Change-Id: I793b787b6275262f1df6caa9262054e15c94840f
2018-04-09 22:24:08 +00:00
akirilov
33c37cb37c
RESTRICT AUTOMERGE: Prevent reporting fake package name - framework (backport to nyc-dev)
...
Test: added AccessibilityEndToEndTest#testPackageNameCannotBeFaked
cts-tradefed run cts -m CtsAccessibilityServiceTestCases
cts-tradefed run cts -m CtsAccessibilityTestCases
Bug: 69981755
Change-Id: I187e3e9839f654cea9e06e5de93e10e4d1de3109
2018-04-09 22:24:05 +00:00
Android Build Merger (Role)
0df0b30be9
[automerger] RESTRICT AUTOMERGE: Prevent reporting fake package name - framework (backport to mnc-dev) am: de71ee469a am: d672eef559 am: 86f5488521
...
Change-Id: I9f6c6fedfdc987a2acf1978a71fb0bdcd034e9e0
2018-04-09 21:00:20 +00:00
Android Build Merger (Role)
86f5488521
[automerger] RESTRICT AUTOMERGE: Prevent reporting fake package name - framework (backport to mnc-dev) am: de71ee469a am: d672eef559
...
Change-Id: Ib50692050fd4e62ad80f24531818a378c75dfe25
2018-04-09 21:00:15 +00:00
Android Build Merger (Role)
d672eef559
[automerger] RESTRICT AUTOMERGE: Prevent reporting fake package name - framework (backport to mnc-dev) am: de71ee469a
...
Change-Id: I000fae45e723679ba44b378a36a85daef20ae96d
2018-04-09 21:00:08 +00:00
akirilov
de71ee469a
RESTRICT AUTOMERGE: Prevent reporting fake package name - framework (backport to mnc-dev)
...
Test: added AccessibilityEndToEndTest#testPackageNameCannotBeFaked
cts-tradefed run cts --package android.accessibilityservice
cts-tradefed run cts --package android.accessibility
BUG:69981755
Change-Id: Id9990ccf1e88cea441f9b8927e849e67a059cfe4
2018-04-09 21:00:05 +00:00
Android Build Merger (Role)
9d13b0f6ca
[automerger] DO NOT MERGE Rework thumbnail cleanup am: b514ce9b38 am: b8dad6c644 am: 019eec3923
...
Change-Id: I9f69b090824a6c91bf11dbc0929ba5988a06af52
2018-03-15 19:59:37 +00:00
Android Build Merger (Role)
019eec3923
[automerger] DO NOT MERGE Rework thumbnail cleanup am: b514ce9b38 am: b8dad6c644
...
Change-Id: I8539a02510ed9a61b683c66c66de7d1b319c2603
2018-03-15 19:59:32 +00:00
Android Build Merger (Role)
b8dad6c644
[automerger] DO NOT MERGE Rework thumbnail cleanup am: b514ce9b38
...
Change-Id: I5cb1316547ced23a1259e068d1ea34631d105608
2018-03-15 19:59:26 +00:00
Marco Nelissen
b514ce9b38
DO NOT MERGE Rework thumbnail cleanup
...
Bug: 63766886
Test: ran CTS tests
Change-Id: I1f92bb014e275eafe3f42aef1f8c817f187c6608
Merged-In: I1f92bb014e275eafe3f42aef1f8c817f187c6608
2018-03-15 19:58:42 +00:00
Android Build Merger (Role)
75767d1e3c
[automerger] Rework thumbnail cleanup am: 0dc23f95a1
...
Change-Id: Ia3a740184191990fa43ca705b5eae8ea572fb6c1
2018-03-13 00:23:52 +00:00
Marco Nelissen
0dc23f95a1
Rework thumbnail cleanup
...
Bug: 63766886
Test: ran CTS tests
Change-Id: I1f92bb014e275eafe3f42aef1f8c817f187c6608
Merged-In: I1f92bb014e275eafe3f42aef1f8c817f187c6608
2018-03-13 00:23:51 +00:00
Android Build Merger (Role)
a1ad0de1f7
[automerger] [DO NOT MERGE] Copy PermissionChecker from support lib and use in RcognitionService am: 5a28e533fe am: b91acca082 am: 26aaadd3b5
...
Change-Id: Icf7b82e7dfbdebeb382c56e2c1db061abd87a3e9
2018-03-09 00:35:53 +00:00
Android Build Merger (Role)
26aaadd3b5
[automerger] [DO NOT MERGE] Copy PermissionChecker from support lib and use in RcognitionService am: 5a28e533fe am: b91acca082
...
Change-Id: I0cbca14aed609ab81556ee1deb72ef1e0e294256
2018-03-09 00:35:48 +00:00
Android Build Merger (Role)
b91acca082
[automerger] [DO NOT MERGE] Copy PermissionChecker from support lib and use in RcognitionService am: 5a28e533fe
...
Change-Id: I09ac593ade4e725b560384042304f93f451b5be5
2018-03-09 00:35:42 +00:00
Eugene Susla
5a28e533fe
[DO NOT MERGE] Copy PermissionChecker from support lib and use in RcognitionService
...
Fixes: 73511076, 73311729
Test: presubmit
Change-Id: Ie98f67ffee4744050ac85d8b229370a16a76a194
(cherry picked from commit 726b51a26e )
2018-03-09 00:35:39 +00:00
Siyamed Sinir
eaa093272e
Merge "DO NOT MERGE Fix mTrustManager NPE" into mnc-dev
2018-02-15 00:14:36 +00:00
Android Build Merger (Role)
15a3e59d35
[automerger] DO NOT MERGE Fix mTrustManager NPE am: a381c4ced3 am: 30a705874a am: 85727109f0
...
Change-Id: I80463ee5315c2672e812659192b227c8271e9113
2018-02-15 00:05:49 +00:00
Android Build Merger (Role)
85727109f0
[automerger] DO NOT MERGE Fix mTrustManager NPE am: a381c4ced3 am: 30a705874a
...
Change-Id: Ic83a666bae330bea031b95233079e1493c02c9b3
2018-02-15 00:05:43 +00:00
Android Build Merger (Role)
30a705874a
[automerger] DO NOT MERGE Fix mTrustManager NPE am: a381c4ced3
...
Change-Id: Ib622af453781a1769e820c10d6ab46c140809c57
2018-02-15 00:05:38 +00:00
Android Build Merger (Role)
7341805cac
[automerger] Adjust URI host parsing to stop on \ character. am: fa3afbd0e7 am: 97668ae137 am: fddbf1b6b2 am: d3c0db66b9 am: 373cfa75c0 am: bdff04aba3
...
Change-Id: Ieddabe1b12f34bd7632ce893ef4e0c298f5c44df
2018-01-31 11:20:41 +00:00
Android Build Merger (Role)
bdff04aba3
[automerger] Adjust URI host parsing to stop on \ character. am: fa3afbd0e7 am: 97668ae137 am: fddbf1b6b2 am: d3c0db66b9 am: 373cfa75c0
...
Change-Id: Ia7b1157fb7f2066e26dc82ec703f39cd9fa69fd7
2018-01-31 11:20:28 +00:00
Android Build Merger (Role)
373cfa75c0
[automerger] Adjust URI host parsing to stop on \ character. am: fa3afbd0e7 am: 97668ae137 am: fddbf1b6b2 am: d3c0db66b9
...
Change-Id: If07298bb4ecf8a55391a014568a3ea264358b0e9
2018-01-31 11:20:21 +00:00
Android Build Merger (Role)
d3c0db66b9
[automerger] Adjust URI host parsing to stop on \ character. am: fa3afbd0e7 am: 97668ae137 am: fddbf1b6b2
...
Change-Id: I3fd20a3ee5eaa6be1c1989f13d40aed34136557e
2018-01-31 11:20:15 +00:00
Android Build Merger (Role)
fddbf1b6b2
[automerger] Adjust URI host parsing to stop on \ character. am: fa3afbd0e7 am: 97668ae137
...
Change-Id: Ic336b5fafebabdd4a5ad4d775a96d76739189a09
2018-01-31 11:20:08 +00:00
Android Build Merger (Role)
97668ae137
[automerger] Adjust URI host parsing to stop on \ character. am: fa3afbd0e7
...
Change-Id: I20336a5786e753e6941b9a784068480475415110
2018-01-31 11:19:56 +00:00
Adam Vartanian
fa3afbd0e7
Adjust URI host parsing to stop on \ character.
...
The WHATWG URL parsing algorithm [1] used by browsers says that for
"special" URL schemes (which is basically all commonly-used
hierarchical schemes, including http, https, ftp, and file), the host
portion ends if a \ character is seen, whereas this class previously
continued to consider characters part of the hostname. This meant
that a malicious URL could be seen as having a "safe" host when viewed
by an app but navigate to a different host when passed to a browser.
[1] https://url.spec.whatwg.org/#host-state
Bug: 71360761
Test: vogar frameworks/base/core/tests/coretests/src/android/net/UriTest.java (on NYC branch)
Test: cts -m CtsNetTestCases (on NYC branch)
Change-Id: Id53f7054d1be8d59bbcc7e219159e59a2425106e
2018-01-31 11:14:45 +00:00
Siyamed Sinir
a381c4ced3
DO NOT MERGE Fix mTrustManager NPE
...
When isDeviceLocked function is called in KeyguardManager, mTrustManager
can be null. To prevent NPE during this call, moved the mTrustManager
access to a synchronized getter.
Test: run cts -c android.print.cts.PageRangeAdjustmentTest -m testWantedPagesAlreadyWrittenForPreview
Test: run cts -c android.accessibilityservice.cts.AccessibilityEndToEndTest -m testTypeViewTextChangedAccessibilityEvent
Test: run cts -c com.android.cts.appsecurity.DocumentsTest -m testCreateExisting
Test: run cts -c com.android.cts.devicepolicy.ManagedProfileTest -m testCrossProfileCopyPaste
Test: run cts -c android.text.method.cts.PasswordTransformationMethodTest
Bug: 69471788
Change-Id: I4b4a0bb3b127424fecdad85ba559ce861af165e4
2017-12-22 21:09:39 +00:00
Adam Vartanian
f61daaa333
Adjust Uri host parsing to use last instead of first @. am: cd6228dd37 am: 6a9c7c4814 am: 4158c9fbf3 am: eee677386e am: 49e5fca362 am: 240b55de2c
...
am: 3ac5dabc21
Change-Id: I43fbad45f90ec2d1fb48fecbd2d73a05f39730a9
2017-11-07 22:12:09 +00:00
Adam Vartanian
3ac5dabc21
Adjust Uri host parsing to use last instead of first @. am: cd6228dd37 am: 6a9c7c4814 am: 4158c9fbf3 am: eee677386e am: 49e5fca362
...
am: 240b55de2c
Change-Id: Ie3d378e8d9aeaff6f45838ebe988a5799f6acf3b
2017-11-07 21:56:10 +00:00
Adam Vartanian
240b55de2c
Adjust Uri host parsing to use last instead of first @. am: cd6228dd37 am: 6a9c7c4814 am: 4158c9fbf3 am: eee677386e
...
am: 49e5fca362
Change-Id: Id6f38542623d768bebcfae7e79e8e49450329037
2017-11-07 21:41:55 +00:00
Adam Vartanian
49e5fca362
Adjust Uri host parsing to use last instead of first @. am: cd6228dd37 am: 6a9c7c4814 am: 4158c9fbf3
...
am: eee677386e
Change-Id: Ifd94d94c5376a6b4f1174aa7c2c8bb6d40199d89
2017-11-07 21:29:27 +00:00
Adam Vartanian
eee677386e
Adjust Uri host parsing to use last instead of first @. am: cd6228dd37 am: 6a9c7c4814
...
am: 4158c9fbf3
Change-Id: I61bc0f5471d8f7a9a59136f320d465f2ee81b518
2017-11-07 21:02:07 +00:00