Commit Graph

15866 Commits

Author SHA1 Message Date
Treehugger Robot
7721431149 Merge "Update OWNERS files for textclassifier" am: feb82a11cc am: 4a77e414f9 am: c0935cb9a1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1551114

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3bb82154f571e68bee21be6e88957be97e904d50
2021-01-15 17:24:06 +00:00
Treehugger Robot
c0935cb9a1 Merge "Update OWNERS files for textclassifier" am: feb82a11cc am: 4a77e414f9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1551114

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I241f809262ca82889136ecb62d494c47b5814e07
2021-01-15 17:06:17 +00:00
Tony Mak
16a99fee0e Update OWNERS files for textclassifier
1. Create a OWNRES file in the textclassifier test folder
2. Add me and licha@ to the OWNERS files.

Test: N/A
Change-Id: I5bedfc28d2ea18cdaa2dac7e0e799cf225ba99d1
2021-01-14 19:12:59 +00:00
TreeHugger Robot
58679dbef9 Merge "Center crop and clip notification image." 2021-01-14 18:13:22 +00:00
Linus Tufvesson
8e713dbd58 Merge "Add SYSTEM_APPLICATION_OVERLAY" 2021-01-14 14:59:43 +00:00
Winson Chung
c31ec3d518 Merge "Migrate FrameTracker to use ST Jank information" 2021-01-13 19:36:00 +00:00
Bernardo Rufino
b57d8d8a26 Merge "Document go/untrusted-touches" 2021-01-13 14:41:04 +00:00
Mathew Inwood
f3793ebcc9 Merge "Derestrict some non-SDK APIs." am: 29bf6e8443 am: 9e27f89092 am: 982e50f2c6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1541669

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iab20c244c8ff5b04f3236cfccb453a4fbe5a8705
2021-01-13 10:34:26 +00:00
Mathew Inwood
982e50f2c6 Merge "Derestrict some non-SDK APIs." am: 29bf6e8443 am: 9e27f89092
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1541669

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4eeffeb0d9ab509e2f436435bf2079558e2d1c7d
2021-01-13 10:12:53 +00:00
Mathew Inwood
29bf6e8443 Merge "Derestrict some non-SDK APIs." 2021-01-13 09:38:35 +00:00
Bernardo Rufino
e5215b4853 Document go/untrusted-touches
The only public API (that I know!) that let touches pass-through is
FLAG_NOT_TOUCHABLE, so I've put the rules that relate to app-developers
there.

Please let me know if there are any other public APIs that makes a
window let touches pass-through. The other one I know of is
ViewTreeObserver.addOnComputeInternalInsetsListener() that let's you
specify the touchableRegion, but that's not public.

(The feature works regardless of the API used to make the window
pass-through)

The docs are a shorter version of the "Rules" section of
go/untrusted-touches.

Bug: 158002302
Fix: 173022596
Test: Build
Change-Id: Ic7ba68f03587112db2cc93128ac41cb09d443127
2021-01-13 09:22:26 +00:00
Joanne Chung
d47c351b8d Merge "Initial layout of translation related APIs." 2021-01-12 16:00:23 +00:00
Adam He
2653f23d47 Initial layout of translation related APIs.
The initial translation related APIs. The APIs and the implementation
will be revised in the follow up changes. The service register will
on the next changes.

Bug: 173243538
Bug: 176208267
Test: manual verification (build)

Change-Id: Ib7b39e1b548bc6663a81482fa335632e8da18d6a
2021-01-12 21:08:05 +08:00
Linus Tufvesson
68e0831b03 Add SYSTEM_APPLICATION_OVERLAY
.. which allows the holder to create privileged application overlays
that won't be hidden by Window#hideOverlayWindows

