NO_INPUT_CHANNEL is a hidden WM flag that allows creation of a window
without an input channel. Unfortunately in releases prior to Android R
this would allow creation of a Window which will not be known to the
InputDispatcher at all. This means that the logic generating
FLAG_OBSCURED will work and a window will be able to overlay another
window without the overlayed window being notified. In Android R and
later this isn't a problem as the InputDispatcher is informed of all
windows, input channel or not. For past Android releases, this patch
disables NO_INPUT_CHANNEL for use outside of the WM.
Bug: 152064592
Test: Existing tests pass
Change-Id: I7e1f45cba139eab92e7df88d1e052baba0ae2cc6
If long press timeout is not 'short', we disable deep press.
Also InputManagerService.java will now be responsible for keeping track
of the feature state.
In ViewConfiguration, we update the default value to 400 to match the
value in the settings (b/30159825)
Bug: 148311342
Bug: 30159825
Test: see the description in the frameworks/native change
Change-Id: I88b933e9e863d40e383afdc990e09b848e23192e
Merged-In: I88b933e9e863d40e383afdc990e09b848e23192e
* changes:
DO NOT MERGE: Revert Move startInput for WINDOW_FOCUS_GAIN to background thread
DO NOT MERGE: Revert: Freeup lock when IME is set inactive and unbound
Reason for revert:
Caused an unexpected regression Bug 144174015
Bug: 139806621
Bug: 144103599
Fix: 144174015
Test: Manually verified Bug 144174015 disappeared as follows
1. Open Gmail then start composing an email
2. Swipe up the home button to recents then re-launch Gmail
3. Do the step 2 several times.
4. Make sure that you can still type something on Gmail.
Change-Id: I9265f01ed2f6e4aca7728d278f06ceea5633dac5
Reason for revert:
Caused an unexpected regression Bug 144174015
Bug: 139806621
Bug: 144103599
Fix: 144174015
Test: Manually verified Bug 144174015 disappeared as follows
1. Open Gmail then start composing an email
2. Swipe up the home button to recents then re-launch Gmail
3. Do the step 2 several times.
4. Make sure that you can still type something on Gmail.
Change-Id: I04a77afea17f9d3eb05017fa00313fad4e48cd5c
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