Commit Graph

16254 Commits

Author SHA1 Message Date
Hongwei Wang
f4dfb7c4a3 Settle auto PiP transaction in WindowContainerTransaction
At the end of autoEnterPip transition, followings happen in sequence
- Transition finishes in Launcher side, which operates on the
  animation leash
- RecentsAnimationController.TaskAnimationAdapter#onCleanup has the final
  chance to set the Task leash
- PipTaskOrganizer gets onTaskAppeared callback and commits Task into
  pinned mode

What's been changed here
- Transition in Launcher no longer in charge of settle the final transaction
- RecentsAnimationController.TaskAnimationAdapter#onCleanup sets the
  Task leash to be in sync with the final state in Launcher side
- PipTaskOrganizer commits the final leash transaction together with
  WindowContainerTransaction that enters PiP

Known issue: transition from landscape is not polished

Video: http://rcll/aaaaaabFQoRHlzixHdtY/hT5SXvaCy28P4UtfuoKiDw
Bug: 181342797
Test: see video
Change-Id: Ieabd6991ea5174099714ec22970198bebde1e336
2021-03-15 10:40:13 -07:00
Oli Lan
fe4a8f58fb Merge "Add text classification results to clip description and clip data." into sc-dev 2021-03-15 17:26:35 +00:00
Kholoud Mohamed
e519be1e33 Merge "Expose getInputMethodListAsUser as a testAPI" into sc-dev 2021-03-15 10:25:13 +00:00
Shawn Lin
2632176829 Merge "Fixed RoundedCorner bugs" into sc-dev 2021-03-15 04:26:55 +00:00
Nikita Dubrovsky
00a7febee9 Merge "Update logic for drag-and-drop URI permissions for editable TextViews" into sc-dev 2021-03-15 03:55:42 +00:00
Kohsuke Yatoh
5ed3cb20b3 Merge "InputMethodInfo attr to suppress spell checker." into sc-dev 2021-03-14 20:12:31 +00:00
Galia Peycheva
7eef5e4c7a Merge "Add executor to window blur api" into sc-dev 2021-03-13 23:12:08 +00:00
Kohsuke Yatoh
6b22120e8f InputMethodInfo attr to suppress spell checker.
If InputMethodService declares suppressesSpellChecker="true", the system
SpellCheckerService will be disabled.

With TextView, when IMSs are switched while the user is editing,
SuggestionSpans that were previously added will not be removed even if
the next IMS declares suppressesSpellChecker="true".
This is because we don't know if the SuggestionSpans were from Spell
Checker, App, or IMS.

Bug: 153473490
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: Ia22b8758111087818beea8c07b1c173f1a94b8e4
2021-03-13 10:07:54 -08:00
TreeHugger Robot
11a7f13364 Merge "Revert "Avoid IME restart for configChanges"" into sc-dev 2021-03-13 16:05:30 +00:00
Yohei Yukawa
1e7d125662 Revert "Avoid IME restart for configChanges"
Revert "Add cts for InputMethodService configChanges"

Revert submission 13727407-167948419

Reason for revert:
Possible root cause of Bug 182604598.

Reverted Changes:
Ib94fddadb:Avoid IME restart for configChanges
Ieca327b2e:Add cts for InputMethodService configChanges

Bug: 167948419
Bug: 182604598
Test: presubmit
Change-Id: I3accc55ac65d0e2ec30c3f6023680fda27ad3e97
2021-03-13 01:08:48 +00:00
Chris Ye
a8621e8575 Merge "Add coretest for android.view.InputDevice." into sc-dev 2021-03-12 21:58:59 +00:00
Chris Ye
32a52d9177 Add coretest for android.view.InputDevice.
Add coretest cases for android.view.InputDevice, for parcel/unparcel
input device object.

Bug: 173326051
Test: atest InputDeviceTest
Change-Id: I5dea2783b11a195dc2eb8337aad77368b98cf068
2021-03-12 10:51:09 -08:00
Nikita Dubrovsky
910746fe96 Update logic for drag-and-drop URI permissions for editable TextViews
Previously, Editor.onDrop used a try/finally block to request and
release URI permissions. This doesn't work for the case when an app
sets an OnReceiveContentListener (or subclasses TextView and overrides
the onReceiveContent() method). If using a background thread to
process the content in the custom impl for receiving content,
permissions will be revoked in the finally block before the app has
had a chance to process the URI.

