Commit Graph

17404 Commits

Author SHA1 Message Date
TreeHugger Robot
647f163cb8 Merge "Update javadoc for EditorInfo.actionId usage" 2021-09-27 03:43:36 +00:00
Tetsui Ohkubo
e48180fb88 Update javadoc for EditorInfo.actionId usage
We concluded that the behavior of sendDefaultEditorAction should be kept
for compatibility. To compensate that, we should update the javadoc to
reflect the current behavior.

Test: None
Bug: 28898996
Change-Id: Idcb2b7180f9e22818ab819715fe2723a05b4894a
2021-09-27 11:14:19 +09:00
TreeHugger Robot
b639781c49 Merge "Revert "Create Public API in AccessibilityManager to expose Audi..."" 2021-09-23 21:20:23 +00:00
Vishnu Nair
ecd114ee1c Merge "WM: Handle primary display orientation when calculating the transform hint" into sc-v2-dev am: e84c7c6393 am: 5619ebfa14
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15838995

Change-Id: I54e16ca4058f3f90bf6e73a10ce8e6fd57e9d733
2021-09-23 19:42:25 +00:00
Vishnu Nair
5619ebfa14 Merge "WM: Handle primary display orientation when calculating the transform hint" into sc-v2-dev am: e84c7c6393
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15838995

Change-Id: Ib2b88cd86df3c2b9f1e7ecb8e9d085aa5a7fb79b
2021-09-23 19:27:37 +00:00
Vishnu Nair
e84c7c6393 Merge "WM: Handle primary display orientation when calculating the transform hint" into sc-v2-dev 2021-09-23 19:14:57 +00:00
Kaiqiang Wang
449bcc36bd Revert "Create Public API in AccessibilityManager to expose Audi..."
Revert "Update AudioDescription read/write from Settings.Secure,..."

Revert "Add CTS tests for AccessibilityManager.isAudioDescriptio..."

Revert submission 15617076-AudioDescriptionPublicAPI

Reason for revert: Raise Memorytest failures: b/200728759, b/200746876.
Reverted Changes:
Ic11e0bc4f:Add CTS tests for AccessibilityManager.isAudioDesc...
I8f3908513:Update AudioDescription read/write from Settings.S...
Iecf006bc8:Create Public API in AccessibilityManager to expos...

Bug: 200728759
Bug: 200746876
Change-Id: Ic5b63bd5e9196f24638d36c05c3fa209c1afbcec
2021-09-23 18:09:47 +00:00
Joanne Chung
1ebf71e4f7 Merge "Fix translation doesn't work on ViewGroup" into sc-qpr1-dev am: f0c99d831e am: dedd68e52e am: 30a84e50e2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15853328

Change-Id: I1265a0f30193dcd833357a96dddc6b339c166121
2021-09-23 07:06:22 +00:00
Joanne Chung
0a8e3c16b5 Merge "Fix the existing translation doesn't update for new translated result." into sc-qpr1-dev am: 0287b4722c am: 2b55842700 am: 8b7eb90c86
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15853776

Change-Id: I85232df3ddb496fcdb7709804e9dc94f75b5193a
2021-09-23 07:04:41 +00:00
Pablo Gamito
813e3bbb76 Merge "Update status bar transition start time" into sc-qpr1-dev am: 5784ba0c38 am: 65e4e7d7fa am: 89f099b89d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15879493

Change-Id: I1043c9026f3cb6d5aab883d475a4b1a116c2db53
2021-09-23 06:52:56 +00:00
Joanne Chung
30a84e50e2 Merge "Fix translation doesn't work on ViewGroup" into sc-qpr1-dev am: f0c99d831e am: dedd68e52e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15853328

Change-Id: I0005a220026616ad60685057165d4e4a00157a70
2021-09-23 06:44:34 +00:00
Joanne Chung
f0c99d831e Merge "Fix translation doesn't work on ViewGroup" into sc-qpr1-dev 2021-09-23 06:15:01 +00:00
Joanne Chung
8b7eb90c86 Merge "Fix the existing translation doesn't update for new translated result." into sc-qpr1-dev am: 0287b4722c am: 2b55842700
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15853776

