So Settings DevelopmentTiles doesn't need to create direct
IInputMethodManager dependency to access system API.
Bug: 175742251
Test: Manually test ime winscope works properly
Test: make RunSettingsRoboTests ROBOTEST_FILTER="WinscopeTraceTest"
Change-Id: Ie37790c7479f6b9064afd7fbcee7fd6f712d1a75
This is a mechanical refactoring CL that has no behavior change.
This CL removes the direct dependency on AbstractInputMethodService
from whenever possible. As a result, the following classes no longer
directly depend on AbstractInputMethodService.
* android.inputmethodservice.IInputMethodWrapper
* android.inputmethodservice.RemoteInputConnection
* com.android.internal.inputmethod.ImeTracing
* com.android.internal.inputmethod.ImeTracingClientImpl
* com.android.internal.inputmethod.ImeTracingServerImpl
This is still a purely mechanical refactoring. There should be no
observable behavior change.
Bug: 192412909
Test: atest CtsInputMethodTestCases
Test: Manually verified that IME tracing still works
Change-Id: I2aeeeacd27195ce10059d6590e098a4a969e774d
This is partially a followup of
I80dabaf6ae0e781028dde16ead3321fbff319542 which removed these operations
from the SoundTrigger layer when the HotwordDetectionService is used.
Also fixes a race condition where the DSP event can go directly to the
Interactor if the DetectionService isn't connected.
Bug: 186164881
Test: atest HotwordDetectionServiceBasicTest
Test: manual - DSP and non-DSP
Change-Id: Iee3b00c6c08597ad1993fae677e9f8ae2f60744c
This is a mechanical refactoring CL that has no behavior change.
Currently all the utility methods defined in
InputConnectionProtoDumper return ProtoOutputStream, while the
returned instances will always be converted into byte[] eventually.
With this CL, those utility methods return byte[] instances directly,
which is expected to make it easier for ART/dexpreopt to do more
optimizations such as code inlining because instances of
ProtoOutputStream will no longer be escaped from those methods.
Bug: 192412909
Test: atest CtsInputMethodTestCases
Test: Manually verified that IME tracing still works
Change-Id: I7b24aee5428da312972aa86b8658429b421490f8
This CL renames classes related to IME tracing as follows
* android.util.imetracing.ImeTracing
=> com.android.internal.inputmethod.ImeTracing
* android.util.imetracing.ImeTracingClientImpl
=> com.android.internal.inputmethod.ImeTracingClientImpl
* android.util.imetracing.InputConnectionHelper
=> com.android.internal.inputmethod.InputConnectionProtoDumper
Other than those renamings, there should be no observable chagnes.
Fix: 175761228
Test: presubmit
Test: Manually verified that IME tracing still works
Change-Id: I6518d946e1832037f240f57aa900d3447083f1fa
EditableInputConnection has been one of the most important and widely
used InputConnection implementations. While having it under
com.android.internal.widget
would still make some sense, it'd become more easier for the IMF team
to keep improveing it if EditableInputConnection is moved into
com.android.internal.inputmethod
Anyway, EditableInputConnection has never been a public API hence just
moving its package should have no impact on app compatibility.
Bug: 192412909
Test: atest CtsInputMethodTestCases CtsWidgetTestCases:TextViewTest
Change-Id: I87974f779dbda60dfb79331cbe1ec975c475c695
As described in the previous CL [1], there are alternatives for app
deverlopers who somehow had to directly rely on
EditableInputConnection.
[1]: I0c879645a84fde14dd6444bb4735f543457e43a8
Fix: 192969370
Test: atest CtsInputMethodTestCases
Change-Id: I6b60f52dfea99c262fddbc5f3d87d6f0967ae8e7
With this change, a long screen shot flow generates only
the following log entries:
D Screenshot: ScrollCapture: connected to window [com.example/.ExampleActivity]
D Screenshot: onCaptureStarted
D Screenshot: end()
I Screenshot: Completed: LongScreenshot{w=1080, h=5339}
Tags covered:
LongScreenshotActivity
Screenshot
ScrollCaptureConnection
ScrollCaptureInternal
ScrollCaptureViewSupport
ScrollCaptureController
ViewRenderer
Bug: 190399332
Test: observe logcat during long screenshot
Change-Id: Ia2b018224897ad1ca153967ff9f60340a64f4815
This CL sends the requested visibilities and the package name of the
focused app to System UI for logging.
Bug: 190543382
Test: atest RegisterStatusBarResultTest CommandQueueTest
LightsOutNotifControllerTest
Change-Id: I6b3ceed1efc3075bf0c93620fe753ef2a6f79809
Added missing service functions to manager to prevent directly
calling BatteryStatsService from Bluetooth package. Updated
system-current.txt accordingly.
Tag: #feature
Bug: 190442794
Test: Manual
Change-Id: Ie6c6d3688d2da45956d57ea1dbc2cc4430f27783
This is a preparation to remove @UnsupportedAppUsage from the
constructor of a hidden class EditableInputConnection.
In most of cases, app developers should be using
android.view.inputmethod.InputConnectionWrapper
to intercept InputConnection API calls before they are delivered to
EditText as follows.
final EditText editText = new EditText(activity) {
@Override
public InputConnection onCreateInputConnection(
EditorInfo editorInfo) {
return new InputConnectionWrapper(
super.onCreateInputConnection(editorInfo), false) {
/**
* {@inheritDoc}
*/
@Override
public boolean commitText(
CharSequence text, int newCursorPosition) {
// do something
return super.commitText(text, newCursorPosition);
}
};
}
};
You can also re-implement BaseInputConnection without hidden APIs
since Android 9. See CLs that are associated with Bug 24688781 for
details.
This CL makes this fact clear for app developers by using
"publicAlternatives" field in @UnsupportedAppUsage.
Bug: 192969370
Test: presubmit
Change-Id: I0c879645a84fde14dd6444bb4735f543457e43a8
This is a purely mechanical refactoring with no behavior change.
An existing non-API class
com.android.internal.view.InputConnectionWrapper
has been used only from another non-API class
android.inputmethodservice.IInputMethodWrapper.
By moving it to android.inputmethodservice package we can make it a
package-private class, which is what this CL is intended
to achieve.
Furthermore, there is another public API class with the same name:
android.view.inputmethod.InputConnectionWrapper
, which has been confusing with this internal one. To avoid such a
confusion, this CL also renames this internal one to
RemoteInputConnection.
Other than those mechanical changes, there should be no observable
behavior changes.
Bug: 192412909
Test: atest CtsInputMethodTestCases
Change-Id: Ic0babecd34a6bc80b917050370abc2db5c03d84e