With this change, when Editor requests permissions, they will be bound
to the app process and released automatically when the app process
terminates.

Bug: 181178998
Test: atest CtsWindowManagerDeviceTestCases:CrossAppDragAndDropTests
Test: Manually verified using development/samples/ReceiveContentDemo
Change-Id: I7ae38069fb741925211b42c7ff28784eb9722ce3
2021-03-12 08:08:57 -08:00
TreeHugger Robot
ac33aa4735 Merge "Merge ControlledInputConnectionWrapper into parent class" into sc-dev 2021-03-12 14:29:02 +00:00
Galia Peycheva
c1733fea63 Merge "Add WM.setForceCrossWindowBlurDisabled TestApi" into sc-dev 2021-03-12 13:47:03 +00:00
Shawn Lin
cb3141a4a4 Merge "Attach navigation bar to app during quick switching (2/N)" into sc-dev 2021-03-12 13:45:19 +00:00
TreeHugger Robot
069895aec6 Merge "Do not allow Display#getRealMetrics to return values reflecting the app bounds." into sc-dev 2021-03-12 12:57:39 +00:00
Ming-Shin Lu
af47729a15 Merge ControlledInputConnectionWrapper into parent class
Since ControlledInputConnectionWrapper is the only derived class
of IInputConnectionWrapper hence it doesn't have a reason keep them
separate.

Bug: 167948374
Bug: 163450598
Test: atest CtsInputMethodTestCases
Change-Id: Ice1ea23dcb2351b56ef03b507d8aec8f8fb7b30a
2021-03-12 20:12:50 +08:00
Naomi Musgrave
fab3737bba Do not allow Display#getRealMetrics to return values reflecting
the app bounds.

Fixes Display#getRealMetrics sandboxing bug, where a non-null
configuration results in DisplayInfo ignoring max bounds width
and height for app bounds. Consistent with non-sandboxing
implementation of Display#getRealMetrics

Bug: 182377479
Test: atest FrameworksMockingCoreTests:android.view.DisplayTests
Change-Id: I067aeb020e1ca214aa269182c475b4553de0eb09
2021-03-12 11:07:53 +00:00
Galia Peycheva
191c35b966 Add executor to window blur api
Bug: 181593110
Test: atest BlurTests
CTS-Coverage-Bug: 179990440
Change-Id: Ifc15afd100d5e75c63ded524f43b0d7442dc815d
2021-03-12 11:03:31 +01:00
Galia Peycheva
07fedbce46 Add WM.setForceCrossWindowBlurDisabled TestApi
Bug: 179990440
Test: m && atest BlurTests
Change-Id: Ie393e456f2c55dfde945dc53ecdc83bbcfcdb361
2021-03-12 11:03:19 +01:00
shawnlin
2fe3ffa3c8 Attach navigation bar to app during quick switching (2/N)
- Create a new method in StatusBar to enable/disable nav bar luma
  sampling.
- Modify the IRcentsAnimationController.detachNavigationBarFromApp() API
  to notify the server side whether we should run the fade-in animation
  or not.
- Don't let fixed rotation animation control the navigation when it's
  controlled by recents animation and vice versa.
- Don't attach nav bar when it's in split screen mode and in landscape.
- Translate the nav bar surface to match the secondary app's bounds in
  split screen mode in portrait.

Bug: 139273001
Test: atest RecentsAnimationControllerTest CommandQueueTest
Change-Id: I06dc2dd0655bc8a2e6ad03808576e55294a322e8
2021-03-12 12:10:26 +08:00
TreeHugger Robot
c04814ff76 Merge "Move drag event to InputDispatcher (4/n)" into sc-dev 2021-03-12 03:52:36 +00:00
mrenouf
70f4666558 Merge "Update OWNERS for long screenshots framework code" am: 4392dd9cb8 am: 695b9ee40e am: 85bf625569
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1619622

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ied18be7a63642d3303a50534cbe95e05e1336cc5
2021-03-12 00:50:34 +00:00
TreeHugger Robot
cdebbc764a Merge "Merge "Add OWNERS for long screenshots framework code" am: 79bed70aa2 am: 4df29fd76a" into sc-dev 2021-03-12 00:17:58 +00:00
mrenouf
85bf625569 Merge "Update OWNERS for long screenshots framework code" am: 4392dd9cb8 am: 695b9ee40e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1619622

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5fe8f6ed9302d560959f28d9ebd2f309fb6502ef
2021-03-12 00:05:22 +00:00
mrenouf
7b969ae133 Update OWNERS for long screenshots framework code
Adds OWNERS line for internal binder interfaces.

