Commit Graph

16378 Commits

Author SHA1 Message Date
Rob Carr
194d95b130 Merge "ViewRootImpl remove blur defer transacion" into sc-dev 2021-04-01 17:55:06 +00:00
Treehugger Robot
274a76464c Merge "Update OWNERS for OnReceiveContentListener and ContentInfo" am: 2990dccc16 am: 736e5ea3a5 am: 838aff1230
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1661118

Change-Id: I23fa0b898d4298509a2d37c7edc6be7ab06e6dc3
2021-04-01 15:49:07 +00:00
Daniel Sandler
ad4a5023ce Merge "Custom haptic composition for assistant launched via button." into sc-dev 2021-04-01 15:41:57 +00:00
Treehugger Robot
838aff1230 Merge "Update OWNERS for OnReceiveContentListener and ContentInfo" am: 2990dccc16 am: 736e5ea3a5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1661118

Change-Id: I595fe6c41cd4f1229818d30aa780cc328a97c265
2021-04-01 15:02:29 +00:00
Winson Chung
db41d72646 Merge "Expose the full task info with the remote animation target" into sc-dev 2021-04-01 03:56:55 +00:00
Saho Kobayashi
f80bd0f769 Merge "Correctly handle TargetAccessibilityFocus flag" into sc-dev 2021-04-01 03:36:48 +00:00
TreeHugger Robot
c5547caafb Merge "Allow to report finsh/pause state if Activity isn't resume." into sc-dev 2021-04-01 02:00:35 +00:00
Robert Carr
a3cbeeae20 ViewRootImpl remove blur defer transacion
Only the BLAST one is active now.

Bug: 168505645
Test: Existing tests pass
Change-Id: I83e26eb0c15733e063b802d79b3e4ecfa702d3ca
2021-03-31 17:28:29 -07:00
Nikita Dubrovsky
2bb75a4007 Merge "Rename getOnReceiveContentMimeTypes (drop "On")" into sc-dev 2021-03-31 21:06:21 +00:00
Nikita Dubrovsky
79ce1a0010 Update OWNERS for OnReceiveContentListener and ContentInfo
Bug: 152068298
Change-Id: I0d70b3493523f61561b4946274af3bed40bacfb3
Test: Presubmit
2021-03-31 18:50:52 +00:00
Winson Chung
56dc281990 Expose the full task info with the remote animation target
- Allows launcher to get the associated launch cookies for
  the task

Bug: 129067201
Test: Manual, check the task info for the animation targets

Change-Id: I4b9d974af1732d0ec7b19681f4772b692f614e5e
2021-03-31 09:59:03 -07:00
Galia Peycheva
dd5ed95ebd Merge "Fix paragraphs in blur javadocs" into sc-dev 2021-03-31 14:33:58 +00:00
Marin Shalamanov
d15b4b5473 Merge "setFrameRate: Make shouldBeSeamless an enum" into sc-dev 2021-03-31 14:30:23 +00:00
TreeHugger Robot
b2ee6ea14d Merge "Send input timeline from app to InputDispatcher" into sc-dev 2021-03-31 10:11:49 +00:00
Joanne Chung
72cf07d1cc Merge "Bug fix: allow to create ViewTranslationRequest for virtual AutofillId." into sc-dev 2021-03-31 03:41:39 +00:00
Yohei Yukawa
12e4fde793 Merge "Avoid IME restart for configChanges" into sc-dev 2021-03-31 02:28:22 +00:00
Rob Carr
2b434b28b0 Merge "Expose API for using SurfaceControl with ViewRootImpl" into sc-dev 2021-03-31 01:35:49 +00:00
Sally Yuen
ccaee1da1b Merge "Eliminate potential deadlock in AccessibilityCache" into sc-dev 2021-03-30 22:37:52 +00:00
Taran Singh
71ab752fc5 Avoid IME restart for configChanges
Handle onConfigurationChanged() in order to prevent restarting
InputMethodService everytime. We introduce a new API attribute
"configChanges" in InputMethod(attrs.xml) which when declared
by IME, will be responsible for handling mentioned
configuration changes.

This CL re-introduces [1] with fix: Use new Configuration instance for
IMS#mLastKnownConfig and also handle followup comments.

