Commit Graph

11315 Commits

Author SHA1 Message Date
Qasid Sadiq
24f953a6c2 Merge "Revert "Fix a11y cache correctness bug"" into pi-dev
am: 987ec033ab

Change-Id: I00d421256cbda478bf413a2195f14787d09d133c
2019-02-22 15:55:50 -08:00
Qasid Ahmad Sadiq
4d70022b88 Revert "Fix a11y cache correctness bug"
This fix introduced a painful crash that ends up disabling accessibility
services for certain users.
This happens when a client of AccessibilityCache tries to add a node, with the same id as a node previously in the cache, but fewer children, where the removed child is not in the cache.
This is because, when children are removed, and a the node is updated, the cache tries to clear the child trees. But if the child is not in the cache, the cache clears the whole tree. Every node is recycled.
Then the original node being replaced is attempted to be recycled again, and voila crash.

The fix also didn't fix the original issue based on the discussion in
b/114133438.

The risk for this is pretty low, since nothing was built on top of this.

This reverts commit 2f69c16c3d.
Bug: 124676705
Test: Tested to see if above usecase still happens.

Change-Id: I8a39698c4532a1613ba47e1c6ca70201cd496212
2019-02-21 21:07:12 -08:00
TreeHugger Robot
d14c8a2a72 Merge "RESTRICT AUTOMERGE Close TextClassifier native resources." into pi-dev 2019-02-14 16:22:18 +00:00
Kiyoung Kim
6b419380e3 Merge "Schematize Display system properties" am: db5c59214f
am: e3f4f5eedb

Change-Id: Iae50263941eed58171d9bf8d6cf47ab79362a977
2019-02-11 19:24:54 -08:00
Kiyoung Kim
e3f4f5eedb Merge "Schematize Display system properties"
am: db5c59214f

Change-Id: I363f989b8259adccc86c85708e64fcb05222e6fc
2019-02-11 19:13:06 -08:00
Treehugger Robot
db5c59214f Merge "Schematize Display system properties" 2019-02-12 02:50:08 +00:00
Phil Weaver
c36e36b87e Merge "Add owners for accessibility" am: bbbeba3c02
am: a525ea4436

Change-Id: Ia828c34be1f1dac6ea58ce0e68cf032f058dbb0b
2019-02-11 16:53:13 -08:00
Phil Weaver
a525ea4436 Merge "Add owners for accessibility"
am: bbbeba3c02

Change-Id: I099187d207d5610bc79d630f105bff2de41481c3
2019-02-11 16:34:27 -08:00
Abodunrinwa Toki
ec1b164923 RESTRICT AUTOMERGE Close TextClassifier native resources.
Bug: 122904322
Test: atest android.view.textclassifier.TextClassificationManagerTest
Test: (MANUAL)
      1. Start an app with a TextView
      2. Select the text to trigger the text selection toolbar and TextClassifier
      3. Close the app's activity by repeatedly clicking back on the nav bar
      4. Start a Profiler for the app and observe for memory growth
      5. Repeat 1 - 3 several times and observe.
         If the bug still exists, memory should grow at about 4 - 5MB.
	 If the bug is fixed, Memory should remain about the same across activity restarts.

Change-Id: Id9a60dea85cf3949de030042537287ddb29842a2
2019-02-08 13:05:38 +00:00
Phil Weaver
6ac1a60bf1 Add owners for accessibility
Test: Relying on treehugger. No functional changes.
Change-Id: I2511b04e56301bd34a8eaced7be8dd8582cc3cc7
2019-02-07 10:52:13 -08:00
Eric Holk
ce7aa1bf68 Merge "[layout precompilation] Add testing hook for precompiled layouts" am: 15b86c9037
am: 0b329918fc

Change-Id: I6417624f74b779e05f5a4a30c484487a943697c6
2019-01-30 10:24:43 -08:00
Eric Holk
0b329918fc Merge "[layout precompilation] Add testing hook for precompiled layouts"
am: 15b86c9037

Change-Id: I7c1e46dc5ebce025e1aafd6131596d352e0c1bc8
2019-01-30 10:11:53 -08:00
Eric Holk
3b95621e12 [layout precompilation] Add testing hook for precompiled layouts
We want to be able to control at a fine grained level whether precompiled
layouts are enabled so we can compare inflation results with and without. This
changes adds a @TestApi method that supports this.