Test: n/a
Change-Id: Ib6cdef76c5c9444f7187e33588bb3fdfbf5f5787
2021-03-11 21:23:44 +00:00
TreeHugger Robot
80b9e3e504 Merge changes I4df9945c,I5706cb38 into sc-dev
* changes:
  Update device info on Display.getDeviceProductInfo()
  Display API: Do not expose internal locks
2021-03-11 21:22:40 +00:00
Marin Shalamanov
254351a6a7 Update device info on Display.getDeviceProductInfo()
Each getter of the Display class should first
call updateDisplayInfoLocked().

Test: presubmit
Bug: 179775994
Change-Id: I4df9945cd030296da0e170411af8c66c89f57adf
2021-03-11 16:04:54 +01:00
Marin Shalamanov
427b32900e Display API: Do not expose internal locks
Currently the display class synchronizes on this, which is
against the API guidelines.

Bug: 171240622
Test: presubmit
Change-Id: I5706cb38803c9868cc4bae0803aa3fd0c5991bde
2021-03-11 16:04:54 +01:00
Joanne Chung
9b316222ff Merge "Add debug logs to help clarify the issue" into sc-dev 2021-03-11 14:03:23 +00:00
Joanne Chung
3cda8bd49f Add debug logs to help clarify the issue
We receive translation doesn't work issues but we don't have enough
log information to help debugging the issue. To help clarify issue

- Add more information when dumpsys activity information
- We use Log.isLoggable() to control if the debug log need to be
printed. But for the development phase, we enable print log on the
debuggable ROM, we will delete it before platform release.

Bug: 181975692
Test: manual. adb shell dumpsys activity <myactivity> --translation
(Can find dumpsys result of sample app in bug 182433547)

Change-Id: I4a9a1667a544fc4d1654c5f297d365a8288b1f4a
2021-03-11 16:34:44 +08:00
Yuntao Zhou
4c8df0cb53 Merge "Fix minor typo in ContentCaptureManager Javadoc" am: 6305e68c6e am: 3ffbb1f042 am: 7c6ef98d3e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1619880

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2b8d6400d7d44b192be5ca2420d2a2e26c3be484
2021-03-11 03:07:56 +00:00
Yuntao Zhou
7c6ef98d3e Merge "Fix minor typo in ContentCaptureManager Javadoc" am: 6305e68c6e am: 3ffbb1f042
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1619880

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2b0b07498a0dcdf199825a3927776d9ab79090b6
2021-03-11 02:20:40 +00:00
Yuntao Zhou
538f58916a Fix minor typo in ContentCaptureManager Javadoc
Noticed on https://developer.android.com/reference/android/view/contentcapture/ContentCaptureManager

Change-Id: I7bb01264947b93e0784497cbad5a5609cb4296d3
2021-03-11 01:51:21 +00:00
Arthur Hung
28b0720cd4 Merge "Move drag event to InputDispatcher (2/n)" into sc-dev 2021-03-11 01:17:38 +00:00
TreeHugger Robot
3d28e460e1 Merge "Include whether in touch mode for WindowlessWindowManager" into rvc-qpr-dev am: 09b7b55659
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13828717

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I022ad77f205b88bf7c76b403b93b9f516cf85a20
2021-03-10 23:15:15 +00:00
Chris Li
0c603d91a7 Include whether in touch mode for WindowlessWindowManager
Fix: 179583920
Fix: 180530717
Test: manually with a windowless button
Change-Id: Ice37c3182a44c6284ffa8950996507025c59270b
Merged-In: Ice37c3182a44c6284ffa8950996507025c59270b
2021-03-10 21:11:34 +00:00
Taran Singh
dd7874a401 Merge "Avoid IME restart for configChanges" into sc-dev 2021-03-10 19:15:23 +00:00
Oli Lan
7e568c9177 Add text classification results to clip description and clip data.
With this change, text classification is performed on text in clip
data when it is set as the primary clip, if it is below a certain
length.