Bug: 159616727
Bug: 171177581
Test: atest CtsWindowManagerDeviceTestCases:HideOverlayWindowsTest
Change-Id: I1a8c08047ca51b12067fa68bea61843013940643
2021-01-12 12:57:33 +00:00
Nikita Dubrovsky
19d37240a5 Merge "Add MIME types to ViewStructure and autofill/cc ViewNode classes" 2021-01-11 21:17:53 +00:00
Nikita Dubrovsky
e8f7c4ba7c Add MIME types to ViewStructure and autofill/cc ViewNode classes
Bug: 168253885
Test: atest FrameworksCoreTests:TextViewOnReceiveContentTest
Test: Manual
CTS-Coverage-Bug: 170893906
Change-Id: Iac8f73a7a022f20f59ecef9be89e3189ca106e4c
2021-01-11 20:57:48 +00:00
Chavi Weingarten
b929fb195e Merge "Unset mNextDrawUseBlastSync if VRI won't draw" 2021-01-11 19:12:38 +00:00
Nathalie Le Clair
731ce71273 Merge "Implement KEYCODE_TV_POWER" 2021-01-11 12:20:12 +00:00
Tiger Huang
511f306a37 Merge "Add logs to indicate why a surface is invalid" 2021-01-09 06:24:02 +00:00
Jeff DeCew
49c60519b6 Merge "Show LargeIcon as wide for apps targeting S." 2021-01-08 20:57:53 +00:00
chaviw
d862b98d91 Unset mNextDrawUseBlastSync if VRI won't draw
There are some checks before attempting to draw in VRI. If we get a
blast sync relayout, but aren't going to draw, unset
mNextDrawUseBlastSync. Otherwise, we end up blocking indefinitely.
There would never be a draw callback so we would never unset that flag.

If there are no pending draws, report back immediately so we don't block
WMS since it could be waiting on the app to draw.

Test: enable shell transitions, unlock device
Bug: 175229445
Change-Id: I8e1f524862e2b9a48949cf6846141d67129c507c
2021-01-08 11:14:39 -08:00
Evan Rosky
eb299faeed Merge "Basic support for split-screen in new transition system" 2021-01-08 18:00:31 +00:00
Nathalie Le Clair
22d11e197f Implement KEYCODE_TV_POWER
For devices that are not Android TV devices and not connected to a TV via HDMI, KEYCODE_TV_POWER is ignored.
For the following Android TV devices, KEYCODE_TV_POWER is an alias of KEYCODE_POWER:
- Devices that don't support HDMI
- HDMI TV panel devices
- HDMI devices with POWER_CONTROL_MODE set to NONE
- HDMI devices with CEC control disabled
For all other HDMI devices, KEYCODE_TV_POWER is forwarded to the HDMI stack by calling toggleAndFollowTvPower(). For HDMI source devices, this results in
1. Toggling of the HDMI-connected TV power state over HDMI-CEC
2. The source device following the TV power state

Bug: 157402294
Test: adb shell input keyevent KEYCODE_TV_POWER, manually verified TV power toggle behavior on ADT3

Change-Id: I59cd3f2a5c2b7a551176ab40ef9c559ad502a974
2021-01-08 11:43:36 +01:00
Tiger Huang
596e4fd4f7 Add logs to indicate why a surface is invalid
This helps us to debug.

Bug: 175954493
Test: Locally make leashes invalid and check the log format.
Change-Id: Idcde497ffee1f10a4289520e154aa8b39eed1f78
2021-01-08 18:39:40 +08:00
TreeHugger Robot
8fc190c6fc Merge "IME API: InputConnecton#setImeTemporarilyConsumesInput(boolean)" 2021-01-08 07:20:49 +00:00
TreeHugger Robot
11615dea52 Merge "Add EditorInfo#getInitialSurroundingText API" 2021-01-08 02:56:18 +00:00
Lan Wei
30fe6aa964 IME API: InputConnecton#setImeTemporarilyConsumesInput(boolean)
Add API to set IME will temporarily consumes the input, for
this case, the cursor will be invisible in the app.

Bug: 175362887
Test: atest FrameworksCoreTests:TextViewTest
Test: atest CtsWidgetTestCases:TextViewTest

Change-Id: Ic04cacfd73f1f4cb254bb16caf6b04c00c91a318
2021-01-08 09:23:55 +08:00
Jorim Jaggi
2ee0ab9556 Migrate FrameTracker to use ST Jank information
Test: FrameTrackerTest
Test: Systrace, perform CUJ
Bug: 174755489
Change-Id: I906abce66d456add7c562b1d9038352eb589f6f0
2021-01-07 23:01:18 +01:00
Evan Rosky
68fbb47250 Basic support for split-screen in new transition system
Sends the "trigger" taskinfo associated with a transition when
applicable. This can be used by the transitionplayer to make
decisions about how to start and play transitions.

Additionally, TaskInfo is provided in each Change object if
they are tasks. This provides all the information needed to
choose how to handle split.

Shell's transitionplayer makes use of this to add support for
"handlers" to deal with specific transition requests. Currently
a single handler is added to process split-screen transitions.

