Initially, the ContentCaptureManager (in the app) was calling the
IContentCaptureManager (on system server) for everything, even to pass the
list of captured events, which caused 2 IPCs for each batch of events (i.e.,
from app to system_server, then from system_service to service).
This CL optimizes the workflow by getting rid of the "middle man" and sending
the events from the app to the service directly, which the system_server only
calling the service to notify when the view starts and finishes (and passing
the UID in the former so the servier can validate the sendEvents() calls).
Bug: 119220549
Test: atest CtsContentCaptureServiceTestCases
Change-Id: I6c08dccf755605320ac37cbc9424132e5455a594
This change resolves a discrepancy between onMeasure() and onLayout() in
NotificationHeaderView. Icons were measured with their defined
margins in order to figure out how much to truncate the header text, but
during layout potentially multiple icons used the container's end
padding as their end margin (and their start margin was ignored).
Change-Id: I513efe2723fc78dd81bbe07aa40a3ed5fd1182d1
Fixes: 120893622
Test: manual
In general cases, we don't have multiple input methods simultaneously.
So that it may not make sense to have multiple focused window in the
system. Especially when there are multiple blinking cursors of input
boxes on different displays, the user may not be able to know which
input box can receive key events. In these cases, we let the system
has only one focused window.
In some cases, there can be multiple input methods simultaneously (one
for each display). To enable multiple users to interact with the
corresponding displays at the same time, we should let the system have
per-display focused window in these cases.
This CL makes per-display focus optional, and also reverts ag/5312657
Fix: 120241480
Fix: 120790099
Test: atest ActivityManagerMultiDisplayTests \
CtsWindowManagerDeviceTestCases \
WmTests
Change-Id: Ie030eed523599b217060887171710692d050e5d8
- Get rid of activity-level events.
- Renamed InteractionSessionId and InteractionContext to
ContentCaptureSessionId and ContentCaptureContext (and made them public)
- Create the explicit concept of ContentCaptureSesssion (and moved notification
APIs to it).
- Added APIs to let apps create new sessions (not implemented yet).
- Added APIs to remove user data based on some context properties (like URI).
The reasoning behind this change is to let app developers explicitly associate
the captured content with some app-level domain (and also let the app ask the
service to clear such data at user's request). For example, a browser app
(and WebView) can use these APIs to associate the content capture events with
the URL being rendered.
Bug: 117944706
Fixes: 121034139
Test: atest CtsContentCaptureServiceTestCases
Test: m update-api && m
Change-Id: I7841da303b6a39c825651b03a07e3081fbd0bdf5
This serves as a general TextClassifier event object for reporting
any textclassifier event and will replace the SelectionEvent class.
Example:
// Smart link clicked.
new TextClassifierEvent.Builder(CATEGORY_LINKIFY, TYPE_LINK_CLICKED)
.setEventContext(new TextClassificationContext.Builder(
pkgname, WIDGET_TYPE_TEXTVIEW)
.build())
.setEntityType(TextClassifier.EMAIL)
.setResultId(textclassification.getId())
.setEventIndex(0)
.setEventTime(now)
.setStart(0)
.setEnd(3)
.build();
Bug: 120837847
Test: See related cts CL
Test: atest cts/tests/tests/view/src/android/view/textclassifier/cts \
frameworks/base/core/tests/coretests/src/android/view/textclassifier
Change-Id: Ifd84a45fc5c46ffdb200dcb9600f6a470ce792bb
ID is used as session id when logging.
Conversation id is used for TextClassifier to keep track of ongoing
conversation.
BUG: 120803809
Test: atest TextClassifierTest.java
Test: atest ConversationActionsTest.java
Change-Id: Ifa2e25005efa9b16e480d9a06b376d726ea6d6d3
* Recently the pip_input_consumer changed to move with the pinned stack bounds.
* Change the touch logic to use raw input coordinates so that we do not have to
account for the pip_input_consumer position.
* Add workaround for velocity tracker to support moving input frame.
* Use getActionMasked instead of getAction for MotionEvents. This fixes b/120942892.
Test: Test moving pip window in YouTube and Chrome
Bug: 120663157, 120942892
Change-Id: I0a8b2eea7ee5930a6651ad037eaa0f898fe8635d
To indicate the intent is from text classifier, so apps can log
the traffic from text classifier.
Test: atest IntentFactoryTest
Test: atest TextClassifierTest
BUG: 120944241
Change-Id: I6584504a39c0db3c1de1eaab6915b26b30adadcd
Right now the value is hardcoded to 5s, but it will be dynamically configurable.
Bug: 119220549
Test: manual verification
Test: atest CtsContentCaptureServiceTestCases
Change-Id: I230dee32d215d099a323499e55b4347e817907a0
Depending on the SDK version of applications, there may need to be
changes made to InputEvents for compatibility purposes. Here, we add a
InputEventCompatProcessor to refactor all compatibility adjustments to
InputEvents.
The compatibility processor is instantiated in ViewRootImpl using
reflection, where the class name of the processor is defined in
config.xml as `config_inputEventCompatProcessorClassName`. This allows
for overlays to change the compatibility processor that is used for the
build.
The processor has two methods for processing the InputEvent before and
after it is sent into the InputStages of the input pipeline in
ViewRootImpl. InputEvents that are changed by the processor are marked
with `FLAG_MODIFIED_FOR_COMPATIBILITY` so that they are sent back to the
processor before they are finished.
Bug: 119264233
Test: manual
Change-Id: Ie0dc4665cb677a7ab2cc627791a0f72cdfce1cde
1. It is required to set Person object when constructing a Message object
now. As it is very important to know whether the message is from
local user or remote user. Introduced PERSON_USER_REMOTE if
the caller just want a simple way to specify a remote user.
2. Use detectLanguages to detect the locale of the messages
If the model finds the detected language is not something
it supports, model may suppress smart reply.
3. Pass the reference time to the model. So model can resolve
the absolute time from a relative date string like "tomorrow 6pm".
BUG: 120809869
Test: atest ActionsSuggestionsHelperTest.java
Test: atest ConversationActionsTest.java
Change-Id: Ie079848e9b3d9bb8800f7f95d73e289e831968f8
Everything that is marked SystemApi or TestApi, but not @hide is still
part of the public SDK, it is therefore not sound to have that combination.
In the future, specifing such a combination will be considered an error
to prevent inadvertently exposing SystemApi and TestApi as public API.
Bug: 115333477
Change-Id: Ibd5d6a22862fdbc1e20a1cb3925280f5a682edea
Test: METALAVA_PREPEND_ARGS="--error UnhiddenSystemApi" m checkapi
Exempt-From-Owner-Approval: API cleanup
Add calls to SurfaceControl JNI interface that allow
the DisplayManager to drive color histogram functionality.
Fixes: 112756444
Test: Boot
Test: additional test in 'atest FrameworksServicesTests:DisplayManagerServiceTest'
Change-Id: Ifa46dab53b09db62da79ad82e9687d9155ddc6da
- By the time we call computeScroll(), the current frame's callback
has already been consumed, which makes it impossible to apply
surface updates with the current frame (in response to the scroll).
Instead, we should only consume the frame callback after dispatching
draw for the current frame (but before the window callbacks which
may reset the frame callback).
Test: Update surface transforms in response to scroll, ensure that
it is updated with the current frame
Change-Id: I52a640604ee15cf745c47fc0120b4844b67f35be
Rework how new window insets are dispatched: Send it to the
controller, controller applies the local visibility overrides and
then dispatch it without doing a full layout.
Bug: 118118435
Change-Id: I0d3070d2c46c3af6236e98b858bed5b463da6053
- This is only set by the SystemTextClassifier.
- The system verifies that the package name is correct before
passing the request to the TCS. Note that the system is the
only direct client of the TCS.
- Sets package name to context.getOpPackageName(). See b/119921159
- Also adds an extra to a TextLink object.
Bug: 118690735
Bug: 119921159
Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier
Change-Id: I1ac0fa421cd0f26e580a8e0768c3819a731bb471
- Add an API to get accessibility window id from window token. This API
can be called only from a system process.
Bug: 119794051
Test: None
Change-Id: I37db50209efeb81f3e3502d84fd53fedec695f99
Hopefully no one has relied on this undocumented behavior that when
the caller has WRITE_SECURE_SETTINGS then null IME token is allowed in
IMM#switchToLastInputMethod().
Bug: 114488811
Test: CtsInputMethodServiceHostTestCases
Change-Id: Icb02c9bb52b11cff39b222198f4b67984676b9a6
It turns out that we had already rejected null IME token in
InputMethodManager#switchToNextInputMethod() since Android L [1].
Hence there is no need to keep this IPC any more.
There should be no developer-visible behavior change.
[1]: I043aa30a19c821f33effd57dfd6590b0e3ed817b
34c666472137a99a2ce5546b80bd04979d10ab7a
Bug: 114488811
Test: atest CtsInputMethodServiceHostTestCases
Change-Id: I72ee82d62e3bdce44f623604eca86ab3fe3df0bd
Since the NavBar will be supported for multi-display, for
single session IME, it will be possible that IME switcher icon
will shown on external display.
Add IMMS#showInputMethodPickerFromSystem for system modules (i.e.
Settings or SystemUI) to pass displayId for creating right display
context, so that IME switcher dialog can shown on the display
correctly.
Also Add a TODO item for ACTION_SHOW_INPUT_METHOD_PICKER notification
that currently only support showing IME picker for default display,
this should support per display after supporting status bar per display.
Bug: 119933861
Fix: 120050928
Test: manual, verify IME switcher dialog can shown on external display
when tapping IME switcher icon on external navbar.
Test: atest InputMethodManagerTest#testShowInputMethodPicker
Change-Id: Ic7d7c5a7ad8005a3fbd9d1c1b73e3c5a39a07001
Bunch of changes:
- Split public SmartSuggestionsService info ContentCaptureService and
AugmentedAutofillService
- Renamed 'intelligence' packages to either 'contentcapture' or
'autofil.augmented'
- Renamed internal packages and classes.
- Changed permissions, resource names, etc...
- Moved Augmented Autofill logic from IntelligeceManagerService (R.I.P.) to
Autofill.
- Optimized IPCs by passing a String instead of the InteractionSessionId
(that also solves the view -> service dependency).
Test: atest CtsContentCaptureServiceTestCases \
CtsAutoFillServiceTestCases \
FrameworksCoreTests:SettingsBackupTest
Test: manual verification with Augmented Autofill Service
Bug: 119638877
Bug: 117944706
Change-Id: I787fc2a0dbd9ad53e4d5edb0d2a9242346e4652d