Commit Graph

18482 Commits

Author SHA1 Message Date
Tiger Huang
d95834c214 Merge "Only update the compat system UI visibility if the source is valid" into tm-dev am: 1fab45404b am: 8893bc9d06
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18583184

Change-Id: I887327b4d504f7c9576f11bf263c8e4d942c757e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-30 09:20:07 +00:00
Tiger Huang
1fab45404b Merge "Only update the compat system UI visibility if the source is valid" into tm-dev 2022-05-30 08:40:03 +00:00
Mark Punzalan
b8432ae0ad Merge "Don't clear translation state on temporary detachment." into tm-dev am: 76ba87f909 am: 29e91d3a0a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18624095

Change-Id: Ie2f7e9d9f56c31ba342b790e565b547728524bae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 17:57:31 +00:00
Mark Punzalan
76ba87f909 Merge "Don't clear translation state on temporary detachment." into tm-dev 2022-05-27 17:15:29 +00:00
Mark Punzalan
a695631475 Don't clear translation state on temporary detachment.
Change I97cc418a8 broke translation on apps which use ListView; messages
were re-translated with the animation even while on-screen. A new
message arrival triggers a re-layout which causes the temporary
detachment, which caused translation to be cleared, and the views get
translated again later.

The solution is to NOT clear translation in the case of temporary
detachment. When Views are actually recycled (e.g., by ListView and
RecyclerView), the detachment is permanent/non-temporary.

Bug: 232178488
Test: atest UiTranslationManagerTest
Test: Manual - Verified scrolling and new messages arriving when
translation is enabled. Tested on apps that use ListView and
RecyclerView.

Change-Id: Ibf1be58219c43252e00b06d4c9e27def5bd36fc2
2022-05-26 23:57:13 +00:00
Mark Punzalan
905979b385 Merge "Translate selectable TextViews by temporarily disabling selectable." into tm-dev am: 8bbc7f6554 am: 8f85334591
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18490753

Change-Id: I61c1109f8b7b4cf42bd38ab5fc234959056ca710
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 21:52:49 +00:00
Mark Punzalan
8bbc7f6554 Merge "Translate selectable TextViews by temporarily disabling selectable." into tm-dev 2022-05-26 21:06:34 +00:00
Pihuei Wang
180b752558 Merge "Revert "Add ability to trace shell transitions"" into tm-qpr-dev 2022-05-26 03:14:59 +00:00
Pihuei Wang
0dced9da30 Revert "Add ability to trace shell transitions"
This reverts commit 6ae3b6c67e.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=test_suites_arm64&lkgb=8640544&lkbb=8644278&fkbb=8640550, bug b/233875239

Change-Id: I44da4fc6d4f7ae585c122624e5cbe7838cd2a71f
2022-05-26 03:08:10 +00:00
Mark Punzalan
6758b3f7e7 Translate selectable TextViews by temporarily disabling selectable.
The text is not selectable while translated. Making translated text
selectable requires many more changes.

This was tested in Nextdoor in the feed/posts activity. When there is a
"Read more" link in the post, the link doesn't work while translated,
and doesn't behave the same way after translation is paused.

Bug: 202966891
Test: atest CtsTranslationTestCases
Test: Manually - with Nextdoor on feed and chat activities
Change-Id: I6e8f532d427d85ff22df0deb248d8416a15f4821
2022-05-25 20:03:10 +00:00
Pablo Gamito
1abf474563 Merge "Add ability to trace shell transitions" into tm-qpr-dev 2022-05-25 10:31:00 +00:00
Tony Huang
4f8c3f0841 Merge "Remove the special logic of the divider bar z-ordering" into tm-qpr-dev 2022-05-25 02:01:26 +00:00
TYM Tsai
8a29813f8a Merge "Fix inline tooltip position is wrong" into tm-dev am: edca30dce8 am: 34fe95788a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18350147

Change-Id: I21e50d80c9d89a661100e509bebbf12b409092eb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 01:56:28 +00:00
TYM Tsai
edca30dce8 Merge "Fix inline tooltip position is wrong" into tm-dev 2022-05-25 01:05:17 +00:00
Chavi Weingarten
ce679a846b Merge "Add isClone to InputWindowHandle" into tm-dev am: 96f4a2afc2 am: ed3ec69be3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18030066

