* changes:
If something is suppressed from the notification list don't bubble it
Tell NoMan to update the auto-expand flag
Allow SysUI to update BubbleMetadata#FLAG_AUTO_EXPAND_BUBBLE
The PositionUpdateListener sometimes gets called after the
FrameDrawingCallback, because there is no ordering guarantee between
these two callbacks. This causes the BlurRegions sent to SF to
not have up-to-date positions. For example, an empty Rect gets sent
as the blur region bounds, because the position update hasn't arrived
when the surface transaction is sent. When the position update arrives
it set the correct bounds, but it requires another draw to happen so
that the correct position is picked up.
This CL fixes this issue by saving the blur regions that were last sent
to SF in FrameDrawingCallback and sending another transaction when the
position update arrives. That transaction is merged into the previous
one for the same frame, so the final transaction sent to SF has correct
values.
The CL also moves the FrameDrawingCallback registering logic entirely in
the BlurAggregator in the first onPreDraw. This cleans up VRI
Bug: 197239228
Test: atest --iterations 100 BlurTest#testBackgroundblurSimple
Test: atest BlurAggregatorTest
Change-Id: Ia122df40fdf2aa124299461c2e2597b61fa92699
Will do further reductions later with a slower rollout.
Bug: 224816815
Test: atest ChooserActivityTest
Change-Id: I9c00137d73febca8f8576e579e55157aa1bd05fe
Also add a default onStopTrackingTouch() method in the
SeekBarVolumizer.Callback to let Settings inject the jank monitor.
Bug: 230285829
Test: make build
Change-Id: I9f5f511183f62caf809d7326766549b87d226b0b
Modernize the tabs in Sharesheet/Resolver to match All Apps.
Much of this is copied from the tabs implementation in All Apps.
Remove divider line below tabs (no longer needed).
More XML, less code.
Bug: 188589041
Test: Manual in light and dark themes
Test: atest ResolverActivityTest
Test: atest ChooserActivityTest
Change-Id: Ib23a1927d416d32714dd8c890dd412c73f9e573c
This flag should only really be applied to a notification bubble
one time. Once the bubble has auto-expanded (or if it was posted and
unable to auto-expand at that time due to something like DND), the
flag should be removed so we don't auto-expand it again.
We have a method that allows us to modify some specific flags on
BubbleMetadata. This CL updates that method to be more general and
work with any of the BubbleMetadata flags.
Bug: 226316876
Test: atest NotificationManagerServiceTest
Change-Id: Ib9653ed304f13ac88f489146d503f4de4fa29421
As noted in the linked bug, in certain scenarios IC established callback
is not always called. As a fix, we make sure we don't return early when
MSG_BIND callback is received from IME
Fix: 228105257
Bug: 217971553
Test: atest StylusHandwritingTest#testHandwritingEndToEnd
Change-Id: I780327003f7145c4f9b9df4dc5243227d7e67d92
A previous change accidentally lost this delay between
incremental screen captures. This rate limit is needed
to prevent pushing screen capture faster than it can
render correctly.
Bug: 173700533
Bug: 217046739
Test: manual; long screenshot, observe app systrace
Change-Id: Ibd7940299b502c40212957395d272b6e52cc28be
mUnfilteredResolveList was incorrectly being set as null whenever
performSecondaryResolveListFilterin didn't end up filtering anything
(when its value should have been maintained in this case).
This incorrect mUnfilteredResolveList null value causes most of
ResolverActivity's onTargetSelected() logic to be skipped, thus it
doesn't notify the package manager of the 'always' selection.
This should match the behavior before ag/17509713 and fix the bug.
Test: Manual testing (install two email apps, click an email addr link,
choose a resolver target and press 'always', then do it again and
resolver shouldn't appear).
Test: atest
CtsDynamicMimeHostTestCases:android.dynamicmime.cts.PreferredActivitiesTestCases#testModifyGroupWithoutActualGroupChanges
Test: atest ResolverActivityTest
Bug: 230149644
Change-Id: Ia23e95359d320a3a63e39f9c50a159879e94bf3b
To support Talkback to say "checked" when the current locale is
selected.
Bug: 228924751
Test: Using talkback
Change-Id: I3e2f8ba46106246e835e7ce5b580e501ab6c58c9
- The listener currently tracks session shown/hidden, but doesn't track
the visibility of the session window which can change on the client
side without the server knowing. In some cases, it's useful for SysUI
to be able to track the visibility of the session window to show/hide
bars appropriately.
Bug: 222308557
Test: Manual, launch the assistant and verify the calls are made
Change-Id: I9b4bb27c9497b2a828616caf72eaf345b072c294
Behaviorally, this is *almost* a pure refactoring. It does make
one very minor logic change(*) that could hypothetically fix a
race condition, although no particular bugs have ever been
observed as a result (nor do they seem especially probable), and
it's unknown what the severity would be if they ever were to occur.
Additionally, this change clarifies existing comments and adds
more inline documentation to help understand the rebuildList()
flow. Code cleanup identifies a few areas where the current design
seems a little clumsy, noted with new "TODO" comments in the code.
There's room for more improvement, but this function plays an
important role in preparing Sharesheet targets, so it's good to
bring attention to these thorny requirements.
For justifications of behavioral equivalence and other metacognitive
notes, see comments in the code review.
(*) The one behavior change is called out in code review comments;
briefly, the line of code that sends a synchronous "results
pending" event used to follow the line that started the async
flow that would result in a "results complete" event. This
could hypothetically race if the async work finished and sent
"results complete" before we got to the "results pending" line.
Bug: 227486788
Test: `atest ChooserActivityTest` (no behavior changes expected)
Change-Id: I2e74d68579be8b34716ba2202ac2a08361008400
Merged-In: I2e74d68579be8b34716ba2202ac2a08361008400
(cherry picked from commit 1e42cad19b)
Define the API for interacting with comparator model data;
provide implementations for our two current model types; and
(as a first step) re-write our legacy ResolverComparators
to be implemented internally in terms of their new model types.
This is the first CL in a multi-part cleanup of the
AbstractResolverComparator design. This demonstrates that the
role of an AbstractResolverComparator sub-class amounts to
(i.e., Ctrl+F "@Override") some amount of work to prepare model
data; some cleanup; and a set query methods against data that
*really should be* immutable (separated in this CL as the new
ResolverComparatorModel interace). Any remaining responsibilities
of the abstract base class would be better handled (in a subsequent
CL) by an external controller operating on a ResolverComparatorModel
(i.e., preferring composition to inheritance). The async
model-preparation steps should also be separated and cleaned
up (in a later CL).
I believe this to be a pure refactoring with no observable side
effects. While the new design aids in implementing the correct
"immutable snapshot" style, for now I've written the new
ResolverComparatorModel implementations to preserve any possible
quirks in the legacy implementations. Nevertheless, if some
inadvertant behavior change is introduced as a result of this CL,
it's most likely to be a bug-fix where we previously would've mixed
in stale data. A later CL will intentionally pursue those fixes.
Test: atest ResolverActivityTest ChooserActivityTest
Bug: 227486788
Change-Id: If88bf7a5a6394d81c021782d5d9bce7955f1c0e6
Merged-In: If88bf7a5a6394d81c021782d5d9bce7955f1c0e6
(cherry picked from commit 8b5d279d90)
Currently, IMMS will be notified asynchronously when an IME hide
animation finishes, via message dispatching through IMS
(IMM#notifyImeHidden -> IMS#notifyImeHidden -> IMMS#hideMySoftInput).
This creates a race condition when IMM#showSoftInput or WIC#show is
called around the end of hide animation.
This CL fixes the race condition by synchronously and directly
calling IMMS#hideSoftInput from IMM#notifyImeHidden.
Note that there is still another race condition for IMM#showSoftInput
(not WIC#show) if it's called during an IME hide animation;
IMM#showSoftInput ended up calling WIC#show asynchronously, but at that
time the running IME hide animation may have already been finished
successfully and WIC#show may fail to cancel the hide animation
(then the cleanup IMM#notifyImeHidden hides the IME again disruptively).
I will fix the latter issue in a separate CL.
Bug: 221483132
Bug: 225674038
Test: atest InputMethodStressTest
Test: atest CtsInputMethodTestCases
Test: atest WindowInsetsAnimationControllerTests
Change-Id: I7c71dc5a1d6b61aa79d1666f0e257e6401e4adb2
(cherry picked from commit 9065310f81)
Merged-In: I7c71dc5a1d6b61aa79d1666f0e257e6401e4adb2
This is a follow up CL to my previous CLs[1][2], which are submitted
almost at the same time but not compatible with each other.
The first CL [1] introduced a new behavior that negative indices
passed to
AccessibilityInputConnection#getSurroundingText(int, int, int)
result in IllegalArgumentException, which is a different behavior than
what's observed from IMEs.
The second CL [2] assumed that negative indices passed to that API
result in just receiving null result like what's observed from IMEs.
This CL effectively reverts the new behavior introduced in the first
CL [1] to keep two observable behaviors consistent.
Note that negative indices passed to getSurroundingText() are already
handled in
RemoteInputConnectionImpl#getSurroundingText()
in a graceful manner [3], which guarantees that the IME client process
will not see such an irregular parameter (Bug 169114026) with keeping
the InputConnection commands order (Bug 194110780).
[1]: I5ff2e804cbcf90828370a0612ff54111130bdff4
c60176c1f3
[2]: I62b80916369bdac981dc93c14dcaedc1f2b6e95f
495ac0f55cbcc976995e8c73fdc89babfbdce902
[3]: Ie0c18d0c9b8bf8f02f2fcdca5aac7e580c6bf2cd
8821afef81
Bug: 215633021
Fix: 229981360
Test: atest CtsInputMethodTestCases:InputConnectionEndToEndTest
Change-Id: I16a0185343c7c7c3e0947aab2c398714a1077b97
For more information, see go/sharesheet-list-view-update-delay.
Bug: 224816815
Test: `atest ChooserActivityTest`. The duration can be manually
configured by `adb shell device_config put systemui
sharesheet_list_view_update_delay n` to set a delay of n milliseconds.
With a timeout of 250 (as it was before this change), all the tests
still pass. With a timeout of 0, all tests pass but one (as described in
the doc linked above) -- a potential fix for that test will follow in a
subsequent CL.
Change-Id: Ia5edfe391b135659d2fd8126069c5cd6ce15653b
Merged-In: Ia5edfe391b135659d2fd8126069c5cd6ce15653b
Bug: 229226106
Test: check the trace in the bug
Test: atest InteractionJankMonitor FrameTrackerTest
Change-Id: If3e496b0178eca0555d14ce99bc462365805c4e1
LocalImageResolver should not upscale the image if it's already smaller than the maximum width.
Bug: 228719813
Test: atest LocalImageResolverTest
New test failed before change / passed after change
Change-Id: I4fc09d1955fe94159cf0e2e8125044712f3c3134
- When the Apps launch SAF, they can set initial uri to launch the
specific directory. Block the access for data/obb/sandbox
directories of Android
- Normalize path (E.g. the path includes . or ..) to avoid
unexpected behavior
Bug: 200034476
Bug: 220066255
Test: atest ExternalStorageProviderTest
Test: atest DocumentsTest
Change-Id: I226a9c25710fcf78d14d775eb3270bfd3b491dd3
Bug: 210453009
Test: manual test on local phone
Test: atest ChooserActivityTest
Change-Id: Ibcc83037ca801ee0ecf2306eae954677529fa849
(cherry picked from commit 6393225873)
Merged-In: Ibcc83037ca801ee0ecf2306eae954677529fa849
The helper methods provided by this class have been unused
since ag/13807667 (part of removing the old ChooserTargetService
functionality).
Test: http://cs/search?q=chooserutil&sq=package:android-internal
Bug: 148416928
Change-Id: I0aaaa5f597ef72097f1847a3187b335791287a60
Merged-In: I0aaaa5f597ef72097f1847a3187b335791287a60