Add @GuardedBy("mH") annotation for those Locked methods
which should be guarded by mH in InputMethodManager.
Bug: b/236937383
Test: presubmit
Change-Id: I271f78bc54c7cd406d56775aef0db9d6c4084ee0
In CL[1], we added @GuardedBy("mH") annotation for some
fields which should be guarded by mH for lock annotation
improvement.
Annotate more fields we miss in CL[1].
[1]: I3b345da25841b328358d16695e3a29ee65ae8d83
Bug: b/236937383
Test: presubmit
Change-Id: Ibee725dff3ff3d52f5b4d58e8bf2d8837dba665e
In InputMethodManager, we used the "mH" as a lock to
protect some fields and methods for thread safe.
Some of them are already protected with this lock but
they didn't have the annotation yet.
Add the annotation for those fields to prevent unexpected
behavior change and increase the readability.
Bug: b/236937383
Test: presubmit
Change-Id: I3b345da25841b328358d16695e3a29ee65ae8d83
This stores the computed decor insets and frame excluding insets.
So it can save 99% time of recomputing the insets every time during
starting an activity. E.g. dozen times of "prepare display info/frame,
compute window layout of insets source windows, calculate insets"
becomes "get result from array".
The saved decor insets will be updated when:
- Display metrics is changed (DC#updateBaseDisplayMetrics).
- Insets provider is added/removed/changed.
Also
- Use DisplayCutout rather than WmDisplayCutout to simplify
passing the cutout between methods.
- Optimize getSourceProvider to avoid unnecessary object allocation.
This also fixes an issue that the display doesn't compute the latest
configuration when navigation mode is changed. Now it is fixed by
checking if the insets provider has layout changes and then recompute
screen configuration.
Bug: 238399969
Bug: 159103089
Test: atest DisplayPolicyInsetsTests DisplayPolicyLayoutTests
DisplayPolicyTests#testUpdateDisplayConfigurationByDecor
Test: Change navigation mode or display size (density) in Settings.
And then swipe-up or press home key, there won't be a
frozen effect (display configuration change).
Change-Id: If6c28a89939372e6362b92f469ef7d793e8ec215
Add visible line bounds to CursorAnchorInfo for IME to improve
scribe rich gesture recognization accuracy.
Bug: 215533103
Bug: 239843501
Test: manually tested
Change-Id: I7039b75388ae34d24feb38d18d8da9a91df89504
The existing docs are incorrect and misleading. This change
fixes those docs to be more accurate.
Bug: 244193434
Test: Doc-only fix, no testing needed
Change-Id: I454786c2ef888417e96d7139efd1c922537188d6
This could happen if an app started to send events to
GestureDetector.onTouchEvent without sending an ACTION_DOWN event first.
GestureDetector must see a complete event stream for a gesture to behave
correctly. A complete event stream is defined as:
-One ACTION_DOWN event
-Zero or more ACTION_MOVE events and matched pairs of
ACTION_POINTER_DOWN/ACTION_POINTER_UP
-One ACTION_UP or ACTION_CANCEL
Bug: 242021191
Test: run cts -m CtsViewTestCases -t android.view.cts.GestureDetectorTest
Change-Id: I22a5d1c162885d08ee7dfe9deef2aed0ed801d16
Signed-off-by: huyuxin <huyuxin@xiaomi.corp-partner.google.com>
This API is same as using setFrameRate with 0 as frame-rate value. But
this causes confusion, as the remaining two arguments are ignored, when
frame-rate is 0.
Bug: 241096917
Test: android.graphics.cts.SetFrameRateTest#testClearFrameRate
Change-Id: I1324c64ac75dacb78a733df2b91d7a5b46fc7455
performHandwritingGesture should take an optional IntConsumer
& executor to provide result of Gesture operation back to IME.
Bug: 210039666
Bug: 239783077
Test: atest InputConnectionEndToEndTests
Change-Id: I2ca7eaa182159b7ffef0812d970512ffcf817ce2
Editors should declare which Scribe Gestures do they support
as a means of providing this info to IME.
Bug: 239783077
Test: atest CtsInputMethodTestCases
Change-Id: Ic52a48c0a04d405e65ad49e9d447d603fefb4eb0
API feedback:
1. use IntDef for toolType
2. Add javadoc in onUpdateEditorTooltip describing its called after
onStartInput.
Fix: 241206150
Bug: 233108064
Test: atest CtsInputMethodTestCases
Change-Id: I95bccd992690af5c160277b88a854d8f032278aa
The ArrayEquals, ArrayHashCode, ArrayToString, and
ArraysAsListPrimitiveArray errorprone findings were
demoted from errors to warnings. Fix existing
occurrences of them so they can be made errors again.
Bug: 242630963
Test: RUN_ERROR_PRONE=true m javac-check
Change-Id: Ia6f216cc36ad0a5758f39fd9b34962cd4adf9d8e
These flags have moved. Update the documentation stating which file to
keep the flag in sync with.
Bug: NA
Test: NA - documentation-only change
Change-Id: I679ee6534d697a9f2ba452a83258569688100707
Country code information is passed by a HID device over sysfs.
We can read that information and save it in InputDevice which
will be later used for auto-detecting Layout for PK.
More information in DD: go/pk_auto_layout_detection
Test: atest InputDeviceTest
Bug: 242715614
Change-Id: I97bde1f2338ad601a7e2636600038e6ca124e3ff