[1] Ib94fddadb0dae648cf73a4c1642e51edebd19f50

Note: this change has no impact for devices not using DisplayAreas.

Bug: 167948419
Test: atest InputMethodServiceTest
    Manually:
      1. Patch Ie91e7a8e06b80864ef9409031e8543858552d70d to use dual
         display area.
      2. Open applications with editors on both display areas.
      3. Attach a debug point for IMS#onConfigurationChanged().
      4. Make sure IMS#resetStateForNewConfiguration() is not called
         when IME moves between these two identical DisplayAreas
    Also verify that bug 182604598 don't happen.

Change-Id: I43b6b80cdb35410554412ee1d3b0917ee3198272
2021-03-30 20:03:55 +00:00
Hongwei Wang
660008c5c2 Merge "Apply the whole auto pip transaction in recents animation" into sc-dev 2021-03-30 19:26:17 +00:00
Joanne Chung
8c8a14d4df Bug fix: allow to create ViewTranslationRequest for virtual AutofillId.
1. We provide virtual child list to View#onCreateTranslationRequests
but we don't provide a method to allow developers to create
ViewTranslationRequest for virtual AutofillId. Add a builder
constructor to allow developer to use it for virtual AutofillId.
2. Fix some comments in ag/13982294(e1b23cd)

Bug: 177789967
Test: manual on sample app
Test: atest CtsTranslationTestCases

Change-Id: I63e914b888b23cdb7a5169fc6931be93625ca8e4
2021-03-31 01:02:01 +08:00
Ahaan Ugale
43dbb54918 Add a showInInputMethodPicker attr.
An app that provided an IME and is deprecating that functionality may
want to still keep it's IME around temporarily, to prevent breaking
clients that hardcode the component name when switching to the IME.
Such an IME may want to not be presented as an option in the Input
Method picker. They can now set showInInputMethodPicker=false for
this.

Fix: 175480153
Test: manual - Test IME with showInInputMethodPicker=false isn't
 shown in the IME picker.
Test: [new tests]
 atest android.view.inputmethod.cts.InputMethodManagerTest
Test: atest CtsInputMethodTestCases
Change-Id: I18dda0525168f9195606840239507b9daba65be7
2021-03-30 08:37:32 -07:00
Joanne Chung
8aef79f2b5 Allow to report finsh/pause state if Activity isn't resume.
Currently, we only report the ui translation state if the Activity is
resumed. But in the real use case, the developer may call
finishTranslation when the Activity moves to background or lock screen
is shown. We should allow the finish/pause state can be updated for
these cases.

Bug: 183980346
Test: manual. Use sample app, press home and call APIs.
Test: atest CtsTranslationTestCases
Change-Id: I4a5cfab9d272e4d5dc23b2f679b4fbeb4a6c9d20
2021-03-30 22:55:02 +08:00
Nikita Dubrovsky
85826befae Merge "OnReceiveContentListener: Handle IME insertion permissions release" into sc-dev 2021-03-30 14:10:21 +00:00
Chavi Weingarten
c312f0f79a Merge "Add throttling to generateDisplayHash" into sc-dev 2021-03-30 14:10:00 +00:00
Shawn Lin
ab7faf6754 Merge "Fixed rounded corner javadoc rendering issue." into sc-dev 2021-03-30 13:44:58 +00:00
Ahaan Ugale
342ddee557 Merge "Add OnDevice to TranslationManager method names." into sc-dev 2021-03-30 06:13:22 +00:00
Robert Carr
ee90cd4871 Expose API for using SurfaceControl with ViewRootImpl
This API is appropriately called "ViewRoot". So far we just expose
an API surface to reparent SurfaceControl to the ViewRoot (but without
exposing the ViewRoot's SurfaceControl, to encourage developers not
to shoot themselves in the foot) and to synchronize with the drawing
of the ViewRoot SurfaceControl.

Bug: 173463039
Test: ViewRootSyncTests
Change-Id: I8ce0ed4b3efe50cdb3b71ae0f05ce25438d42368
2021-03-30 04:10:05 +00:00
Ming-Shin Lu
a8e90c7cbc Merge "Don't skip IME animation when backed to Task has no editor focus" into sc-dev 2021-03-30 03:10:21 +00:00
Dan Sandler
8ff8bd327c Custom haptic composition for assistant launched via button.
The effect is a small ramp, a 50ms gap, and a sharp tick,
evoking the crisp snap of a sail, or a molecule's bonds
approaching and then snapping together.

