* changes:
Add hidden API to query the bluetooth address of an InputDevice
Native input manager: Add default initializers for locked members
Introduce monitoring behavior changes for USI devices (3/n)
Notify the policy when a stylus gesture starts
Since revealing the bluetooth address of an input device can reveal
whether bluetooth is enabled, we require the BLUETOOTH permission for
this API.
This also means we cannot send the bluetooth address to apps using the
InputDevice class. We add an IInputManager method to query the address
instead that performs the permission check.
Since we are not using the Java InputDevice class to store the address,
we must cache the vector of last-reported InputDeviceInfos in
NativeInputManager.
DD: go/inputdevice-battery-notifications
Bug: 243005009
Test: manual
Change-Id: I560cb170ab7008314821e5150caf4868efb5d8d5
This is a mechanical renaming for classes outside
android.view.inputmethod package.
For non IMF classes, let's expose InputMethodManagerGlobal rather than
IInputMethodManagerGlobal.
In the next CL [1], we want to merge IInputMethodManagerGlobal and
IInputMethodManagerInvoker into a single class, and this CL is just a
preparation.
There must be no observable behavior changes.
[1]: I310a33f27b876419b6a3058202dcbd663b541079
Bug: 234882948
Test: presubmit
Change-Id: I9b728560369179d5ee17c3570a2543b49b3f14ce
* changes:
Describe requested visibilities in public types (3/n: server side)
Describe requested visibilities in public types (2/n: client-server)
Describe requested visibilities in public types (1/n: client side)
This API allows clients to query the velocity over a given axis. This
became necessary as VelocityTracker starts supporting axes beyond X and
Y axes. The immediate reason why we are adding this API is to support
AXIS_SCROLL velocity. When other axes are supported in the future, no
API surface change is needed, as this API takes a target axis. See the
design doc go/velocity-tracker-for-axis-scroll for more discussions for
the API signature choice.
Bug: 32830165
Test: CTS tests
Change-Id: Ib150ea8177c1f207c277d7889ed71515a29c64d3
This is a preparation for implementing Subtype-keyed physical keyboard
layout switching.
This CL introduces an @hide method
InputMethodSubtype#isSuitableForPhysicalKeyboardLayoutMapping()
so that later CLs can be written on the same rule about what kind of
InputMethodSubtype is valid for physical keyboard layout swithcing.
Here is the current rule but it's subject to change.
* hashCode() != 0 (SUBTYPE_ID_NONE)
* getMode() must be "keyboard"
* not isAuxiliary()
* getCanonicalizedLanguageTag() returns a valid (non "und") value.
See test cases to see how it works.
Bug: 252816846
Test: atest FrameworksCoreTests:InputMethodSubtypeTest
Change-Id: Ifc0247041a43ef64f8a76a23832da2ee058c6958
This is a preparation for implementing Subtype-keyed physical keyboard
layout switching.
This CL introduces an @hide method
InputMethodSubtype#getCanonicalizedLanguageTag()
so that later CLs can be written by obtaining canonicalized BCP 47
Language Tags from InputMethodSubtype.
See test cases to see how it works.
Bug: 252816846
Test: atest FrameworksCoreTests:InputMethodSubtypeTest
Change-Id: I5276642ba83fb708e95591da9bc7fefe2810b170
This patch is moving the navigation bar related insets logic from
DisplayPolicy to com.android.systemui.navigationbar package. To fully
match the feature, callbacks between NavigationBar and
EdgeBackGestureHandler is added to handle the nav bar button force
visible case.
Bug: 239145252
Test: DisplayPolicyInsetsTests
Test: InsetsPolicyTest DisplayPolicyTests
Test: InsetsControllerTest
Change-Id: I628a9e24df14268f2c7e92ab8ecd8d5d0d611847
After CL[1] and CL[2], IMM#hasActiveConnectionInternal(View)
only used by onPostWindowGainedFocus(View, LayoutParams).
However, the condition only need to verify the given view is
associated with current active input connection.
Hence we can remove the mServedInputConnection.isActive() check
to simplify the method.
[1]: I64412e87c4881018ea67140f9472e10ea41836e4
[2]: I7fe8b18ffbb450fd1e272e15f06f2629518f320c
Bug: 182259171
Test: atest CtsInputMethodTestCases
Test: make -j CtsInputMethod1 \
CtsInputMethod2 \
CtsInputMethodServiceDeviceTests \
CtsInputMethodServiceEventProvider \
CtsInputMethodServiceHostTestCases \
EditTextApp &&
atest -it \
CtsInputMethodServiceHostTestCases:InputMethodServiceLifecycleTest
Change-Id: Ib0c6827c58dd082a5f70b6ec508536b24cf42dcd
Add an additional dimension to DisplayModeDirector for render frame rate
in addition to the display physical refresh rate. DisplayModeDirector aggregates the requests for both render frame rates and physical refresh rates, and sets the policy to SurfaceFlinger.
SurfaceFlinger will select the display refresh rate based on the physical refresh rate range, and schedule applications based on the render frame rate range.
This is a change over the previous logic where the render frame rate and
physical refresh rate were always the same for SurfaceFlinger.
Test: atest LocalDisplayAdapterTest DisplayModeDirectorTest
Bug: 241460058
Change-Id: I9563257c7268a731a3919ffa368f7b8ae777eb99
While IMM#startInputInner() should not be called while the caller
already holds IMM#mH lock, it seems that there is a long standing
violation of such a rule for more than 10 years [1].
This CL finally addresses it.
The method calling order remains to be the same so hopefully the app
compat risk is low.
[1]: I9189e6d2ac90aa8c621fdb44989728101e00329d
31e4e14994
Bug: 234882948
Test: presubmit
Change-Id: Ib6f5a356ce5574976baefbe89e82de183b691e91
This change will enable the "mic mute" key on keyboards to globally mute
the microphone using the SensorManager, which has UI implemented in
multiple places (quick shortcuts, privacy center, settings...).
Test: manual
Bug: 237355207
Signed-off-by: LiZhihong <lizh52@lenovo.corp-partner.google.com>
Signed-off-by: DingYong <dingyong2@lenovo.corp-partner.google.com>
Change-Id: I492e501503b0ab9f56e1fa84fcc77a8c798bcb83
As CL[1] migrated {mServedView, mNextServedView} from ImeFocusController
to InputMethodManager and removed its proto dump, we add it back to
imputmethodmanager.proto to keep it tracked in winscope for debugging.
(And deprecate the original fields in imefocuscontroller.proto)
[1]:Ie3446e1d0f62c489195e31fc7f073020884d6cae
Bug: 244504062
Test: manual as following steps:
1) rebuild rom image and winscope
2) flash the rom and reboot the device
3) run the built winscope and connect with the device
4) start record trace by winscope page
5) stop recording and verify {servedView, nextServedView} can be
shown on the ImeClient Tracing panel.
Change-Id: I1ffb63a2e1e73591e7bf349d88e1e56728ab0953
Check window view is not null in reportKeepClearAreasChanged
Bug: 254586205
Test: CtsAutoFillServiceTestCases
Change-Id: I0db582c6f73e2a0602bfb2968e2b10536b5242d5
This CL removes unnecessary lock acquisitions when possible.
There must be no observable behavior change.
Bug: 234882948
Test: presubmit
Change-Id: I1b5e5870bdf7ace6a4585c640339c6196d78af42
With this CL,
adb shell dumpsys input_method,
tells us about whether startInputInner() is triggered by
InputMethodManager.DelegateImpl#onScheduledCheckFocus()
or
InputMethodManager#checkFocus().
Other than that there must be no observable behavior change.
Bug: 234882948
Test: presubmit
Change-Id: I54ebf1a4e1f749ce265756908ef52fc63f1218e5
This CL migrates requestedVisibilities (InsetsVisibilities) to
requestedVisibleTypes (int) at the system server side.
Bug: 253420890
Bug: 234093736
Test: atest DisplayContentTests DisplayPolicyTests
Change-Id: I35df21a4b36f3071b33455085bce903ea854dcb2
Now that
ImeFocusController#checkFocus()
is called only from ViewRootImpl to handle MSG_CHECK_FOCUS.
Hence, it would make much more sense to rename it to
ImeFocusController#onScheduledCheckFocus().
with also inlining hard-coded parameters.
This is still mechanical refactoring. There must be no observable
behavior change.
Bug: 234882948
Test: presubmit
Change-Id: I354acacb2d35d378ee7bc140ac7bc6311bfec156
With this CL, the code paths from IMM#checkFocus() will be drastically
simplified as follows.
* Before
InputMethodManager#checkFocus()
-> ImeFocusController#checkFocus()
-> InputMethodManager.DelegateImpl#checkFocus()
-> InputMethodManager#checkFocusInternal()
* After
InputMethodManager#checkFocus()
-> InputMethodManager#checkFocusInternal()
In the end,
InputMethodManager.DelegateImpl#checkFocus()
is guaranteed to be called only from ViewRootImpl.
This is still mechanical refactoring. There must be no observable
behavior change.
Bug: 234882948
Test: presubmit
Change-Id: Ie1c7525ee46db11ccd593c6ed0ac17b4ece41953
This is a follow up CL to our previous CL [1], which introduced
InputMethodManager#hasActiveInputConnection(View)
as a test API.
As this remains to be a test API, we should be able to tweak its
behavior as long as existing use cases continue working.
The main motivations of this CL is to make it more predictable and
easier to understand.
Even with simplification, ImeAwareEditText and CTS tests should
continue working as expected. Also there must be no app compatibility
concern in this CL.
[1]: I466a93e2b4706ae809ac50dc16dc8e4ffa7c2f1c
8bcce88c86
Bug: 176697749
Bug: 182259171
Test: presubmit
Change-Id: I7fe8b18ffbb450fd1e272e15f06f2629518f320c