This allows information about which entities (e.g. URLs, addresses)
are present in the text to be added to the ClipDescription.

With toast notifications being added when an app accesses clipboard,
this change will allow apps to tell if clipboard contains information
they are interested in before they access the clip data. This will
allow unnecessary clipboard accesses to be avoided.

If entities are detected in the clip data, the results of classification
are added to the ClipData so that users of this API do not then need
to repeat text classification themselves in order to locate the
entities.

Bug: 180577441
Test: new CTS tests added to ClipDescriptionTest
Change-Id: I334db4805b8b72e0e00c721fe6efe64ec0661a8a
2021-03-10 18:00:30 +00:00
Naomi Musgrave
c50df25a88 Merge changes from topic "sandboxing-display" into sc-dev
* changes:
  Temporarily exclude Launcher from sandboxing; to be reverted once bug is addressed.
  Sandbox letterbox and size compat apps
2021-03-10 17:00:01 +00:00
Taran Singh
9a2eed9f49 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

[1] Iff88b768c6b06cf5cf1fe9e97ee97f8f78e6f0bd

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

Change-Id: Ib94fddadb0dae648cf73a4c1642e51edebd19f50
2021-03-10 08:22:42 +00:00
Joanne Chung
2d60140ef0 Merge "Fix minor typo in TextClassificationConstants Javadoc" into sc-dev 2021-03-10 04:48:28 +00:00
Naomi Musgrave
6574e37f7c Temporarily exclude Launcher from sandboxing; to be reverted once
bug is addressed.

Bug: 181219241
Test: Manual
Change-Id: I468104a853908c5649359084fa9d683e7f1ce532
2021-03-09 22:49:52 +00:00
Naomi Musgrave
93281edad3 Sandbox letterbox and size compat apps
Sandbox Display#getRealSize and WindowManager
bounds when letterbox or size compat mode are
applied to the configuration. Display uses
this field to provide the sandboxed display
size.

This reverts commit 0ba6185639.

Test: atest WindowConfigurationTests
Test: atest FrameworksMockingCoreTests:android.view.DisplayTests
Test: atest WmTests:SizeCompatTests
Bug: 181219241

Change-Id: I86e8edb8368269da8e02cf34f429d245550666c6
2021-03-09 22:48:07 +00:00
TreeHugger Robot
b41c7af72c Merge "Deprecate Display#getRealSize / getRealMetrics, and direct users to WindowManager#getCurrentWindowMetrics instead" into sc-dev 2021-03-09 22:34:59 +00:00
Adam He
a47c17768c Merge "Full refactor of Translation APIs." into sc-dev 2021-03-09 19:05:54 +00:00
Joanne Chung
7686368ef3 Fix minor typo in TextClassificationConstants Javadoc
Bug: 169042855
Test: n/a
Change-Id: I1dc53b1d298aa9a628f847cc81207a95c2c0bd3d
2021-03-09 23:20:10 +08:00
Naomi Musgrave
4186191166 Deprecate Display#getRealSize / getRealMetrics, and direct users
to WindowManager#getCurrentWindowMetrics instead

Bug: 171386167
Test: manual
Change-Id: I8ebb08d514138f7f3a2b4aae29f59c8452c5aa0f
2021-03-09 14:09:41 +00:00
arthurhung
98fc6a134b Move drag event to InputDispatcher (4/n)
Currently, any window or windowless surface could receive drag event if
it is visible and touch-deliverable. But it's hard to tell if a surface
could receive this drag event in WM side because we didn't know the
final touch region of the surface that could be cropped by others.

- add isDragDrop to transferTouchFocus, true when called from drag/drop.
- ACTION_DRAG_EXITED/ACTION_DRAG_LOCATION will be sent from
  InputDispatcher to InputEventReceiver.

Bug: 158242495
Test: atest CrossAppDragAndDropTests DragDropTest
Test: atest WmTests:DragDropControllerTests

Change-Id: I111b6dbb6826fc77749fa2250ff4daced98979d2
2021-03-09 21:07:32 +08:00