Bug: 169035082
Test: Use split-screen (enter, exit via swipe up/down,
      exit via dismiss top)
Change-Id: I53a03dd85cb260505e66d5d87a34afa4ab1f8cc8
2021-01-07 13:45:24 -08:00
TreeHugger Robot
677c97ddf8 Merge "Pass focused field's ViewNode information in the augmented autofill request" 2021-01-07 20:25:15 +00:00
Jeff DeCew
21147c02f8 Show LargeIcon as wide for apps targeting S.
* This does not inhibit the grouping behavior which demotes this image and shows it in a smaller square area on the left.
* This also converts the Notification class to calculate margins and sizes in DIP instead of PX, as that is more resilient.

Fixes: 175409684
Test: atest NotificationTemplateTest
Change-Id: I35d28c8df341dbbac2774026c6ca749e296c0482
2021-01-07 14:30:57 -05:00
Vishnu Nair
353bade564 Merge "Enable blast adapater for SurfaceView" 2021-01-07 17:51:52 +00:00
Mathew Inwood
95709ba69f Derestrict some non-SDK APIs.
Per request from a partner, these APIs will not be restricted as they
are in use. This is conceptually a partial revert of change 5d123b6775.

NoNonSdkCheck: b/170729553

Bug: 171933273
Test: Treehugger
Change-Id: Ibb525e9a9e2fc90248b74f45f3cdcb0be7487c3a
2021-01-07 09:53:09 +00:00
Nikita Dubrovsky
22a635fb25 Merge "Remove AUTOFILL_TYPE_RICH_CONTENT and related code" 2021-01-07 04:56:24 +00:00
Nikita Dubrovsky
7c2e5bb7c5 Remove AUTOFILL_TYPE_RICH_CONTENT and related code
This reverts the autofill API changes made in ag/9884022 (only the
autofill-related changes in that CL, not the rest). This is because
non-text content in autofill is now handled via a separate code path
rather than via an autofill type (the new pipe for rich content was
added in ag/12642608).

Bug: 168837034
Test: Manual (image suggestions in augmented autofill)
Test: atest FrameworksCoreTests:AutofillValueTest
Test: atest CtsWidgetTestCases:TextViewOnReceiveContentTest
Change-Id: I261148646d21474ea10662a3e6a5d8b0ba6708f4
2021-01-07 01:33:17 +00:00
Vishnu Nair
7fa26f552b Enable blast adapater for SurfaceView
Enable buffers to go through BLASTBufferQueue
in SurfaceView.

Bug: 168917217

Test: atest SurfaceViewBufferTests & manual tests see bug for history
Change-Id: I4636f51531b35208fb2f10334876d5e65b0bb364
2021-01-06 15:14:37 -08:00
Feng Cao
41797aa777 Pass focused field's ViewNode information in the augmented autofill request
* Only regular view's viewnode info is produced. Virtual view is not
  support yet, for efficiency reasons.

Test: manual
Test: atest android.autofillservice.cts.inline
Test: atest android.autofillservice.cts.augmented
Bug: 141703532
Change-Id: Ib9aa75ebf8504d674513bd0e6528460ba9db2c34
2021-01-06 14:22:03 -08:00
Tiger Huang
cf7891ff68 Notify visibility change if source visibility is changed am: e8bd5284d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13292846

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0e77b4ed58c35aa14a7eaaf089d89c13087033db
2021-01-06 20:00:39 +00:00
TreeHugger Robot
c06cc30894 Merge "Add detailed reasons for dropping events in ViewRootImpl" 2021-01-06 18:29:33 +00:00
Tiger Huang
e8bd5284d3 Notify visibility change if source visibility is changed
This makes view root dispatch the up-to-date WindowInsets to the app.

