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
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
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
Changes in shared code with ListView implementation seem to have
had negative side effects with Telegram. Revert the old onScrollRequested
implementation for now.
Bug: 189475409
Test: Verify gaps missing from telegram long screenshots
(and they don't run out of tiles)
Change-Id: Iff81293c6ec34bf3e024e930fe61ba9a1fd95b7b
Querying RPM stats on device with a large number of StateResidency info
can take a long time. Move the query to outside of the BatteryStats
lock to reduce the chance of lock contention.
Bug: 185970842
Test: atest android.cts.statsd.validation.ValidationTests#testPartialWakelock
Change-Id: I1c69b3f9c071e5d758cf4b22855c4b0ec221a5cf
using selected profile PackageManager.
Test: test on local device
Bug: 175240616
Fixes: 179798044
Change-Id: I30728705dbc60d0506b7d20a16bcc8f1eed9b6d0
(cherry picked from commit 0e4b75a215)
This CL logically reverts recent CLs [1][2][3][4][5][6][7][8][9] to
switch back to the previous sync IPC approach in IInputMethodManager
except for the following two IPCs.
* reportPerceptibleAsync
* removeImeSurfaceFromWindowAsync
Reason for revert:
We need more time to understand its performance implications.
[1]: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64
b9590fa1e1
[2]: If79e063641a01b325c63eb9f871f5b992d7c0b72
5a5648dcb5
[3]: I1547b98b2aacf764e33aadc9ab784f2013f58f2f
d833f0dab4
[4]: I646ef4ae0570aae1812ea267f309441fdec6938d
38fd020616
[5]: Iaa63e01453da4ff0e3f446eac036b3be3180cb73
4a820ccc41
[6]: Id516fd1c961f43ac3e139c88d7ed004c188d458b
0a32fd21ef
[7]: Icb396ae5d74060af69c4ecb16723b2e37b9f2067
c4663ba6a9
[8]: I3eafbc28ed3acf3ba859885bf201cb06b3149b94
f226a79fee
[9]: Ic584203c1221fbae17f5e2d8f09e3992df061646
5e2d9f271d
Bug: 163453493
Bug: 174892351
Fix: 190486491
Test: atest CtsInputMethodTestCases
Change-Id: If16ac0de536d9089eb04f6e07b1ee47378124658
Merged-In: If16ac0de536d9089eb04f6e07b1ee47378124658
This CL logically reverts recent CLs [1][2][3][4][5][6][7][8][9] to
switch back to the previous sync IPC approach in IInputMethodManager
except for the following two IPCs.
* reportPerceptibleAsync
* removeImeSurfaceFromWindowAsync
Reason for revert:
We need more time to understand its performance implications.
[1]: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64
b9590fa1e1
[2]: If79e063641a01b325c63eb9f871f5b992d7c0b72
5a5648dcb5
[3]: I1547b98b2aacf764e33aadc9ab784f2013f58f2f
d833f0dab4
[4]: I646ef4ae0570aae1812ea267f309441fdec6938d
38fd020616
[5]: Iaa63e01453da4ff0e3f446eac036b3be3180cb73
4a820ccc41
[6]: Id516fd1c961f43ac3e139c88d7ed004c188d458b
0a32fd21ef
[7]: Icb396ae5d74060af69c4ecb16723b2e37b9f2067
c4663ba6a9
[8]: I3eafbc28ed3acf3ba859885bf201cb06b3149b94
f226a79fee
[9]: Ic584203c1221fbae17f5e2d8f09e3992df061646
5e2d9f271d
Bug: 163453493
Bug: 174892351
Fix: 190486491
Test: atest CtsInputMethodTestCases
Change-Id: If16ac0de536d9089eb04f6e07b1ee47378124658
Previously, PhoneWindow will add the light flag for the bar if it is
specified light in theme. It won't remove the light flag if the theme is
not light. The previous logic in PhoneWindow#generateLayout assumes the
decor view was newly created.
However, the decor view can be reused from the preserved window. This
happens if the activity is recreated. So if the previous activity was in
a light theme and the newly created activity is in a dark theme, we
should clear the light bar flags added in the previous activity.
Fix: 174502412
Test: 1. Set Dialer (Phone) to dark theme from Dialer's display options.
2. Clear app data from Dialer's app info.
3. Open Dialer again and see if the color of system bars are
normal.
Change-Id: I3ea61322e4c3cfe26981e23792f42ab0b9a1e217