Commit Graph

18619 Commits

Author SHA1 Message Date
Treehugger Robot
c695becb54 Merge "Improve docs for generated properties in PropertyMapper" am: 46a915f625 am: ef33f36050 am: 58b0f9d6b5 am: 1253941b56
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2165102

Change-Id: I6960e918ce061dc2984bbfdc76511c44614a47c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 18:46:21 +00:00
Treehugger Robot
ef33f36050 Merge "Improve docs for generated properties in PropertyMapper" am: 46a915f625
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2165102

Change-Id: Ie0900ec085aa552075dc2f147125e0035d02b098
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 17:39:32 +00:00
Ember Rose
64a82e5c30 Improve docs for generated properties in PropertyMapper
Change-Id: I1e927013d14731d3be5024bc581ebd664f878eb9
Test: N/A
Bug: 237226979
2022-07-25 21:34:03 +00:00
Tiger Huang
00cb7e70d7 Merge "Enable privileged apps to set unrestricted gesture exclusion" into tm-qpr-dev am: a1be3b43bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19354712

Change-Id: I14feca9b2005849f612f92e89ee8633d04b8c829
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-22 03:48:59 +00:00
Gaurav Bhola
759f654444 Merge "Add a new Insets type for overlapping windows." into tm-qpr-dev am: 928c9c0eec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19151077

Change-Id: I95c08e2947517cdc913925a67bc6fd3fac62ef01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-22 03:47:50 +00:00
Tiger Huang
a1be3b43bb Merge "Enable privileged apps to set unrestricted gesture exclusion" into tm-qpr-dev 2022-07-22 03:31:41 +00:00
Gaurav Bhola
928c9c0eec Merge "Add a new Insets type for overlapping windows." into tm-qpr-dev 2022-07-22 03:31:21 +00:00
Arthur Hung
6ce8c4a98c Merge "Ignore back invoke when window focus has lost" into tm-qpr-dev am: 1476873423
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19291068

Change-Id: I30d3f47a89bae0fb6aa768fa00d2cd8b9c3c0f28
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 05:11:42 +00:00
Arthur Hung
1476873423 Merge "Ignore back invoke when window focus has lost" into tm-qpr-dev 2022-07-21 04:49:44 +00:00
Ming-Shin Lu
c26ace2dac Merge "Remove hideCurrentInputMethod from RecentsAnimationController" into tm-qpr-dev am: b78add71fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19346888

Change-Id: I8d6befcef573aea98e7086cb357ebfdd487be3e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-20 16:35:12 +00:00
Tiger Huang
e80e47f866 Enable privileged apps to set unrestricted gesture exclusion
System UI won't need to check if the gesture blocking activity is
running or not every time a task changes.

Bug: 229048429
Test: atest DisplayContentTests PermissionPolicyTest
Change-Id: I5a72121c8b20b172ea5c1d060960ce14a7420aa9
2022-07-20 16:33:49 +08:00
Arthur Hung
0099ca8fab Ignore back invoke when window focus has lost
The back invoke target could lost focus during back navigation.
To prevent the non-focused window could still trigger back action cause
some unexpected behavior, this CL will listen focus changed and skip the
back invoke call.

Test: launch a trampoline activity and trigger back before next activity
shown.
Test: atest WindowOnBackInvokedDispatcherTest
Bug: 238050065

Change-Id: Ifd345b2283c5d07628e2884db6e4e13f3ec31e83
2022-07-20 04:26:45 +00:00
Ming-Shin Lu
7a593c23ae Remove hideCurrentInputMethod from RecentsAnimationController
Since CL[1] migrate hide IME logic when quick switching split-screen
task to InputMonitor.

As a result, remove unused API since it would be no longer to
expose hideCurrentInputMethod for launcher to handle gesture.

[1]: Ibfcd48e623336c4690b71c4db0ce1ad8f5b26fc9

Bug: 166736352
Bug: 193990612

Test: manual test as steps
1) launch any apps with focusing an editor
2) from overview, select any app to enter split-screen mode
3) taping the editor to show the keyboard
4) swipe up to overview or quick switch app tasks
5) expect the keyboard will be hidden when starting the gesture.