It might be nice to start this effect slightly early, but
that will require more tweaking to the keypress messaging
and timers. We'll see if it's necessary.

For devices without haptic composer support, fall back to
EFFECT_DOUBLE_CLICK.

Bug: 182381083
Test: manual (literally, you have to hold the device):
      adb shell settings put global power_button_long_press 5
      adb shell input keyevent --longpress POWER
      (or just hold the power button, since you're holding
      the device)
Change-Id: I0633efd46296ca3f34e5df60be37871fb1a9fb5d
2021-03-29 21:52:07 -04:00
Joanne Chung
d99fcedeb3 Merge "Fix the wrong logic to check if the element in SparseArray" into sc-dev 2021-03-30 01:49:41 +00:00
chaviw
2e605fd668 Add throttling to generateDisplayHash
Calling generateDisplayHash can cause the system to slow down if there
are too many requests. Add throttling logic to prevent apps from calling
the API too frequently. The throttling time is based on a value sent
from ExtServices so it can be adjusted later

Test: DisplayHashManagerTest
Bug: 155825630
Change-Id: Id49d1c4113fc65d7b73a1e7b9fc73f50a8d7041f
2021-03-29 15:54:37 -05:00
Sally
1427156afc Eliminate potential deadlock in AccessibilityCache
The cache calls out with its lock to the app main thread when refreshing
nodes. This opens the door for a deadlock, and causes a slowdown for
non-main threads.

Bug: 180957109
Test: atest CtsAccessibilityServiceTestCases  CtsAccessibilityTestCases
CtsUiAutomationTestCases
FrameworksServicesTests:com.android.server.accessibility
FrameworksCoreTests:com.android.internal.accessibility
FrameworksCoreTests:android.view.accessibility

Change-Id: I27e4e64f778ae1c2a348e16cf8739f7a5596e0fc
2021-03-29 20:43:34 +00:00
Ahaan Ugale
9b2f82c8a6 Add OnDevice to TranslationManager method names.
Makes the API easier to evolve in case we add user-selectable
TranslationServices later, like we do for RecognitionService.

Also makes the create.. name consistent with
SpeechRecognizer#createOnDeviceSpeechRecognizer().

Bug: 176208267
Test: atest CtsTranslationTestCases
Change-Id: I1a66bd045202025b9c5f669018c989654bcaa1ad
2021-03-29 13:10:17 -07:00
Joanne Chung
67b4851291 Fix the wrong logic to check if the element in SparseArray
Bug: 178046780
Test: manual by using a sample app.
Change-Id: Iab7d8a946a32e3be6393e8bdd4d69670d85819f9
2021-03-30 00:46:37 +08:00
Joanne Chung
2e3ea6a2ab Merge "Add translation APIs for virtual views." into sc-dev 2021-03-29 15:28:23 +00:00
Galia Peycheva
ac0a54e91b Fix paragraphs in blur javadocs
Bug: 181149137
Test: m doc-comment-check-docs
Change-Id: I0f2e7cf5f1f5970060dc845b74b9c2e67d7248dd
2021-03-29 17:12:05 +02:00
Kriti Dang
7010f95cb2 Hdr format settings [Backend]
Adding new APIs in display manager to get the user disabled formats, to get the formats
supported by device and get formats reported by display.

Bug: 172905874
Test: N/A
Change-Id: I58a7714f03a3e165bbd22f2fa7a021ad90b41b39
Merged-In: I58a7714f03a3e165bbd22f2fa7a021ad90b41b39
(cherry picked from commit 25f1822005)
2021-03-29 13:21:14 +00:00
Joanne Chung
e1b23cd423 Add translation APIs for virtual views.
Bug: 178046780
Test: manual
Test: atest CtsTranslationTestCases
CTS-Coverage-Bug: 177960696

Change-Id: I99caed0d42b3a164a25c2707eba7057c42c19140
2021-03-29 20:36:40 +08:00
Kriti Dang
e713ee6c60 Merge changes from topic "cherrypick-Display settings HDR formats-mumvl547ah" into sc-dev
* changes:
  Handling Number Format Exception in DiscreteValueIntegerListValidator
  Hdr format settings [Backend]