Change-Id: Iba68cfbf1350444c0a412e6588a38a474e0fc08e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 18:08:20 +00:00
Chavi Weingarten
96f4a2afc2 Merge "Add isClone to InputWindowHandle" into tm-dev 2022-05-24 16:57:32 +00:00
Tiger Huang
521ba43e12 Only update the compat system UI visibility if the source is valid
If two insets source consumers handle the same public type (like
navigation bar and taskbar both provide Type.navigationBars()), one has
a valid source but the other one doesn't, we should only let the one
with the valid source update the compat system UI visibility.

Bug: 232327949
Test: atest WindowInsetsControllerTests\
      #testSystemUiVisibilityCallbackCausedByInsets
Change-Id: I07b35f488c5af273cafaf4a8a41f0a51365038a0
2022-05-25 00:55:26 +08:00
TYM Tsai
3392d187eb Fix inline tooltip position is wrong
The PopupWindow will show up above the anchor with the real rectangle.
If the anchor is doing an animation, it will get a temporary top of the
anchor because the rectangle is conisince changed by the animation. So
attach tooltip after a while for waiting the animation is done.
And when the tooltip overrides the inline suggestion, clicking the
suggestion won't work. Force the y offset above or below the anchor to
fix the problem.

Bug: 223088398
Test: atest android.autofillservice.cts.inline.InlineTooltipTest
Change-Id: I068efc3d20f4486decd2c9e690ebeb2981fb6722
2022-05-24 21:33:54 +08:00
Shawn Lin
7c604236cc Merge "Replace DisplayManager.getStableDisplaySize with max Display.Mode" into tm-dev am: 15cb562bcd am: 02c07a76ba
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18485561

Change-Id: Ifab44e33ac17ab673954019236b74f1fe4bfa4e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 04:11:22 +00:00
Shawn Lin
0f7cc0128b Replace DisplayManager.getStableDisplaySize with max Display.Mode
The DisplayManager.getStableDisplaySize is not the right way to get the
size we want for screen decorations and display team is going to get rid
of it.

Instead, we use the maximum display size supported by the display as the
base size to define the cutout and rounded corner configs.

Also fixed a bug that DisplayCutoutBaseView didn't update the
shoudDrawCutout config when display change.

Bug: 230227839
Test: 1. On foldable device, fold and unfold the device and check if the
         cutout is correctly drawn.
      2. On device supporting multiple resolutions, switch resolution
         between FHD & QHD and check if the cutout is correctly drawn.
Test: atest LocalDisplayAdapterTest DisplayCutoutTest
           ScreenDecorationsTest RoundedCornersTest
           DisplayCutoutBaseViewTest
Change-Id: I7a602b5abd7d6a21d17eae4f8e99414eaf765fa5
2022-05-21 14:56:30 +00:00
TreeHugger Robot
b3a0c13a88 Merge "Remove preferKeepClearAreaForFocusDelay, turn it into a flag" into tm-dev am: 12a7628e16 am: c3f7c80692
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18184947

Change-Id: I0b1f8272f51f60519011d3a98b1679fe83a3e6ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 16:34:16 +00:00
Robert Horvath
92dd353918 Merge "Fix reporting of unchanged keep clear areas" into tm-dev am: b8b8396a2c am: c50ee695d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18179544

Change-Id: If727b02a714d241cf9691e2c1410f8048e83c348
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 16:33:13 +00:00
Naomi Musgrave
fa30ad6853 Merge "[Media Projection] Require valid token to set session" into tm-dev am: 55ecb4ec82 am: 986c517b77
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18356863

Change-Id: I94a9283d0f1c931a9aceda44dd28fdb63d049c89
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 15:53:40 +00:00
TreeHugger Robot
12a7628e16 Merge "Remove preferKeepClearAreaForFocusDelay, turn it into a flag" into tm-dev 2022-05-20 14:48:45 +00:00
Robert Horvath
b8b8396a2c Merge "Fix reporting of unchanged keep clear areas" into tm-dev 2022-05-20 14:32:14 +00:00
Naomi Musgrave
55ecb4ec82 Merge "[Media Projection] Require valid token to set session" into tm-dev 2022-05-20 13:39:48 +00:00
Tony Huang
20e5039095 Remove the special logic of the divider bar z-ordering
Remove the divider bar z-ordering logic since the divider bar is
attached to a single-top root task for split screen now. Remove
split anchor too because it is for legacy split screen using.
Also removed corresponding tests which are no longer needed after
this patch.

