Handle onConfigurationChanged() in order to prevent restarting
InputMethodService everytime. We introduce a new API attribute
"configChanges" in InputMethod(attrs.xml) which when declared
by IME, will be responsible for handling mentioned
configuration changes.
Bug: 167948419
Test: atest InputMethodServiceTest
Manually:
1. Patch Ie91e7a8e06b80864ef9409031e8543858552d70d to use dual
display area.
2. Open applications with editors on both display areas.
3. Attach a debug point for IMS#onConfigurationChanged().
4. Make sure IMS#resetStateForNewConfiguration() is not called
when IME moves between these two identical DisplayAreas
Change-Id: Iff88b768c6b06cf5cf1fe9e97ee97f8f78e6f0bd
Followup to I5a5e73e1dec776665f28a7e2eb091b555198001b.
internalImeOptions field should be parcelable.
Fix: 157870379
Test: Manually using steps in bug
Change-Id: I12b442b8b2d8cf83aa4cc789133b42251ad2c191
As of today, IME surface is removed immidiately after its hidden.
This causes IME surface to be recreated when next time its requested,
which takes noticeable amount of time ~30ms on a typical phone [1]
In order to improve IME latency, we keep the surface in memory a little
longer.
This is ideal for use cases where IME has to move between DisplayAreas
OR when IME is closed only briefly.
While there could be other strategies to hold IME surface in memory,
timeout is simplistic and is also unaffected by IMF lifecycle, which
could vary when moving between DisplayAreas or Displays.
Bug: 167948419
Bug: 167948123
Test: atest CtsInputMethodTestCases
[1] refer design doc in bug 167947940
Change-Id: Ib062640b68164efbb647e7bf27b7f8eb5ed252dc
When an app is running in portrait orientation, regardless of
what orientation display is in, IME shouldn't use fullscreen-mode.
Setting IME_FLAG_NO_FULLSCREEN in EditorInfo makes sure IME doesn't go
fullscreen.
Bug: 157870379
Test: Manually using steps in bug
Change-Id: I5a5e73e1dec776665f28a7e2eb091b555198001b
Bug: 174932174
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.
Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas. Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:
-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage
Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance. With this extensive
effort, we've now improved our coverage as follows:
-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage
This specific change is automatically generated by a script that
identifies relevant "include" directives.
Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Revert "Verify lifecycle test when screen on/off"
Revert submission 12716106-ims_screenstate_lifecycle
Reason for revert: b/174512702
Reverted Changes:
Iba0332ed3:Verify lifecycle test when screen on/off
I8a657e75e:Let IME#onFinishInput called without dup onStartIn...
Change-Id: I16f4a34360a2f64b69978724648a9be741f140b5
This change dumps information through IME tracing for the getter methods
exposed by the InputConnection interface. The dump is done through the
ImeTracing interface and is triggered by events in the wrapper classes
used to handle InputConnection implementations corresponding to:
- different apps
- InputMethodService
The new data is available under inputConnectionCall in the clients
output proto.
Bug: 154348613
Test: flash a device
start IME tracing by calling "adb shell ime tracing start"
end IME tracing by calling "adb shell ime tracing stop"
pull generated trace files and visualize in Winscope
or start tracing directly through ADB Connect and visualize traces
Change-Id: Iabd6af1b858803030848a0ef5e7dd9ecfc562716
Also called IME#onStartInput without dup onFinishInput when screen-on,
to fix the long-standing IME input connection lifecycle issue when
device screen state changes.
Bug: 156215187
Bug: 26851566
Test: atest InputMethodStartInputLifecycleTest
Test: manual as below steps
0) Enable InputMethodService debug flag.
0-1) In Settings -> Develop options -> AppCompatibility Changes,
Select Gboard and then toggle
"FINISH_INPUT_NO_FALLBACK_CONNECTION" change.
1) Launch a app with focused a editor and show soft-input
2) When device screen turned-off, will see InputMethodService only
callbacks below logs:
CALL: doFinishInput
CALL: onFinishInputView
CALL: onFinishInput
3) When device screen turned-on, will see InputMethodService only
callbacks below logs:
CALL: onStartInput
CALL: onStartInputView
Change-Id: I8a657e75e274d842fb46b60375f6aeafeab96a59
* changes:
Log only current client data in IME tracing
Optimized workflow for IME tracing on InputMethodManagerService side
Optimized workflow for IME tracing on InputMethodService side
Optimized workflow for IME tracing on clients side
Otherwise, the fullscreen IME won't cover the entire display while
there is a hidden system bar.
Fix: 168657591
Test: 1. Steps in the bug.
2. Play WindowInsetsTests with combinations of system bar
visibilities, navigation mode, screen orientation, and display
cutout.
Merged-in: I6e7d665c55839dfbb14c8d2e5365537416f5f6c6
Change-Id: I6e7d665c55839dfbb14c8d2e5365537416f5f6c6
(cherry picked from commit 145f71182a)
Few low-hanging optimizations to improve IMF latency:
- Remove duplicate call to setImeWindowStatus when showWindow() is
called from showSoftInput() already.
- Remove redundant fancy animations preference check. IME window
animation is controlled by client.
- Cache mShowImeWithHardKeyboard early on.
- Remove rendundant removeOnComputeInternalInsetsListener() when called
from onCreate().
Refer to design doc in bug for amount of latency improvements caused by
this CL.
Bug: 167947940
Bug: 167948123
Test: atest CtsInputMethodTestCases
Change-Id: I0b0750f146634d8e90e0b0ac46e9208675626d0a
Optimized the tracing logic for the IMS information. The
InputMethodService triggers a tracing dump through the new method
triggerServiceDump, exposed by the meTracing interface. This
change was done to be able to support custom dumps from clients
and custom dumps from InputMethodService.
This change only covers the IMS information. The IMMS
information will be dumped in next changes.
Bug: 154348613
Test: start IME tracing by calling "adb shell ime tracing start"
end IME tracing by calling "adb shell ime tracing stop"
pull trace using "adb pull /data/misc/wmtrace/ime_trace_service.pb ime_trace_service.pb"
Change-Id: Icda0f82d76fb7db5b2bd8d021069b1ff15a4e15b
Having a hidden abstract method for a class that can be extended
means that public implementors cannot implement these hidden methods
posing a risk that custom implementations will not have required
abstract methods resulting in an exception.
Bug: 151134792
Test: make update-api
Change-Id: I758d12465fabc671be19bedeeceb16885de23c87
Exempt-From-Owner-Approval: large scale suppression of existing issues,
no-op in terms of behavior
Otherwise, the fullscreen IME won't cover the entire display while
there is a hidden system bar.
Fix: 168657591
Test: 1. Steps in the bug.
2. Play WindowInsetsTests with combinations of system bar
visibilities, navigation mode, screen orientation, and display
cutout.
Change-Id: I6e7d665c55839dfbb14c8d2e5365537416f5f6c6
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
Add methods to trace.
Refer to design doc in bug.
Bug: 167947940
Test: atest ImePerfTests and also refer to README.md
Change-Id: I423e4f3f9253707d9b6d3d5a2dee260f872b879f
- Instead of using the whole IME frame, we should only exclude the
left and right regions for excluding the back gesture (the intention
of the original change), otherwise the full IME frame will exclude
the bottom gesture area which is respected by Launcher to prevent
quickswitch.
Bug: 171501996
Test: Dump exclusion rects received by SysUI with normal IME (only edges)
floating IME (no exclusion requested) and extract mode (only edges)
Change-Id: Id8e01d56190f8fafdc2da1cf95203e597acdb970
Merged-In: Id8e01d56190f8fafdc2da1cf95203e597acdb970
(cherry picked from commit 72e6319254)
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
Bug: 170729553
Test: Treehugger
Merged-In: I8285daa8530260251ecad6f3f38f98e263629ca7
Change-Id: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
- Instead of using the whole IME frame, we should only exclude the
left and right regions for excluding the back gesture (the intention
of the original change), otherwise the full IME frame will exclude
the bottom gesture area which is respected by Launcher to prevent
quickswitch.
Bug: 171501996
Test: Dump exclusion rects received by SysUI with normal IME (only edges)
floating IME (no exclusion requested) and extract mode (only edges)
Change-Id: Id8e01d56190f8fafdc2da1cf95203e597acdb970
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
This is a resubmit of ag/12929664 with some APIs excluded that caused
test failures; see bugs 171886397, 171888296, 171864568.
APIs excluded:
Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord;
Landroid/os/Process;->myPpid()I
Landroid/os/SharedMemory;->getFd()I
Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I
Bug: 170729553
Test: Treehugger
Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
Bug: 170729553
Test: Treehugger
Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
This reverts commit 3cd311415b.
Reason for revert: The CL causes the regression b/170474494
And it also makes status bar color incorrect while
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS is cleared
Fix: 170474494
Change-Id: I26bed08456197721d07f2fab563be0c54e43efd2
(cherry picked from commit 427bdc1c86)
This reverts commit 3cd311415b.
Reason for revert: The CL causes the regression b/170474494
And it also makes status bar color incorrect while
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS is cleared
Fix: 170474494
Change-Id: I26bed08456197721d07f2fab563be0c54e43efd2
Improve latency of IME tracing by increasing the priority of the
tracing thread and adding the dump of the debugging information
at the beginning of the execution queue.
The Design Doc for IME tracing is found here: go/ime-tracing
Bug: 154348613
Test: start trace by calling "adb shell ime tracing start"
end trace by calling "adb shell ime tracing stop"
pull trace using "adb pull /data/misc/wmtrace/ime_trace.pb ime_trace.pb"
Change-Id: I153ccac6d8b93f86f3180b0a23240c6a63758ed6
This CL implements a mechanism to dump InputMethodService and IME
related server states into a proto file which can later be imported
to Winscope to allow easy debugging.
The Design Doc for the IME tracing project is: go/ime-tracing
Bug: 154348613
Test: start trace by calling "adb shell ime tracing start"
end trace by calling "adb shell ime tracing stop"
pull trace using "adb pull /data/misc/wmtrace/ime_trace.pb ime_trace.pb"
Change-Id: Icbfb8c11e882f29eb45dea9d4c23315c48e9d619