Bug: 111895153
Merged-In: Ib6b62d79a9ca7aefefff8639752aa5838e491038
Change-Id: I2f28f6912499825e52c17cc163be9c0fe93855cb
2019-01-30 16:19:29 +00:00
Vishnu Nair
ccfc9c1480 Merge "[DO NOT MERGE] ViewRoot: Notify app when surface is released from setWindowStopped" into pi-dev
am: e532469994

Change-Id: Id420ae52be01629921f2a190a0c5b10d7e074316
2019-01-28 21:40:57 -08:00
Vishnu Nair
47d2d1e46a [DO NOT MERGE] ViewRoot: Notify app when surface is released from setWindowStopped
NativeActivities do not receive onNativeWindowDestroyed callback when the activity is stopped. If
the app still uses the window object after the window is destroyed, the app can crash.

Test: run native-plasma from Android NDK. Launch activity & press home. Verify from the logs app
receives onNativeWindowDestroyed callback when its stopped.
Test: go/wm-smoke

Bug: b/111948775, b/120100553
Change-Id: I1de76feb7f4974b77b42b56e592ff6444713c699
(cherry picked from commit e626d58c1b)
2019-01-24 15:55:18 -08:00
Kiyoung Kim
89052d92b3 Schematize Display system properties
Properties accessed across partitions are now schematized and will
become APIs to make explicit interfaces among partitions.

Bug: 117924132
Test: m -j
Change-Id: I4b49ed7e9b93c20855928ca61f9f128a0aa1d6d1
Merged-In: Id9bbb997669b05b6edb5307d561e766ead19abf1
2019-01-21 14:57:25 +09:00
Eric Holk
90d5dd50de Merge "[LayoutInflater] Use precompiled layouts if available" am: cb5f54e264
am: 3be49488d5

Change-Id: I2e714604fa13e9421987c57913bb099349172d45
2019-01-17 11:14:34 -08:00
Eric Holk
3be49488d5 Merge "[LayoutInflater] Use precompiled layouts if available"
am: cb5f54e264

Change-Id: I40f7755dc5b3f85181a73db24149e6f5a8e2b17a
2019-01-17 10:56:05 -08:00
Eric Holk
928bbac9c5 [LayoutInflater] Use precompiled layouts if available
This change enables the use of precompiled layouts, provided a couple of
conditions are met:

1. Precompiled layouts are enabled by the system property
   view.use_precompiled_layouts.
2. There is a file called compiled_view.dex in the application's code cache
   directory.

If these conditions are met, when a layout is inflated, the LayoutInflater will
first check if a precompiled version is available and use that. If anything goes
wrong, such as if the layout is not available or something goes wrong during the
inflation process, then the LayoutInflater will fall back on interpretting the
layout resource as before.

Bug: 111895153
Test: atest $ANDROID_BUILD_TOP/cts/tests/tests/view/src/android/view/cts/LayoutInflaterTest.java
Change-Id: Id050072c0206080322a0e876782ee2b66d03916d
2019-01-17 09:11:27 -08:00
Nikita Iashchenko
957fe88fc9 Merge "Switch TextClassifier implementation from native to java" am: 06eb53cede
am: 6ff8cf84f7

Change-Id: Ibd2281c89692d3b1630c3c259978ace8e241068f
2019-01-17 08:13:52 -08:00
Nikita Iashchenko
6ff8cf84f7 Merge "Switch TextClassifier implementation from native to java"
am: 06eb53cede

Change-Id: Iaaddc488874381fbc1f6b76f5f60dc47abf65cdd
2019-01-17 07:48:09 -08:00
Nikita Iashchenko
06eb53cede Merge "Switch TextClassifier implementation from native to java" 2019-01-17 15:34:02 +00:00
Nikita Iashchenko
7ea2f83f9f Switch TextClassifier implementation from native to java
Thic CL eliminates the native dependency on libtextclassifier in favor of the java one
because the .java implementation is built on top of stable APIs (@CorePlatformAPI, Android SDK)
while the native API might change in future, leading to breakages.

