* changes:
Changed Content Catpure workflow so it notifies when multiple changes are made.
Improved how Content Capture events are flushed when activity is resumed / paused.
Add a doc link to MotionEvent#CLASSIFICATION_AMBIGUOUS_GESTURE, to make
it easier for readers to cross-reference documentation.
Bug: 125800452
Test: m doc-comment-check-docs
Change-Id: Ic7a5a14d30c0cc3aa57f8bcd6af34e2e684f0437
Prior to this change, it sent a pair TYPE_INITIAL_VIEW_TREE_APPEARING and
TYPE_INITIAL_VIEW_TREE_APPEARED after the initial layout, then it would send invididual events for
the views appeared / disappeared.
This change improves the workflow by also sending this pair of events after each change, which lets
the service know that a bunch of changes were made at the same layout pass.
Test: atest CtsContentCaptureServiceTestCases # which was updated to listen to the new events
Test: m update-api
Bug: 125395044
Change-Id: Ied9def9c95dd0f7711f59bccb2cc89a766fdc36b
We were flushing right after the activity resumed, but the relevant events (views added / removed)
were not generated yet, which made such flushes useless.
This CL changes the workflow to flush them after the ViewRoot finishes doing its work.
Test: atest CtsContentCaptureServiceTestCases
Bug: 125395044
Bug: 122315042
Change-Id: I05bf27069b00c285643b2d23ad6708a6ad7bc8f3
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
Currently, IWindowSession#performHapticFeedback() would first lookup
the WindowState via IWindow token. That would also hold the WMS lock,
so if some function like relayout window is still hold WMS lock,
it may block the function.
Use uid and package name from Session that they already restored.
Bug: 62330939
Test: Open app with autofill edit, type with IME.
Change-Id: I359c106d213b87aa8afee48b0f1ad70011970eab
Added a new test method to allow the client to wait until input windows
have been propagated to InputFlinger before proceeding to inject input.
This ensures that the inject is called when all windows have been set
up.
Bug: 123041491
Test: ListPopupWindowTest, PopupMenuTest
Change-Id: I42abfa4ea23a14ae1a003c6ee8976cc466f1d5af
Prior to this CL we were just caching whether the service supported compatibility mode for the app,
but now we're also caching the logging level and whether the app is whitelisted for augmented
autofill - although right now the augmented autofill info is not used, it will allow us to trigger
it in the scenarios where autofill is disabled for the app.
Bug: 123099842
Bug: 123100824
Test: atest CtsAutoFillServiceTestCases:AugmentedLoginActivityTest \
CtsAutoFillServiceTestCases:VirtualContainerActivityCompatModeTest
atest CtsAutoFillServiceTestCases # sanity check, although still flaky
Change-Id: Iaf8ea6634ca94e5e61131890ec17c96c2fbb329a
- Load foreign language detection score threshold from model
- Pass resource config language to native code instead of Locale.getDefault()
- Avoid nullpointer exception in ExtrasUtils
- Don't set action_intents extras if empty
Bug: 124791964
Bug: 124794807
Test: atest core/tests/coretests/src/android/view/textclassifier
Change-Id: I2593d7cb4d364d8bf26239ed59b7212f79ddc350
Content Capture for an activity and/or package is only available when the Content Capture service
explicitly whitelists it. As the whitelist is kept at system-server level, it's better to fetch that
info when the application is started and cache it locally, so we can optimize the
ContentCaptureManager APIs to return quickly when it's disabled.
This CL also caches other values such as the buffer parameters.
Test: atest CtsContentCaptureServiceTestCases
Bug: 120494182
Bug: 121202151
Change-Id: I9d5211bca496ffa85ba9efc2a7bb32411834b787
Added syncInputWindows method to JNI and SurfaceControl.Transaction
This enables the caller to request SF to wait until input windows have
been synced with InputDispatcher.
Bug: 123041491
Test: builds, runs
Change-Id: I2ddaa3f43eded2fb117cc2850ee7c8a20b2b63ec
Adds a facility to sample the median luma in a region
of the SurfaceComposer's result.
Test: atest CompositionSamplingListenerTest
Bug: 124305231
Change-Id: I78eececa9aef420f488a860f4e6891d4af84d27f
Change the exitFreeformMode to toggleFreeformMode. Now the original
maximize button will work as maximize/restore button.
Test: go/wm-smoke
Test: Manual test.
Bug: 117075771
Bug: 124475503
Change-Id: I268d053ed0e665b8ac5e56019c6ae8f8b7ee1317
To re-enable, it will need to launch a Settings intent
(Settings.ACTION_REQUEST_ENABLE_CONTENT_CAPTURE).
Bug: 123286662
Test: atest CtsContentCaptureServiceTestCases
Change-Id: I0dd03013aba645c188af4034e530492d8294180e
The DisplayListCanvas override was on the dark grey list in P, not the
View override.
Test: m
Bug: 123987101
Change-Id: Ibc1503a8b5fe7dfe797835c972288c4b98362b65
- Replaced URI by a generic ID
(which is a new class LocusId, and required)
- Createad a new Intent.ACTION_VIEW_LOCUS action
(and Intent.EXTRA_LOCUS_ID extra)
- Removed ContentCaptureContext.getAction()
(so the only "supported" action is ACTION_VIEW_LOCUS)
- Made the ContentCaptureContext getters public
(getId(), getExtras())
Test: m update-api
Test: atest CtsContentCaptureServiceTestCases \
CtsContentTestCases:LocusIdTest \
FrameworksCoreTests:android.view.contentcapture.ContentCaptureEventTest
Bug: 123577059
Fixes: 124266664
Change-Id: Id4c28f056eb7a24dd083303ffdea7cf662cefac2
For now it only whitelists packages, not activities.
Test: atest CtsContentCaptureServiceTestCases
Bug: 122595322
Change-Id: I5beb9b027eb704510e68f3af15e84e14bda07eb2
For now it only whitelists packages, not activities.
Test: atest CtsAutoFillServiceTestCases:android.autofillservice.cts.augmented.AugmentedLoginActivityTest
Bug: 123100824
Change-Id: I043f4a22684fcdac7409393c208c2c1e6d987c5e
Android Studio's UI inspection tool needs access to the currently displayed
window(s) via publicly-accessible APIs given only a classloader -- it does
not have any activity or app Context.
Bug: 124516440
Test: atest WindowInspectorTest
Change-Id: I960165813c260ac8f8e17cc163fabf65b1417480