Bug: 199236198
Test: pass existing tests
Change-Id: I3435a3c81de78804c8110eb38bbacd0a23b391ef
2022-05-20 14:58:55 +08:00
Robert Horvath
2a6ce367fe Remove preferKeepClearAreaForFocusDelay, turn it into a flag
TV PiP repositioning in response to keep clear area changes will be
debounced in SystemUI, so the client side delay in setting a keep clear
area with focus becomes obsolete.
Instead the config is turned into a flag for whether focused views
should automatically be marked as keep clear areas.

Bug: 231309309
Test: atest KeepClearRectsTests
Change-Id: I0ac61e671bb75e22a95b400c9bd8d84004379e43
Merged-In: I0ac61e671bb75e22a95b400c9bd8d84004379e43
2022-05-19 19:27:44 +00:00
TreeHugger Robot
f5a4b7fd86 Merge "Defines flag to disable touch feedback on display" into tm-dev am: beddca329f am: 02afba9572
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17607970

Change-Id: I4e7280b4493b9f602e5469125302dbe2dc596978
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 12:50:52 +00:00
TreeHugger Robot
beddca329f Merge "Defines flag to disable touch feedback on display" into tm-dev 2022-05-19 11:51:29 +00:00
TreeHugger Robot
3f618594b3 Merge "Avoid NPE on ScrollCaptureConnection callbacks" into tm-dev am: 6678f5566b am: 864d188295
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18463432

Change-Id: I50b269fabe8f196c8d4c2e378247baeee2bed854
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 08:40:23 +00:00
TreeHugger Robot
6678f5566b Merge "Avoid NPE on ScrollCaptureConnection callbacks" into tm-dev 2022-05-19 06:43:31 +00:00
yuanjiahsu
fc06fc5cb1 Defines flag to disable touch feedback on display
Define FLAG_TOUCH_FEEDBACK_DISABLED to disable touch sound and haptic feedback when creating virtual display.

Bug: 185558698
Test: atest FrameworksCoreTests:ViewRootImplTest, manual testing
Change-Id: Ida67f4027f2636e004218595b3bf088c06194522
2022-05-19 06:01:55 +00:00
Riley Jones
7a8fa9b1f2 Merge "Fix for out-of-bound error regarding NoCopySpan objects" into tm-dev am: 92e59dde2f am: fcd285b64a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18441236

Change-Id: Id21bbba7751a8dcef3c9c0660320ea4daec8d405
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 22:51:30 +00:00
Shan Huang
76bf9ac13c Merge "Transfer IME callbacks when app's focused root view changes." into tm-dev am: f15480984d am: 40f337eabe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18417321

Change-Id: Ic40a07c262f39693bec1aef68dddfbd7f0a5bcff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 21:59:27 +00:00
Mark Renouf
ac9cef964f Avoid NPE on ScrollCaptureConnection callbacks
State is checked at the front half of some calls, but is
dispatched onto the UI thread. If the connection is closed
in this time, the queued call will NPE when the field it
uses is cleared.

This adds a simple null check in two places, and test for both.

Bug: 232375183
Test: atest ScrollCaptureConnectionTest
Change-Id: Ida7fbf0a21c206db8d774dc247b6ab5257dacabe
2022-05-18 19:25:05 +00:00
Riley Jones
484f7b4d64 Fix for out-of-bound error regarding NoCopySpan objects
Bug: 169417148
Change-Id: I2e4a0a3745bb3a53d8f22d4090cdf4d93e19116b
Merged-In: I2e4a0a3745bb3a53d8f22d4090cdf4d93e19116b
2022-05-17 21:37:27 +00:00
Naomi Musgrave
e3f6b7e16a [Media Projection] Require valid token to set session
When MediaProjection sets the session details in
MediaProjectiondManagerService, clear and re-set the
calling identity (since we have entered the system server
across the aidl boundary).

Additionaly, verify that the call originated from a valid
MediaProjection session. In the current model for
MediaProjection, signature-level permission
MANAGE_MEDIA_PROJECTION is held by the component that shows the
acceptance dialog to the user. The user allowing some app to
capture with MediaProjection is represented by
the IMediaProjection token (see MediaProjectionManagerService#
isValidMediaProjection).

Bug: 230748205
Test: Manual
Change-Id: Iace8eb7eea6c7a99fba7ea726481461a11bd1c90
2022-05-17 22:11:33 +01:00
Shan Huang
6a770ceb14 Transfer IME callbacks when app's focused root view changes.
Previously when curRootView changes IMM, the back callbacks are not
moved to the new focused ViewRootImpl. As a result if IME is up during
the focus change, the back callback would fail to unregister when
IME tries to hide itself.