Change-Id: I471e42aad4f9231fbdf17217cf8700cc3bea7816
2021-09-23 05:43:59 +00:00
Pablo Gamito
89f099b89d Merge "Update status bar transition start time" into sc-qpr1-dev am: 5784ba0c38 am: 65e4e7d7fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15879493

Change-Id: I3acd865621921efcb708bcdfcb447c1bc77af0b4
2021-09-23 05:34:54 +00:00
Joanne Chung
0287b4722c Merge "Fix the existing translation doesn't update for new translated result." into sc-qpr1-dev 2021-09-23 01:14:44 +00:00
TreeHugger Robot
38e394a87a Merge "Expose getSurfaceTransformHint API" into sc-v2-dev am: dedfe23d54 am: faec154787
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15848160

Change-Id: I221b090da9013442f4970da0cca0a90a5ab07bb7
2021-09-23 00:22:07 +00:00
TreeHugger Robot
faec154787 Merge "Expose getSurfaceTransformHint API" into sc-v2-dev am: dedfe23d54
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15848160

Change-Id: I1a56c0e694bfe2cf38192a3e23dd29fc6318b558
2021-09-23 00:08:01 +00:00
TreeHugger Robot
dedfe23d54 Merge "Expose getSurfaceTransformHint API" into sc-v2-dev 2021-09-22 23:55:07 +00:00
Adam He
a9ccf34714 Merge "Content Capture change to send window token on creating session." into sc-v2-dev am: b9eafd3c02 am: ba74f17220
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15875817

Change-Id: I00cab1e2fbd4c42dbc41aa57f26b570f7b93a4aa
2021-09-22 20:40:32 +00:00
Adam He
6d70c07884 Merge "Add Content Capture event TYPE_WINDOW_BOUNDS_CHANGED to notify window bounds." into sc-v2-dev am: 8e2e8608a1 am: 5148940766
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15856579

Change-Id: I67ce5198d7ee024ade71adcc7196c2481e24cc17
2021-09-22 20:40:15 +00:00
Adam He
ba74f17220 Merge "Content Capture change to send window token on creating session." into sc-v2-dev am: b9eafd3c02
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15875817

Change-Id: I60f1527336eb0b0251c2b577cf4fdc81d2de2f4c
2021-09-22 20:24:52 +00:00
Adam He
5148940766 Merge "Add Content Capture event TYPE_WINDOW_BOUNDS_CHANGED to notify window bounds." into sc-v2-dev am: 8e2e8608a1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15856579

Change-Id: Ic66995a013565492a45f6dc675ababc09ad91e60
2021-09-22 20:24:10 +00:00
Adam He
b9eafd3c02 Merge "Content Capture change to send window token on creating session." into sc-v2-dev 2021-09-22 20:13:53 +00:00
Adam He
d9e69e2b50 Content Capture change to send window token on creating session.
Bug: 189477723
Test: atest CtsContentCaptureTestCases
Change-Id: I70a0be583faae1a18c61e70c72a3d2a8e9e46438
2021-09-22 17:06:50 +00:00
Vishnu Nair
d6f2c5882f WM: Handle primary display orientation when calculating the transform hint
Query the surface flinger property
ro.surface_flinger.primary_display_orientation to determine the
primary display's install orientation. If the window is on the
primary display, then update the transform hint passed on to the
client.

Bug: 196167822
Test: check initial buffer transforms on displays with a different
install orientation

Change-Id: Idf010cd6be73172ba708820f87046c3ba3cf8001
2021-09-22 17:06:10 +00:00
Pablo Gamito
3ea6b0ab10 Update status bar transition start time
Update to feel less flickery with the new task transition animation