Bug: 119788152
Test: m droid successfully builds + atest frameworks/base/core/tests/coretests/src/android/view/textclassifier
Change-Id: I4c3bb4790c360dd514ed2ea48e0634de43dab9e7
Merged-In: Ide5e58d1c80d9a028cea4e9192a91aeac2843c71
(cherry picked from commit 64c4cb2ea9)
2019-01-15 13:23:17 +00:00
qinyige
fb9e440baf Merge "Avoid adding node itself as child node." am: e0a34bf17f
am: 234076ca37

Change-Id: I6f395d4c831a0a7ef60c7704461a071a9ce404f6
2019-01-12 08:14:37 -08:00
qinyige
234076ca37 Merge "Avoid adding node itself as child node."
am: e0a34bf17f

Change-Id: I5b86189d3ad1e3ead4b24f0c15c44d6beb2a0a4b
2019-01-12 07:50:12 -08:00
Treehugger Robot
e0a34bf17f Merge "Avoid adding node itself as child node." 2019-01-12 15:37:43 +00:00
Abodunrinwa Toki
adcd10f10f RESTRICT AUTOMERGE Do not linkify text with RLO/LRO characters.
am: a69950ce18

Change-Id: I0830e1c1a1cea2fd93f0b1ed8a1a792260201bb2
2019-01-07 17:10:30 -08:00
Manpreet
e9fe937245 Merge "Null locale causing the VTS fail." am: 179f30a443
am: 9568191633

Change-Id: Iab284dfc831a9079e339c8c23fba8f3e7e4ec04d
2019-01-06 20:44:13 -08:00
Manpreet
9568191633 Merge "Null locale causing the VTS fail."
am: 179f30a443

Change-Id: I8ae92392e70c046194df1c8ebee0bd32ed9513cf
2019-01-06 20:30:46 -08:00
Treehugger Robot
179f30a443 Merge "Null locale causing the VTS fail." 2019-01-07 04:19:22 +00:00
qinyige
0b5ca24a41 Avoid adding node itself as child node.
Apps can call addChild through AccessibilityNodeProvider, so it's
possible that an app adds a node itself as a child node. This will break
down the integrity of UI tree and cause failure to operation in
UIAutomator. Thus I suggest do this integrity check when adding child.

Test: as follows
    - built
    - flashed
    - booted
    - run my test script based on uiautomator

Change-Id: I8cba22a1d9d1a49365c6bce4241ef5067502fb79
Signed-off-by: qinyige <qinyige@xiaomi.com>
2019-01-07 10:31:42 +08:00
Eric Holk
9b9c255b88 Merge "Add tryCreateView to LayoutInflater" am: aa8f1b7033
am: 07b293f8af

Change-Id: Ia835f7a7488a084c72fd5722c91d01ddb427ea19
2019-01-04 17:27:45 -08:00
Eric Holk
07b293f8af Merge "Add tryCreateView to LayoutInflater"
am: aa8f1b7033

Change-Id: Ib89a1d1b292aca7404d646ff61974558422fc959
2019-01-04 17:17:28 -08:00
Eric Holk
29d0cd6fa1 Add tryCreateView to LayoutInflater
This method is needed so that precompiled layouts can reuse the factory logic
from the LayoutInflater.

Bug: 111895153
Test: atest android.view.cts.LayoutInflaterTest
Change-Id: Ifd1028906b655af2bd14247d586dc16b35550c82
2019-01-04 12:57:14 -08:00
Abodunrinwa Toki
a69950ce18 RESTRICT AUTOMERGE Do not linkify text with RLO/LRO characters.
Also don't show smart actions for selections in text with unsupported
characters.

Bug: 116321860
Test: atest android.view.textclassifier.TextClassificationManagerTest \
            android.text.util.cts.LinkifyTest \
	    android.text.util.LinkifyTest \
	    android.widget.TextViewActivityTest

Change-Id: I01b5e936aa4dfc937a98f50e9fc8171666861a61
2019-01-03 14:20:30 +00:00
Eric Holk
6abf873683 Merge "[LayoutInflater] Cleanup - remove some nesting" am: 3a0fe2cdab
am: a261d6e664