Test: atest InputMethodServiceLifecycleTest
Test: atest CtsInputMethodTestCases:InputMethodServiceTest
Test atest CtsInputMethodTestCases:KeyboardVisibilityControlTest
Bug: 232660571
Bug: 232331013

Change-Id: Id30e51c74afbcce1f22d87af77e8404b4f0ae7d2
2022-05-16 22:51:06 +00:00
Riddle Hsu
28b34045f2 Make sure updateSurface is called for rotation change
The condition to call updateSurface requires relayout request.
And keep the previous requested force-next-relayout to avoid
the value set from performConfigurationChange being replaced,
or before performing traversal, there is another resize event
that erases the pending relayout request.

Bug: 231282871
Test: Set allow home rotation.
      No flickering when rotating 180 degree.
Change-Id: I0fd6701ebe0c17e0e319b1360d48132e0c256358
2022-05-16 17:04:11 +00:00
Nick Chameyev
343260adfa Merge "Synchronize display change with the Shell" into tm-qpr-dev 2022-05-12 16:55:06 +00:00
Chavi Weingarten
4c6707b9da Merge "Lock in Surface#destroy" into tm-dev am: 1559113427 am: a8b7ca659a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18283681

Change-Id: I9dba571b7f37842edb0f719829f3c99968883fd8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 21:26:59 +00:00
Nader Jawad
1f5355a4c8 Merge "Fix memory leak with RenderNodeAnimator" into tm-dev am: b9a8ed8b70 am: b27c97ac73
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18290468

Change-Id: Ica7c4813ed4722ef490f26026155194ce965ab2a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 21:15:02 +00:00
Galia Peycheva
dfa55958fe Merge "Fix return value in View#getUnrestrictedPreferKeepClearRects" into tm-dev am: 32667b28c6 am: 0a574afe01
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18247863

Change-Id: I3dfb211ee14cc02561a65f85b368d94369007e63
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:47:29 +00:00
Chavi Weingarten
1559113427 Merge "Lock in Surface#destroy" into tm-dev 2022-05-11 20:06:51 +00:00
Nader Jawad
b9a8ed8b70 Merge "Fix memory leak with RenderNodeAnimator" into tm-dev 2022-05-11 16:49:16 +00:00
Galia Peycheva
32667b28c6 Merge "Fix return value in View#getUnrestrictedPreferKeepClearRects" into tm-dev 2022-05-11 07:42:19 +00:00
Nader Jawad
528b0d2824 Fix memory leak with RenderNodeAnimator
Update View logic to cancel all RenderNodeAnimators
when it is detached from a window.
Updated HWUI Animation logic to enable a cancellation
flag to cancel all animators operating on a RenderNode
whenever the staging parameters are pushed to RenderThread

Fixes: 229136453
Test: Added core test to RenderNodeAnimatorTests
Change-Id: Id674e8474757bfc8dfe30394dde29da49d139bfc
2022-05-10 14:02:40 -07:00
chaviw
40e361cb78 Lock in Surface#destroy
Previously, destroy just directly called release, which was already
locked. Now, destroy invokes some functions in native. This means if
another thread is calling release during the destroy call, it could
cause crashes.

Test: Hard to repro bug
Bug: 223412469
Change-Id: Ie6415f505bbc86505e3fe3ea2a0bea96a3e78ad3
2022-05-10 12:40:58 -05:00
Robert Horvath
e18af6e995 Fix reporting of unchanged keep clear areas
ViewRootRectTracker#computeChangedRects returns all tracked Rects if
there are changes to the Rects since the last call to that method, or
null if there aren't.
When ViewRootImpl checked for changed Rects, if only one of either set
of restricted or unrestricted keep clear rects changed,
then #computeChangedRects returned null for the other, which was
subsequently reported as an empty list. If there were keep clear rects
previously reported, this would mistakenly clear them.

This change separates the check for changes and retrieving the list of
latest Rects. If either set of Rects has changed, now it's always the
latest Rects that get reported.

Bug: 231532058
Test: Manual with app with restricted & unrestricted keep clear areas
Test: atest KeepClearRectsTests
Change-Id: Ida51420d0f0e7935a5dc9f3eab902857927c33f5
2022-05-10 16:13:45 +02:00