We want to try and have the navbar transition right when the animation is in between the two tasks

Bug: 200674544
Test: Existing tests
Change-Id: If99965c4b4776c902a3c6b32a3fcdb0b65811407
2021-09-22 15:36:36 +02:00
Adam He
19f65ec098 Add Content Capture event TYPE_WINDOW_BOUNDS_CHANGED to notify window
bounds.

Bug: 189477723
CTS-Coverage-Bug: 189477723
Test: manual verification

Change-Id: I38cfdde21aed1827744f8db4eb61f62cc2413e78
2021-09-21 21:54:52 +00:00
Kaiqiang Wang
1ba3d33a9e Merge "Create Public API in AccessibilityManager to expose Audio description enabled status." 2021-09-21 20:27:43 +00:00
Vishnu Nair
1f19e1141e Expose getSurfaceTransformHint API
The transform hint can be used by a buffer producer to pre-rotate
the rendering such that the final transformation in the system
composer is identity. This can be very useful when used in
conjunction with the h/w composer HAL in situations where it cannot
handle rotations or handle them with an additional power cost.

Bug: 196167822
Test: atest AttachedSurfaceControlTest
Change-Id: Idb7fcf58ecbcc22cd43c226ee4faad958c265e72
2021-09-21 11:28:35 -07:00
TreeHugger Robot
348a0e6e3c Merge "SurfaceControl: Add setDropInputMode api" into sc-v2-dev 2021-09-21 15:37:27 +00:00
Chris Li
859480ffc2 Merge changes Ib5ad3250,Iff58afdb into sc-v2-dev am: 83d5a591f2 am: 055d1d5a4e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15838390

Change-Id: I437593233fa28a2915ebb4323f2e8172542777ff
2021-09-21 05:42:45 +00:00
Chris Li
055d1d5a4e Merge changes Ib5ad3250,Iff58afdb into sc-v2-dev am: 83d5a591f2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15838390

Change-Id: Ib58e4c6785e050bd6444eb0fe835b096d5506729
2021-09-21 05:28:10 +00:00
Chris Li
83d5a591f2 Merge changes Ib5ad3250,Iff58afdb into sc-v2-dev
* changes:
  Flag whether a RemoteAnimationTarget has parent in animation
  Use TaskFragment bounds instead of TaskBounds for Activity animation
2021-09-21 05:18:46 +00:00
Chris Li
79ab7ea034 Flag whether a RemoteAnimationTarget has parent in animation
There is case when a TaskFragment is resizing while one of its children
is open/close. In such case, both the TaskFragment and its child will be
included in the transition, but we don't want to animate both of them.
Use the new flag to determine if the child need to be animated.

Bug: 196173550
Test: test with demo app
Change-Id: Ib5ad32501e046e5b612f6d5ae2faed6266d99f3d
2021-09-21 08:33:16 +08:00
Vishnu Nair
cbc4b97e31 SurfaceControl: Add setDropInputMode api
Introduces an API to drop input events on this SurfaceControl. This
policy will be inherited by its children. The caller must hold the
ACCESS_SURFACE_FLINGER permission.

Options include:
ALL: SurfaceControl and its children will not receive any
input regardless of whether it has a valid input channel.
OBSCURED: SurfaceControl and its children will not
receive any input if the layer is obscured, cropped by its parent or
translucent.

These policies are used to enable features that allow for a less trusted
interaction model between apps. See the bug for more details.

Test: atest libgui_test InputDispatcherDropInputFeatureTest
Bug:197364677

Merged-In: Ifcb4133306a43874e74e8fb0f42b60842daf6f25
Change-Id: Ifcb4133306a43874e74e8fb0f42b60842daf6f25
2021-09-20 23:22:31 +00:00
TreeHugger Robot
e3b6f72053 Merge "SurfaceView: Fix SurfaceControl synchronization issues" into sc-v2-dev am: bc617435cf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15819958