Change-Id: I299c3ac8531fa28c68c997e44fb168819e85d465
2022-07-20 00:15:53 +00:00
Caren Chang
8bd8e3ee20 Merge "Add explanation about the purpose of accessibility heading and use case apps should consider." am: 407d531735 am: afc1b7d01e am: 08ae6de00f am: 389bce3764
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2151635

Change-Id: Ife6f292b0350a51409ed45d075a379890ada7b8b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 23:29:33 +00:00
Caren Chang
afc1b7d01e Merge "Add explanation about the purpose of accessibility heading and use case apps should consider." am: 407d531735
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2151635

Change-Id: If08ab9af3186e37a8e59863ac701d3679e18bd36
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 22:29:08 +00:00
Alex Stetson
bbe98fef6a Merge "Update topFocusedWindowChanged API" into tm-qpr-dev am: eb04bd2461
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19240597

Change-Id: I784ce823efcb530e66f87ab547a0c550fac1fd81
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 21:20:34 +00:00
Alex Stetson
eb04bd2461 Merge "Update topFocusedWindowChanged API" into tm-qpr-dev 2022-07-19 21:01:49 +00:00
Caren Chang
02bbf4b30c Add explanation about the purpose of accessibility heading and use case apps should consider.
Change-Id: I01bdd1fc89d54e62e9ce1f8dc15a58d13c56fabc
Test: N/A, documentation chang
2022-07-18 21:19:44 +00:00
Gaurav Bhola
84fd8a6331 Add a new Insets type for overlapping windows.
- This type will be used in the cases where the app's UI overlaps with some system window or some other WindowContainer hosted by the system.
- Remove the LOCAL_NAVIGATION_BAR 1 & 2 as those are not required and GENERIC_SYSTEM_WINDOW can be used instead of those.

Bug: 232017511
Test: atest WindowContainerTests
Test: atest WindowOrganizerTests
Change-Id: I9d79f39a2a17cb5db4e56439399152a65621c41f
2022-07-18 11:35:16 -07:00
TreeHugger Robot
c11bab5bbe Merge "Remove view based on known index of the view on exception" into tm-qpr-dev am: 31f6e65c85
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19299681

Change-Id: I748dcc4a81da53fc5948215d386f498f344958fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-18 18:02:22 +00:00
TreeHugger Robot
31f6e65c85 Merge "Remove view based on known index of the view on exception" into tm-qpr-dev 2022-07-18 17:53:04 +00:00
Sam Dubey
65851bb227 Merge "Revert "Reland "Make extra navigation bar count towards non decor frame"""" into tm-qpr-dev am: 661d05308a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19300566

Change-Id: Icdf3d72e80ff4640b047284d89bdf4225a69c3bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-18 06:20:51 +00:00
Beverly
b1525b85e1 Remove view based on known index of the view on exception
There's no need to findViewLocked - if the view
didn't already exist, then the view is added
to the end of the mViews list. findViewLocked
will need to iterate over all the views which
is unnecessary.

Test: manual
Fixes: 238954722
Change-Id: I3a22f59df84f512d4e914f0e3566927450284298
2022-07-15 16:53:42 +00:00
Sam Dubey
bc0d5539e6 Revert "Reland "Make extra navigation bar count towards non decor frame"""
This reverts commit 620e91578c.

Reason for revert: b/238985243

