Commit Graph

11296 Commits

Author SHA1 Message Date
Xin Li
c76d117d2a DO NOT MERGE - Merge pi-platform-release (PPRL.190505.001) into stage-aosp-master
Bug: 132622481
Change-Id: I7ba1a9999b3a9bac8031dd086fa2632e45404f32
2019-05-15 11:31:45 -07:00
Treehugger Robot
90424e8060 Merge "Get new surface if it was released from setWindowStopped" 2019-04-15 22:52:55 +00:00
Neil Fuller
b5d1c15ec2 Switch from Byte.toHexString() to HexEncoding
Switch from Byte.toHexString() to HexEncoding equivalents.

Bug: 124232146
Test: build only
Exempt-From-Owner-Approval: Cherry-picking OWNERS approved internal version
Merged-In: Id244e5247eb87c67446cbd65eb5d320f3617b8cd
Change-Id: Id244e5247eb87c67446cbd65eb5d320f3617b8cd
2019-04-11 09:27:45 +00:00
Nicolas Geoffray
7ef8030754 Use Class.forName instead of ClassLoader.loadClass.
Class.forName has a fast path that ClassLoader.loadClass doesn't
have yet.

Bug: 129834244
Test: m
Change-Id: I52427be9dae5acd8eef530f706626246d16dc82a
2019-04-03 10:32:49 -07:00
Treehugger Robot
fdb8dfdadf Merge "Add missing checkThread" 2019-03-29 21:18:10 +00:00
John Reck
78704efc3a Add missing checkThread
Fixes: 129362490
Test: none
Change-Id: I9429b48291908db7021ad10a18ef3180c7e83bf9
2019-03-29 10:26:01 -07:00
Andrei Onea
fbc8cfdc94 Add @UnsupportedAppUsage annotations
For packages:
  android.companion
  android.filterfw
  android.hardware.camera2.utils
  android.inputmethodservice
  android.net.nsd
  android.os
  android.preference
  android.security.keymaster
  android.service.dreams
  android.telecom
  android.telephony.ims.compat.feature
  android.telephony
  android.util
  android.view.accessibility
  android.media.effect

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Merged-In: I9c2f8347952f3cc65759472b0e1a2717b285e44e
Change-Id: I14793863cf815fa3383fec6c6bf5a9365c2e17eb
2019-03-22 11:43:11 +00:00
Xin Li
3e112d56a4 DO NOT MERGE - Merge PPRL.190305.001 into master
Bug: 127812889
Change-Id: I7c5ada5c5afe38848be733616cbb1568440ab1c5
2019-03-12 00:17:37 -07:00
Andrei Onea
890db3d672 Add @UnsupportedAppUsage annotations
For packages:
  android.speech
  android.telephony.mbms.vendor
  android.view
  android.webkit

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Merged-In: Iefe25091fa0fcc0adfe4ff85fe5e3ab3ac9c5f10
Change-Id: I04104cf3852a0a7440676ccc55dd96c1eec730c4
2019-03-06 15:43:49 +00:00
Treehugger Robot
c5ea003bbb Merge "Fixes for touchpad capture" 2019-02-23 01:27:07 +00: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
Nathaniel R. Lewis
e1a3606ee6 Fixes for touchpad capture
When touchpad capture is enabled, events still are received via
onGenericMotionEvent. As pointer capture sends events via
onCapturedPointerEvent, this patch changes the callback used by
captured touchpads to also be onCapturedPointerEvent.

Make events from a captured touchpad cause the device to leave touch
mode. Captured mice cause the device to exit touch mode through
the virtual dpad which is mapped to it due to being
derived from SOURCE_CLASS_TRACKBALL.

Test: Write an app that starts pointer capture on a device with a
      touchpad. Events from touchpad should be received via
      onCapturedPointerEvent.

Test: Using the captured touchpad in the first test should cause the
      view to be focusable even when not in touch mode.

Change-Id: If6fa94c66f1d9395a13fd5f31f642567256dd818
2019-02-19 13:44:44 -08:00
Xin Li
0e71b4f19b DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into
stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393
2019-02-14 09:48:06 -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
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
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
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
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
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
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
Abodunrinwa Toki
5acf81a1f4 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
(cherry picked from commit a69950ce18)
2019-01-16 18:56:14 +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
Riddle Hsu
d8519b9d2e Get new surface if it was released from setWindowStopped
If there is no visibility change, when the stopped state
changed from true to false, there is no valid surface to use.

Bug: 80170221
Test: Sample app in bug link
Test: atest ViewRootImplTest
Change-Id: I2324ed32980aae5a3ec2efbd612e6c143c9a0022
Merged-In: I2324ed32980aae5a3ec2efbd612e6c143c9a0022
(cherry picked from commit af2748b28c)
2019-01-15 06:26:59 +00: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
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
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
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
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
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
Treehugger Robot
29f0f9a910 Merge "Update API doc of View.DragShadowBuilder" 2018-11-13 03:15:51 +00:00