Change-Id: Ic87a3bcbbc888584c6ead7de2a8ee48b36854bb0
2021-09-20 23:08:03 +00:00
TreeHugger Robot
bc617435cf Merge "SurfaceView: Fix SurfaceControl synchronization issues" into sc-v2-dev 2021-09-20 22:59:15 +00:00
Pablo Gamito
dcf9fcfc42 Merge "Add API to specify background color for animations" into sc-qpr1-dev am: 14886c5085 am: bf8ed2a872 am: 0c0cf88818
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15836428

Change-Id: I91433509ccccc83297891eb553b12919fcfbc63e
2021-09-20 20:59:40 +00:00
Pablo Gamito
0c0cf88818 Merge "Add API to specify background color for animations" into sc-qpr1-dev am: 14886c5085 am: bf8ed2a872
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15836428

Change-Id: Ibe17e91bf2c847398db50f17248586fdc71ee9a7
2021-09-20 20:55:21 +00:00
Vishnu Nair
e2b63cb1f9 SurfaceControl: Add setDropInputMode api
Introduces an API to drop input events on this SurfaceControl. This
policy will be inherited by its children. The caller must hold the
ACCESS_SURFACE_FLINGER permission.

Options include:
ALL: SurfaceControl and its children will not receive any
input regardless of whether it has a valid input channel.
OBSCURED: SurfaceControl and its children will not
receive any input if the layer is obscured, cropped by its parent or
translucent.

These policies are used to enable features that allow for a less trusted
interaction model between apps. See the bug for more details.

Test: atest libgui_test InputDispatcherDropInputFeatureTest
Bug:197364677

Merged-In: Ifcb4133306a43874e74e8fb0f42b60842daf6f25
Change-Id: Ifcb4133306a43874e74e8fb0f42b60842daf6f25
2021-09-20 17:37:34 +00:00
Vishnu Nair
a3cd005f0f Merge "SurfaceControl: Add setDropInputMode api" 2021-09-20 17:33:07 +00:00
Pablo Gamito
2ccc829e71 Add API to specify background color for animations
To be used for new task transtion animations
(go/android-new-task-motion) to set a background color behind the
animations instead of showing the wallpaper.

Test: atest FlickerTests:TaskTransitionTest
Bug: 199507257
Change-Id: I7fabfdcaf90be63c11eb3b18d65259c620570cab
2021-09-20 19:30:17 +02:00
Mariia Sandrikova
bb3b0c9f87 Merge "[2/n] Display stack provides DisplayInfos" into sc-v2-dev am: c3c2b146d6 am: da40c46955
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15557290

Change-Id: I413dd6541f9628a710ce4bfe02d2a38a5e9cc1c8
2021-09-20 12:08:12 +00:00
Joanne Chung
7672bbc915 Fix the existing translation doesn't update for new translated result.
It is possible the existing text is changed that triggers a new
translation. We cache the translation response when onShowTransltion
is called. We should keep the translation response is updated if this
is a new translation result.

Bug: 200232741
Test: atest CtsTranslationTestCases
Test: manual. The issue app works fine.
Change-Id: Iaf7423cd35d4484e33de84e478256b77a000f390
2021-09-19 15:16:57 +00:00
Vishnu Nair
d100067fd6 SurfaceControl: Add setDropInputMode api
Introduces an API to drop input events on this SurfaceControl. This
policy will be inherited by its children. The caller must hold the
ACCESS_SURFACE_FLINGER permission.

Options include:
ALL: SurfaceControl and its children will not receive any
input regardless of whether it has a valid input channel.
OBSCURED: SurfaceControl and its children will not
receive any input if the layer is obscured, cropped by its parent or
translucent.

These policies are used to enable features that allow for a less trusted
interaction model between apps. See the bug for more details.

Test: atest libgui_test InputDispatcherDropInputFeatureTest
Bug:197364677

