Adding for status bar, nav bar, and global actions dialog.
Also removing some extra code from global actions dialog
that populated window state changes. Apps in general don't
need this extra information, so we don't need to maintain
it in SysUi either.
In verifying the fix, I noticed that all windows were
considered anchored because of a mismatch between long and
int. Fixing that too.
Bug: 73131182
Test: With the testback a11y service, verified that these
titles do indeed appear in the window information provided
to accessibility services. Also noted that windows are no
longer reporting themselves as anchored.
Change-Id: Ie09fbb88250b3c9663d6c28001e0ce9f70c67954
The single usage we had was already mostly guarded by lock -
replaced with a regular list to prevent confusion
Fixes: 71795155
Test: atest CtsAccessibilityServiceTestCases
Change-Id: I1c3235aadb0db4907cbe92a17cc58d2c8a8b5564
Dew to a side effect of HWUI opengl pipeline, the hairline stroke
is not respected, but it is drawn as a fill style. Implement the
same behaviour for skiagl pipeline with SDK API 27 and older.
On SDK released with Android P, the hairline stroke is respected.
Bug: 72494357
Test: Ran duolingo app
Change-Id: I48bdcf3ddec4bf65b5e93e01c5002177c4e3da90
Add @GuardedBy for simple functions that require a single lock
and are named XYZLocked.
Bug: 73000847
Test: m
Test: m javac-check-framework RUN_ERROR_PRONE=true
Change-Id: Icb5114fea2ff2385e1cc7511121026099e05c0ee
This reverts commit bb5d97f00f.
Reason for revert: Launcher APK is landing shortly.
Test: Manual, swipe up to home in multi-window
Change-Id: I5d9050e51265bd4ca5ea2c28b7533571d03990f7
The pane title was not parceled and unparceled symmetrically.
Fixing that.
Also, the CTS test that should have caught this error is broken.
Providing a test API to do parceling without recycling, so
parceling can be tested in isolation.
Bug: 73084962
Test: Updated CTS AccessibilityNodeInfoTest used to pass. After
the fix to parcel in isolation, the test failed. Fixing the pane
title parceling allows the test to pass again.
Change-Id: I161ce93f8bdea5d5dd2d28cd38b58633f7742e56
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Change-Id: I02d659c127ebccb16d0150b7b70587a9d786331e
- Added missing fields such as viewResourceId, maxTextLength, and hint.
- Set input type class for passwords.
Test: manual verification
Bug: 72811034
Change-Id: I60dc7a368726d298f43e1f84b28561140ba10329
- In order to calculate the final target rect and window clip for the
app currently transitioning into the task view in launcher (similar to
how we did in SysUI), we need to provide the content insets and bounds
for both the app and launcher (whose activity may not yet have been
shown). For the existing recents transition, this was calculated
internally in the AppTransition aspect-scaled transition, but now that
we are implementing this via remote animations, the same information is
needed in the implementation of the recents animation runner.
Bug: 70294936
Test: Swipe up from launcher with window transitions when in multi window
Change-Id: I2afc6bdfe112cc7bb1b07ba65213653f6f0634f9
Note that there are edge cases where this diverges from O behaviour.
Specifically in the case where there is a more specific factory than
update model.
For example: system language is "en-us", factory model is v3 "en-us",
update model is v4 "en". In O, we would have selected the factory model,
now we select the update one.
This also fixes a bug that caused model versions to not get logged.
Test: Ran framework core tests, and tested manually.
Bug: 72427364
Change-Id: Ied35335512563e2cbaaeb5790b425b1e9fffbaa8
This CL addresses a typo in the JavaDoc of IMM#toggleSoftInput(),
which has prevented it from being treated as a valid JavaDoc.
Note that this CL removes @hide simply because it is too late. The
method in question has already been exposed to developers since API
level 3 (Cupcake) because of the typo.
Bug: 13002424
Test: make -j doc-comment-check-docs
Change-Id: I3e42d433f20c56ee63373bb390aad59e3bd7ec4f
Since P SurfaceControl does not accept zero size, thus we also stop
creating zero size drag shadow image.
Bug: 72416622
Test: Invoke startDragAndDrop with zero size shadow
Change-Id: I28f9cac419348a2550ac4db7de9016df82fc6385
Autofill helps users fill credentials, addresses, payment methods,
emails, etc without manually typing. When focus lands on a fillable
element the platform captures a snapshot of the screen content and
sends it to an autofill service for analysis and suggestions. The
screen snapshot is a structured representation of the screen content.
If this content is composed of standard widgets, autofill works
out-of-the-box. However, some apps do their own rendering and
the content in this case looks like a single view to the platform
while it may have semantic structure. For example, a view may render
a login page with two input test fields.
The platform exposes APIs for apps to report virtual view structure
allowing autofill services to handle apps that have virtual content.
As opposed to apps using standard widgets, this case requires the app
developer to implement the new APIs which may require a fair amount
of code and could be seen as a processes that could take some time.
The most prominent typs of apps that fall into this category are
browsers.
Until most apps rendering virtual content and specifically browsers
don't implement the virutal APIs, autofill providers need to fall-
back to using the accessibliity APIs to provide autofill support
for these apps. This requires developers to work against two sets
of APIs - autofill and accessibility - which is incovenient and error
prone. Also, users need to enable two plugins - autofill and
accessibility which is confusing. Additionally, the privacy and
perfomance impact of using the accessibility APIs cannot be addressed
while autofill providers need to use thes APis.
This change adds an autofill compatibility mode that would allow
autofill services to work with apps that don't implement the
virtual structure autofill APIs. The key idea is to locally enable
accessibility for the target package and remap accessibility to
autofill APIs and vise versa. This way an autofill provider codes
against a single set of APIs, the users enable a single plugin,
the privacy/performance implications of using the accessibility
APIs are addressed, the target app only takes a performance hit
since accessibility is enabled locally which is still more efficient
compared to the performance hit it would incur if accessibility is
enabled globally.
To enable compatibility mode an autofill service declares in its
metadata which packages it is interested in and also what is
the max version code of the package for which to enable compat
mode. Targeted versioning allows targeting only older versions of
the package that are known to not support autofill while newer
versions that are known to support autofill would work in normal
mode.
Since compatibility mode should be used only as a fallback we
have a white list setting with the packages for which this mode
can be requested. This allows applying policy to target only
apps that are known to not support autofill.
Test:
cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases
cts-tradefed run cts-dev -m CtsAccessibilityServiceTestCases
bug:72811034
Change-Id: I11f1580ced0f8b4300a10b3a5174a1758a5702a0
The majority of Manager-style classes already use Context.getUserId()
when making calls into the OS, so clean up the remaining callers to
unify behind this strategy.
This gives @SystemApi developers a nice clean interface to interact
across user boundaries, instead of manually adding "AsUser" or
"ForUser" method variants, which would quickly become unsustainable.
Test: builds, boots
Bug: 72863821
Exempt-From-Owner-Approval: trivial changes
Change-Id: Ib772ec4438e57a2ad4950821b9432f9842998451
Don't scale NinePatchDrawable if bitmap has no density.
Fixed bugs around density and input streams.
Update PointerIcon to account for the fact that BitmapDrawable no longer
scales its Bitmap up at decode time. PointerIcon now handles the
scaling. This is necessary because PointerIcon never draws its Bitmap.
Instead, native code uses the Bitmap's internal SkBitmap without
accounting for density.
Test: Ran CTS:
- CtsUiRenderingTestCases
- CtsGraphicsTestCases
- CtsViewTestCases
Change-Id: I030b4bb89c66b0102ccea2d85f5271197558d14e
Since P, we cannot create zero size surface. For compatibility, we
create 1x1 dummy surface when the app claims zero size surface.
Bug: 72416622
Test: Invoke startDragAndDrop with zero size surface
Change-Id: Ifefd07e93389979eaa2a6fbe29abe5850fcdef34
When user tries to switch IME, IMMS.showInputMethodPickerFromClient()
is called. The call fails to validate in newly introduced
canShowInputMethodPickerLocked() in
I4f0fc21268200c64d12b31ca54416acfbf62f37b because
mCurClient.client != client.
This is happening since the new client never started input ever since
we prevented calls to startInputUncheckedLocked in
Ibf9dab3d9c138b5f04e053d41ee4fd248c78e4da.
The fix is to update mCurFocusedWindowClient.client instead of
mCurclient.client in canShowInputMethodPickerLocked()
Fixes: 72557082
Test: manually using the steps in bug
Test: atest InputMethodManagerTest
Change-Id: I4e21625c32a0ca1abc740229efb3c7fcd97141cc
The smartselection token no longer accurately describes the purpose of the
model. This change brings the factory models in line with the path for the
updated model.
Test: Ran framework core tests and tested manually
Change-Id: I7641db313c94b99bb6960cf1efd24f796bb092a2