Change-Id: I1fc82c61b445b6f5ceedb2ec8b727e8e745f47c9
2022-07-15 12:22:44 +00:00
Yunfan Chen
2d3df2917e Merge "Reland "Make extra navigation bar count towards non decor frame""" into tm-qpr-dev am: 367ff5a1d8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18425968

Change-Id: I1db57d7f006915126eabbe8afb01f8fb5c2ffa0b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 03:23:05 +00:00
Yunfan Chen
620e91578c Reland "Make extra navigation bar count towards non decor frame""
This reverts commit 8626ad35b1.

Reason for revert: Trying to reland

The previous patch may delay a configuration update caused by the task
bar change, and dispatch the update when something irrelevant happens
such as dragging an icon to the workspace. Changed logic in WMS and
WindowState to ensure a configuration update in that case.

Test: TaplTestsQuickstep#testAllAppsFromHome (With task bar)
Test: CtsWindowManagerDeviceTestCases (With task bar)
Test: android.view.cts.ViewTest
Bug: 224404595
Bug: 205496695
Bug: 228380863
Change-Id: Ib192d4ad012fed136f808b15a84f8d83ca426b21
2022-07-13 08:33:56 +00:00
Yunfan Chen
57ad712787 Merge "Introduce InsetsSizeOverride" into tm-qpr-dev am: dd1b8480de
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19095354

Change-Id: I8784d9ebb838c7a906fb61119223a92e669f090f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-13 03:14:29 +00:00
Yunfan Chen
dd1b8480de Merge "Introduce InsetsSizeOverride" into tm-qpr-dev 2022-07-13 02:45:57 +00:00
TreeHugger Robot
4ab2bc56dd Merge "Make sure to cleanup views that couldn't be added" into tm-qpr-dev am: c01cce0313
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19138536

Change-Id: I7d52c9d73afd051076c6f4516272f7464fa88352
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-12 21:29:21 +00:00
TreeHugger Robot
c01cce0313 Merge "Make sure to cleanup views that couldn't be added" into tm-qpr-dev 2022-07-12 20:42:06 +00:00
Xin Li
14164fb11a DO NOT MERGE - Merge TP1A.220624.013
Merged-In: I2f3d04546af58edbe7bae2b7d856ab3d87365fdf
Change-Id: Iaf981a42ffa918ec7dc0b86e533c5c8371872271
2022-07-11 21:47:41 -07:00
Alex Stetson
02cb8c6fd0 Update topFocusedWindowChanged API
For certain situations it's useful to know the exact activity that's
being hosted in the focused window when it changes, not just the package
name.

Bug: 237317934
Test: manual
Change-Id: I21ef229e9b29110957d9176357851720edc1f117
2022-07-11 16:36:33 +00:00
Alex Stetson
82b58cf3a3 Merge "Scale light z value relative to screen size" into tm-qpr-dev am: ed5f49d918
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19197402

Change-Id: I4e34c9333dfe15cf38a3ead28a60d82d17006fb5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 18:01:36 +00:00
Alex Stetson
ed5f49d918 Merge "Scale light z value relative to screen size" into tm-qpr-dev 2022-07-07 17:42:00 +00:00
TreeHugger Robot
121abb9c75 Merge "Fix leak of RemoteAccessibilityController through SurfacePackage." into tm-qpr-dev am: b2ba1a1b28
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19154172

Change-Id: Ie61e1294f95c9dbb07b367b3b00d198f252f0b7e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 11:06:35 +00:00
TreeHugger Robot
b2ba1a1b28 Merge "Fix leak of RemoteAccessibilityController through SurfacePackage." into tm-qpr-dev 2022-07-07 10:47:18 +00:00
Tiger Huang
3f5a711d0a Merge "Refine excludeInvisibleImeFrames" into tm-qpr-dev am: 973d686da7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19149188

Change-Id: I6e0dfcff1fbe9d12278d43a6d52803e14d2cb67d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-07 09:35:54 +00:00
Tiger Huang
973d686da7 Merge "Refine excludeInvisibleImeFrames" into tm-qpr-dev 2022-07-07 09:31:05 +00:00
Mark Renouf
1c479ea1eb Merge "Fix crash due to race on close()" into tm-qpr-dev am: faf0b610d3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19194567

Change-Id: Ifa6a92cb60683f42afb541a977d255adacf029f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 20:34:56 +00:00
Mark Renouf
faf0b610d3 Merge "Fix crash due to race on close()" into tm-qpr-dev 2022-07-06 20:10:15 +00:00
Alejandro Nijamkin
f167b6fec9 Merge "Adds ViewTreeObserver window visibility listeners" into tm-qpr-dev am: ef6b610b10
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19122497

Change-Id: I57e3230f16494253c6145814e2352eacf1fd7767
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 19:50:01 +00:00
Alejandro Nijamkin
ef6b610b10 Merge "Adds ViewTreeObserver window visibility listeners" into tm-qpr-dev 2022-07-06 19:31:20 +00:00
Alex Stetson
670bce215d Scale light z value relative to screen size
On larger screens, having the light z value lower down creates an
undesirable amount of shadow since the source to view angle can be quite
large. By scaling the z position of the source relative to the screen
size, we can avoid these extreme shadows.

Bug: 227425789
Test: run cts -t android.uirendering.cts.testclasses.ShadowTests --module CtsUiRenderingTestCases
Change-Id: I8b7a3fcf93daaa565256a08f38deffed74b24ad4
2022-07-06 18:59:45 +00:00
Mark Renouf
a433556fc0 Fix crash due to race on close()
It's possible for close to be called during local cleanup concurrently
with the remote call.

A recent change (ag/15993920) added a missing Binder.unlinkToDeath
call to close(). This now causes a crash now if the registration
was removed at just the right time in another thread. This synchronizes
access to close() to avoid this.

Bug: 237406501
Test: atest ScrollCaptureConnectionTest
Change-Id: I0126bfac1efdece2e4eff144a44f29a963553b74
2022-07-06 13:09:59 +00:00
Yunfan Chen
14f94246f6 Introduce InsetsSizeOverride
This is to let the insets provider provide a different size to the given
windowing typed window. This can completely replace the ime frame
provider and the old ime frame provider is migrated.

Test: The task bar can still provide correct IME insets
Test: DisplayPolicyInsetsTests
Test: WmTests
Bug: 225200928
Change-Id: I5f8c4462cdc48011efda908e0337a86cbf2a417f
2022-07-06 16:41:38 +09:00
Yunfan Chen
ac87a97077 Merge "Make sure to extend insets frame when the bar layout with cutout" into tm-qpr-dev am: 0251a89274
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18910309

Change-Id: I40f61529acaab2d4bce8990a694ee7a54909b19d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-06 04:40:04 +00:00
Yunfan Chen
0251a89274 Merge "Make sure to extend insets frame when the bar layout with cutout" into tm-qpr-dev 2022-07-06 04:19:58 +00:00
Alejandro Nijamkin
a567fea83e Adds ViewTreeObserver window visibility listeners
Follows the same exact pattern as the window attach and window focus
listeners in the same class.

Bug: 235403546
Test: Verified as part of follow-up systemui CLs
Change-Id: I7c825baf5913e6e0b85f475503639a4d17483d4e
2022-07-04 14:22:34 -07:00
Tiger Huang
f9705dd8b1 Refine excludeInvisibleImeFrames
When adding a window to WMS, its z-order may be higher than IME
initially. And then, WMS will move IME to the top of the new window.
Although IME is invisible during launching an app, that causes a change
in WindowState#mAboveInsetsState. And it would trigger a redundant
onApplyWindowInsets at the client side.

This CL treats null IME source as invisible IME source in
InsetsState#equals when excludeInvisibleImeFrames is true.

Bug: 237749017
Test: Add logs in dispatchApplyWindowInsets, and see if it gets printed
      twice while launching an app.
Change-Id: I5eba7732619f7ceebe3152e81037a43e9ab3d91f
2022-07-04 17:27:59 +08:00
Ahaan Ugale
b5a17e8e5c Fix leak of RemoteAccessibilityController through SurfacePackage.
When a child SurfacePackage is set on a SurfaceView, the view's
RemoteAccessibilityController calls linkToDeath on the SurfacePackage's
IAccessibilityEmbeddedConnection. The death recipient -- the controller
itself -- is unlinked when the Surface is destroyed -- being notified
through a SurfaceChangedCallback registered on the ViewRootImpl.

There are 2 issues there:
* When the SurfaceView is detached, the SurfaceChangedCallback is
  unregistered, so the unlinkToDeath never happens.
* The Surface holding the SurfaceView may never be destroyed, for
  example in the case of the IME.

SurfacePackages sent over ipc seem to be used in only 2 places
currently:
* For inlined autofill suggestions in the input method. This bug causes
  a serious leak here, since the memory is held in 2 persistent
  processes -- autofill Session data in the system server (referenced
  from the SurfaceViews), and SurfaceViews in the IME.
* The Wallpaper app.

For now, this is fixed by using a WeakRef for the
RemoteAccessibilityController. The root cause will be fixed in a
followup change in a later release.

Fix: 183402294
Test: manual:
 * atest CtsAutoFillServiceTestCases:InlineLoginActivityTest\
   --iterations 5
 * Force gc: adb shell kill -10 $(adb shell pgrep ext.services mockime\
   system_server -d '\ ')
 * Rerun that a couple of times so the binder objects get cleared.
 * Check for leaks of autofill.Session in system_server and
   SurfaceViews or RemoteAccessibilityEmbeddedConnection in
   com.android.cts.mockime.
Change-Id: I5447b173313919507969872bdeb7ff3038152c23
2022-07-02 04:25:11 +00:00