Change-Id: Ifcb4133306a43874e74e8fb0f42b60842daf6f25
2021-09-17 12:14:47 -07:00
Naomi Musgrave
aca03a172c [2/n] Display stack provides DisplayInfos
For all possible states a device can assume, the DisplayManagerService
provides the DisplayInfo associated with that layout of the logical
display. WindowManager applies each possible rotation to these
DisplayInfo. This, in turn, is used to calculate the possible max
WindowMetrics on the device.

Done:
* Display stack builds collection of DisplayInfo, for all
 possible display states (folded, unfolded on jumbo)
* Display stack pushing set of DisplayInfos to WindowManager
* WindowManager calculates max bounds for all possible
  (display layouts x rotations)

Not started:
* WindowManager calculates insets for each rotation

Bug: 181127261
Test: atest DeviceStateManagerGlobalTest
Test: atest DeviceStateManagerServiceTest
Test: atest LogicalDisplayMapperTest
Change-Id: I3a407262e755cb57c506b7255eb5c067523381d3
2021-09-17 14:56:33 +00:00
Joanne Chung
ec3f41e70e Fix translation doesn't work on ViewGroup
The system will add requested view reference into cache but it is
possible the requested translation view is a viewgroup, we don't add
this into view reference list that cause the translation doesn't work
on ViewGroup.

Bug: 200233857
Test: atest CtsTranslationTestCases
Test: manual. Use a sample code to request translation for a
viewgroup and make sure it is added into view reference list.
Test: manual verify with issue client app, it works.

Change-Id: Ie593a1a436fd046373412ae2955a78057d22b892
2021-09-17 09:29:44 +00:00
Kaiqiang Wang
76279d4147 Create Public API in AccessibilityManager to expose Audio description
enabled status.

1) Move ENABLE_ACCESSIBILITY_AUDIO_DESCRIPTION_BY_DEFAULT from
Settings.Global to Settings.Secure.
2) Add isAudioDescriptionEnabled public API to read the
Settings.Secure.ENABLED_ACCESSIBILITY_AUDIO_DESCRIPTION_BY_DEFAULT.

Test: local test
Test: atest AccessibilityManagerTest
Bug: 160823970
CTS-Coverage-Bug: 197311729
Change-Id: Iecf006bc8a1315414b37b6d644fc607b3d2aa03b
2021-09-16 23:26:21 +00:00
Yohei Yukawa
e8424ef600 Deprecate MissingMethodFlags to preserve invocation order
This CL effectively replaces my previous CL [1], which made
unimplemented methods in InputConnection not fatal errors, with a
simplified implementation that still gracefully take care of
unimplemented methods without causing app crashes.

Instead of propagating missing method information from the IME client
to the IME process, this CL will simply catch AbstractMethodError in
the IME client process.  Doing so enables us to

 1. preserve the strict invocation order of InputConnection APIs, and
 2. achieve the same goal with fewer lines of code.

The additional cost of throwing (and catching) AbstractMethodError
every time the IME calls an unimplemented InputConnection API can be
justified as it is really an exceptional scenario, and avoiding it
would require extra maintenance cost as seen in
InputConnectionInspector.

The above overhead (and complexity) due to AbstractMethodError can be
avoided by adding default implementations to those InputConnection
APIs, but doing so requires API signature update hence API council
approval to go ahead, which is to be discussed in Bug 199934664.

 [1]: I3c58fadd924fad72cb984f0c23d3099fd0295c64
      19a80a1e80

Bug: 27407234
Bug: 27642734
Bug: 27650039
Bug: 194110780
Test: atest CtsInputMethodTestCases
Change-Id: I9e801e92496a6e16cee37664870c97ed096f1413
2021-09-15 10:03:20 -07:00
Yunfan Chen
6911a5553f Merge "Make requested visibility available in snapshot starting window" into sc-v2-dev am: ca4709e72b am: 39002ce562
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15799656

Change-Id: If9ca745f47d51bb69840a70899f2ffff0442ddc2
2021-09-15 08:53:12 +00:00