By default cutouts are centered and support a @right marker to allow
them to be right aligned. Let's also support left alignment by
introducing a @left marker.
Test: atest DisplayCutoutTest
Test: manual
Bug: 143222961
Bug: 145707162
Change-Id: Ic5a645bd9f0513f3665f31c8b0f1861585bf30e6
Merged-In: Ic5a645bd9f0513f3665f31c8b0f1861585bf30e6
(cherry picked from commit 6e9636c5e0)
Fixed a clear copy/paste error, docs had said "call getHeight() to
get the width" when it should have been "...to get the height".
Skipping staging since it's a simple text change.
Change-Id: Ic06557ac38517f409943585054835d774240ccf3
Test: make ds-docs
Exempt-from-owner-approval: Docs-only change
Bug: 144537947
userId is a new field added in ag/8350816, and it is written in between
some old fields when we parcelize it.
That breaks AiAi because some of its code rely on the implementation
details of SelectionEvent.writeToParcel.
In the long run, we may want to update AiAi such that it works
without this assumption, but before that, let's fix that in platform
for now.
Bug: 145962464
Bug: 123232892
Test: atest FrameworksCoreTests:android.view.textclassifier.SelectionEventTest
Merged-In: I98137a095cddf0fb4c600e1e09eef507bb750528
Change-Id: I66f65ac4c81ca964f710404fd081496355276435
Any pending windowGainedFocus future should be cancelled when IME is
switched/unbound.
Additinally, startInputInner() inside synchronized block blocked
WINDOW_FOCUS_GAIN from executing. Its fine to remove synchronization
here since startInputInner() already has relevant synchronized blocks.
Change-Id: I98cb044d8cbfb80480312a3923f168aefa9b7e7d
Fix: 144103599
Bug: 139806621
Test: Manually using the steps in bug.
(cherry picked from commit 322ee9bf9e)
For a typical window with Editor, IMM#startInputOrWindowGainedFocus
is called twice: first for WINDOW_FOCUS_GAIN (dummyInput), then
CHECK_FOCUS when actual editor receives focus and startsInput.
The first once can be moved to background thread and second startInput
will wait till its finished.
Bug: 139806621
Test: Manually launch activities with editors and confirm no change in
behavior.
Change-Id: I6aa4a664cfd0c86f75cee2457715317194bbe5e2
(cherry picked from commit e0172102b9)
Instead of doing lazy serialization of SKP on the
background executor serialize to a byte[] immediately
at callback invocation. This ensures no potential
for later mutations, race conditions, or wrong-thread issues
at the expense of potentially impacting app rendering performance.
However it seems preferable for a debug-only tool to be a slow
instead of very crashy.
Bug: 141772764
Test: test app
Change-Id: I3316d49970b96f1c59bb0a28ff7335db608e539e
- Ensure that the composition sampling listener is destroyed when the nav
bar is destroyed instead of waiting for the finalize callback. That
callback would never be made since the sampling listener has a reference
to the outer class and has a strong ref from SF, and the other class
has itself a reference to the listener.
- Always unregister the nav bar fragment from the mode change callbacks
Bug: 141473489
Test: Switch navigation modes a couple times, take hprof dump and verify
there aren't leaking classes
Change-Id: Ic389a559a3d430af495365102854d531f7d1966d
Merged-In: Ic389a559a3d430af495365102854d531f7d1966d
Uses a delegate and more realistic method contents. Also added
language switcher for Kotlin-based and Java-based code.
Test: make ds-docs -j32
Bug: 138849874
Change-Id: Id31cf944f4adab2f09cf5004d68434b445da6eeb
- Use the precalculated aggregate visibility instead of traversing
hierarchy again in isShown()
Bug: 140157754
Test: atest SystemGestureExclusionRectsTest
Change-Id: Ica58de4ff43da75cfcdac3f359fc915f65608e78
Sometimes, the activityViewToScreenMatrix is null, we should skip
updateing cusor anchor info in such cases.
Fix: 139135335
Test: Manually using the steps in bug.
Change-Id: Ie58ad9a311a8f630b0a6d27d60ca017abc95ef45
Sys UI runs on user 0. This can lead to the TextClassifier (TC)
running for the wrong user. Consequencies are user A can launch apps
in user B via the TC's predicted actions and selected text being
unintentionally shared from user A to an app running in user B.
This fix ensures that the correct user id is passed and verified for
every TC request going across process boundaries (i.e. via SystemTC).
- Sys UI sets the appropriate user id in the TextView
- TextClassificationManager (TCM) system service is constructed using
a context generated from this user id
- SystemTC sets this user id before querying the TCMService
- TCMService validates the user id before forwarding the request to
the TCService belonging to that user id.
Bug: 136483597
Bug: 123232892
Test: atest android.view.textclassifier
atest android.widget.TextViewActivityTest
(manual) See I2fdffd8eb4221782cb1f34d2ddbe41dd3d36595c
Change-Id: Ibe68bc9e257521de97cbb014176b2b8ba23547d1
For backward compatibility, SurfaceView ignores alpha value by
default. In order to reflect alpha value set on the SurfaceView
to its underlying surface, setUseAlpha() needs to be called.
Translucent alpha only works when the surface is placed z-above.
Otherwise only fully opaque and transparent status are supported.
Bug: 137937105
(Orignal bug from b/130442248)
Test: Manual, use BubblesTest app and checks if alpha is set.
Change-Id: I86847de59109b2adf12a2c7c50c988c2cbcf0450