Fix: 166619182
Test: Steps in the bug (comment#12)
Change-Id: I8c47e3be84357f65084a7d9994f7d7b68f15611e
(cherry picked from commit fd94351305)
2021-01-06 17:56:34 +00:00
Tiger Huang
7dbb0540c0 Preserve the controlling state of appearance and behavior
Make sure the appearance or the behavior controlled by the new APIs
won't be affected by setting new LayoutParams.

This CL also makes ViewRootImpl#setLayoutParams won't modify the
caller's LayoutParams.

Fix: 175169461
Test: atest ViewRootImplTest
Change-Id: I4cdd846e8638f9813146e6461134e4dd1606bd50
2021-01-06 19:10:02 +08:00
Tiger Huang
335d657422 Merge "Send display cutout to client via insetsChanged" 2021-01-06 06:52:31 +00:00
Chavi Weingarten
f52cfa501c Merge "Clean up unused code." 2021-01-05 21:53:39 +00:00
Chavi Weingarten
af95a200dc Merge "Fix blur in ViewRootImpl" 2021-01-05 21:50:20 +00:00
Siarhei Vishniakou
d7965fd114 Add detailed reasons for dropping events in ViewRootImpl
Currently, ViewRootImpl drops events for several reasons. However, just
one reason is written to the log: "dropping event because the window
does not have focus".

But even if the window has focus, the event can be dropped.

Improve the logging by refactoring the "if" check inside ViewRootImpl

Test: atest ViewRootImplTest
Bug: 173675649
Change-Id: I2ba8270ba09dea63e6497bc830af4c704ada52ef
2021-01-05 11:11:23 -10:00
chaviw
a8ff59dfb6 Clean up unused code.
Since SurfaceView no longer enables blast sync transactions, a lot of
the code is no longer needed.

BlastSync is only set when ViewRootImpl calls relayout that returns the
blast sync flag. This means, we are guaranteed to pause the UI thread
since we don't want to allow overlapping relayouts. Because of this, we
can remove a lot of the complex code and variables.

1. We no longer need both mSendNextFrameToWm and
mNextDrawUseBLASTSyncTransaction. This is because if mSendNextFrameToWm
is true, we will pause the traverse and never set
mNextDrawUseBLASTSyncTransaction until mSendNextFrameToWm is set to
false.

2. Similarly, we don't need mRtNextFrameReportedConsumeWithBlast. This
was added to help with overlapping requests. Since that's no longer
possible, we can just remove this and use mSendNextFrameToWm as the
check

3. We also don't have to be thread safe with mRtBLASTSyncTransaction
since we only update it when the UI thread is paused.

4. We no longer need to call setNextTransaction with null since that was
only when SurfaceView was calling useBlastSyncTransaction and the main
window wasn't drawing. That no longer happens and we are guaranteed
that setNextTransaction is only set when a relayout occurs.

Test: Enable blast sync and use split/pip
Bug: 175229445
Change-Id: I0bebd15804ea3b960e85c20235ae5ce98bcc3f00
2021-01-05 21:03:10 +00:00
Jeff Sharkey
0653eec119 Merge "Add SystemUI owners NotificationHeaderView and NotificationTopLineView" am: 1050d7b88c am: b5de515afa am: 59fb3f9d21
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532649

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I193eb819384eca352dc3453a121e5a33fd14afb2
2021-01-05 18:37:05 +00:00
Jeff Sharkey
59fb3f9d21 Merge "Add SystemUI owners NotificationHeaderView and NotificationTopLineView" am: 1050d7b88c am: b5de515afa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532649

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic439b1773199ed952e935169d1730a9bc2366a4c
2021-01-05 18:02:00 +00:00
Fiona Campbell
48df7d1850 Add config.xml fallback in DisplayDeviceConfig
This change adds the default brightness to the ddc, and a fallback to
config.xml when the ddc doesn't exist.

It adds the minimum and maximum brightness constrtaints to the display
device config - which are currently sourced from config.xml.

Bug: 147415200
Test: manual

Change-Id: Ibbfbbbd495048114befb3f867bd5f4e26916ca9e
2021-01-05 14:31:20 +00:00
Tiger Huang
ec1a69e87c Send display cutout to client via insetsChanged
Since the display cutout is a type of insets and the display cutout can
be obtained from WindowInsets, it makes sense that InsetsState has the
display cutout instance. In this way, we can send the display cutout to
client via W#insetsChanged instead of W#resized.

This can be a step to remove the class of ClientWindowFrames, and can
also be a step to make client compute its window frame locally.

Fix: 175858810
Bug: 161810301
Test: atest WindowAddRemovePerfTest ImeInsetsSourceConsumerTest
            InsetsControllerTest InsetsStateTest ViewRootImplTest
            WindowInsetsControllerTests ActivityRecordTests
            DisplayPolicyLayoutTests LaunchParamsControllerTests
            TaskSnapshotSurfaceTest WindowMetricsActivityTests
            WindowMetricsWindowContextTests WindowMetricsTest
            WindowFrameTests WindowStateTests WmDisplayCutoutTest
Change-Id: I9a930b1d2f7df3cea2b29629b767a4a5f31bca17
2021-01-05 22:22:38 +08:00