2021-03-28 12:25:32 +00:00
Nikita Dubrovsky
f3ebaed6e4 Rename getOnReceiveContentMimeTypes (drop "On")
Bug: 179143943
Test: Presubmit
Change-Id: Ib2109f0a45c25ae6c4507a9199bf8b34fc394af5
2021-03-26 10:48:58 -07:00
Joanne Chung
f51da99ac1 Implement dispatchRequestTranslation for getting translation information.
This change doesn't contain the virtual view part and the API, it
will be done in the next change.

Bug: 178046780
Test: manual
Test: atest CtsTranslationTestCases
CTS-Coverage-Bug: 177960696

Change-Id: Idba66a882a90168ecdd93423c0d5d054ab040dad
2021-03-25 22:31:54 -07:00
John Reck
a17f3e5bab Merge "Add me to view/ OWNERS" am: 6b92593081 am: 4e2fbda63d am: a6a1843a92
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652977

Change-Id: I290444ced438951812bfdf07151c793ed7f570bc
2021-03-25 19:46:48 +00:00
Hongwei Wang
de204a5721 Apply the whole auto pip transaction in recents animation
Take the full transaction details passed from Launcher, including
position / windowCrop / scale / roundRadius and apply them in
RecentsAnimationController.TaskAnimationAdapter#onCleanup to make sure
the final state of autoEnterPip transition can be carried over.

Note: there are still several frames off when entering PiP from
landscape with autoEnterPip being enabled.

Bug: 179720719
Test: manually using the ApiDemos app
Change-Id: Ibfff75e09943960cfcd816d6c52a80d7a8af8fe8
2021-03-25 12:07:20 -07:00
John Reck
a6a1843a92 Merge "Add me to view/ OWNERS" am: 6b92593081 am: 4e2fbda63d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1652977

Change-Id: Ic8869e13f04f9344ced962d13b18ec0c11a2a443
2021-03-25 19:01:50 +00:00
Nikita Dubrovsky
1dad2faa7f Merge "Update some autofill var names for clarity" into sc-dev 2021-03-25 17:03:27 +00:00
Nikita Dubrovsky
10646dff7e OnReceiveContentListener: Handle IME insertion permissions release
For content insertion from the IME, the platform currently assumes
that it can automatically revoke URI permissions (via
InputContentUriTokenHandler.finalize) any time after the
InputContentInfo instance is garbage collected and
InputContentInfo.releasePermission() has not been called explicitly.
This can cause permissions to be revoked before the receiving code
has had a chance to read the content when using
OnReceiveContentListener, since we did not keep a reference to
InputContentInfo.

This change does the following:
* Sets the InputContentInfo instance in the ContentInfo payload passed
to OnReceiveContentListener.
* Exposes a hidden API on ContentInfo to allow system features to
proactively release permissions for sources that allow this (IME and
drag-and-drop).
* Updates notifications direct-reply code to proactively release
permissions as soon as they are no longer needed.

Bug: 183643556
Test: Manual
Change-Id: I1cbc55d53804810a3cd4b6b97c197f4dd2d7d8e6
2021-03-25 09:37:21 -07:00
Joanne Chung
b6a9530dc1 Merge "Update View translation APIs." into sc-dev 2021-03-25 14:31:40 +00:00
Kriti Dang
b4775b02a7 Hdr format settings [Backend]
Added new APIs to DisplayManager to set the user disabled HDR formats,
and get/set if user disabled formats should be ignored or not.
These new settings are stored in Settings.Global.
Modified the implementation of Display#getHdrCapabilities to not return
the formats disabled by user.

Bug: 172905874
Test: atest CtsDisplayTestCases
Change-Id: I4841af251ee0e4938614b154d0c5239814ea7cd9
Merged-In: I4841af251ee0e4938614b154d0c5239814ea7cd9
2021-03-25 12:41:35 +00:00
Adrian Roos
c33d71d602 Merge "Fix unexpected IME show because of stale requestedVisibleAwaitingControl" into sc-dev 2021-03-25 10:37:09 +00:00