Change-Id: I8f6bb61ffc085ff224f631c916e19e05216faeed
2019-01-02 14:31:25 -08:00
Eric Holk
a261d6e664 Merge "[LayoutInflater] Cleanup - remove some nesting"
am: 3a0fe2cdab

Change-Id: I5f44de5983793c1a8e089977934d48bf032d0686
2019-01-02 14:13:34 -08:00
Eric Holk
bfc687007c [LayoutInflater] Cleanup - remove some nesting
The parseInclude method had some deep nesting that could be improved by
rearranging things a little.

Test: atest android.view.cts.LayoutInflaterTest
Change-Id: I2ee13c2ee80bcb220371d39a5a6da6044cfa245c
2019-01-02 11:11:24 -08:00
Mathew Inwood
8501ae1763 Merge "Limit access to suspected false positives." am: aeda49d185
am: 152d5a5dcd

Change-Id: I8e10322e69d2d479079df5cf8fec0287c7c117f1
2019-01-02 05:00:54 -08:00
Mathew Inwood
152d5a5dcd Merge "Limit access to suspected false positives."
am: aeda49d185

Change-Id: Ib24456aaad850d5aee46dd242513840511942536
2019-01-02 04:48:33 -08:00
Mathew Inwood
55418eada5 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0
Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 14:26:35 +00:00
Robert Carr
049902d9eb Implement construction of container layers am: c1ea10447f
am: ef7f39f4f5

Change-Id: I20c5e72ec3d278a3d9dd36618c45f32f330f72c6
2018-12-20 15:11:37 -08:00
Robert Carr
ef7f39f4f5 Implement construction of container layers
am: c1ea10447f

Change-Id: I5a8f0080051d2ae66a4a2f99c4a88ef452f0a467
2018-12-20 14:59:10 -08:00
Treehugger Robot
321b208f0f Merge changes from topic "fw_container"
* changes:
  DO NOT MERGE Set ContainerLayer for buffer-less surface
  DO NOT MERGE: WM: Restrict SC Builder to set a single surface type
  Implement construction of container layers
2018-12-20 22:45:18 +00:00
Manpreet
b99c60c36e Null locale causing the VTS fail.
Added a null check to avoid exceptions caused by timing delay during VTS run.This case fail is because AccessibilityWindowQueryActivity execute scheduleTraversals before Activity destroyed and execute doTraversal after Activity destroyed. This means window animation is not stop after AccessibilityWindowQueryActivity is destroyed and this will lead to test crash.

Test: Tested 5 times and it is passed 5 times.
Bug: 121169721
Change-Id: I915d46f925fb7a5ca43cac3ef3a343822b952b02
2018-12-18 05:48:07 +00:00
Xin Li
15b123ef45 DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into master
Bug: 120502534
Change-Id: Idc8bfb6d97a869b76cfb87ca1a494201baf9e8bd
2018-12-11 14:13:44 -08:00
Xin Li
75f75c18cc DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master
Bug: 120502534
Change-Id: I7351a1832c4bd2fd86324183ab83e9088d716822
2018-12-10 12:30:19 -08:00
Vishnu Nair
cb122ec8a5 DO NOT MERGE: WM: Restrict SC Builder to set a single surface type
When building a surface control, only allow a single surface type to be set, clearing any
previously set types so the surface creating flags remain valid.

Test: reboot device, rotate the screen, enter and exit multi window, check the UI is normal Dump SF layer and check the container layer is set successfully

Bug: 111164627

Change-Id: Ifc022881ee7fec0561a39ce647868d5b43cb49d9
2018-12-07 09:45:41 -08:00
Robert Carr
c1ea10447f Implement construction of container layers
Expose existing native functionality. In preparation for use as
bufferless-input-catching-surfaces.

Bug: 80101428
Bug: 113136004
Bug: 111440400

Change-Id: I455792aec3ee58d9dd20016b484ce7c27808d522
Merged-In: I455792aec3ee58d9dd20016b484ce7c27808d522
2018-12-07 08:55:00 -08:00
Daichi Hirono
1fa1b991f0 Merge "Update API doc of View.DragShadowBuilder" am: 29f0f9a910
am: 0539710f6f

Change-Id: I211e1b255fbdc4a49533409d7879f953780800a8
2018-11-12 19:47:19 -08:00