Commit Graph

7132 Commits

Author SHA1 Message Date
Tony Huang
3b3c628f63 Merge "[DO NOT MERGE] Fix founction not found on tm cts tests" into tm-qpr-dev 2022-06-08 07:48:59 +00:00
Chet Haase
7e79d7c171 Allow system to disable behavior of pausing animators for bg apps am: 161732cf18 am: 339361ad29
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18527682

Change-Id: Ib075c2aeea02f640a0487aa6ee61974186e50270
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 20:28:11 +00:00
Chet Haase
f6541ab73e Pause animators when app is not visible am: b99cc5b4c8 am: f2e66fa4ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18528824

Change-Id: I4a220654954199c26f29a93d8afc3ad8a448547e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 20:28:07 +00:00
Tony Huang
15578338b5 [DO NOT MERGE] Fix founction not found on tm cts tests
We refactor setAdjacentRoots function on tm-qpr but cts suite is
still using tm branch and it lead to it cannot found previous
function. Add a temp function params same as old one on tm-qpr only
for pass tests.

Fix: 235169332
Test: atest MultiWindowTests on tm-dev codebase
Change-Id: I3eaea698089cec78ef7fcef17817317c55a7bfe6
2022-06-07 16:03:37 +08: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
Chet Haase
161732cf18 Allow system to disable behavior of pausing animators for bg apps
This change adds a static method which can be called to disable the
default behavior of pausing infinite animators when an app's windows
are all in the background. This could potentially be used for
global behavior of a system property to disable this behavior system
wide.

Bug: 232937493
Bug: 233391022
Test: Added new cts test to AnimatorLeakTest to verify behavior
Change-Id: Idf4957e3968253228096671fde89f820311883e3
Merged-In: Idf4957e3968253228096671fde89f820311883e3
2022-05-23 20:31:19 +00:00
Chet Haase
b99cc5b4c8 Pause animators when app is not visible
Because animators are not tied to the lifecycle of any UI
elements, it is possible for an app to go into the background
and for the animators to continue running. Ideally, the app would
track the lifecycle of the activity/etc and pause or disable the
animators, but it is common for this to not happen, causing the
animators to continue spinning when the app does not need them.
The animators are not causing as much work as for a foreground
activity (since they do not cause any re-rendering), but they cause
work nonetheless by keeping Choreographer awake to continue pulsing
frames.

The ideal fix would be to introduce new API for animators that
tied them to lifecycle concepts (View, Activity, etc). But that kind
of fix would only be available for future versions of the platform,
and does not address existing app code. A workaround for the current
situation is to address the most egregious problems; infinite animators
running on backgrounded apps.

The fix here is exactly that: when an app's visible surface (either an
activity or, for Wallpapers, a WallpaperService) is backgrounded,
a request is sent to pause animators for that surface. When that surface
comes to the foreground, a request is sent to resume those animators.
Since all animators are handled on the same thread for the same process,
in AnimationHandler, we should only ever pause animators when *all*
surfaces for a process are not visible (and resume them when *any*
surface becomes visible). Also, to mitigate any issues with thrashing
animator state for apps which become only transiently backgrounded,
we delay pausing for some time.

Bug: 228598053
Bug: 233391022
Test: new AnimatorLeak CTS test, plus manual testing for activities
    and wallpapers

Change-Id: I8b9f841cc80babb972244c724968a5c085a06b69
Merged-In: I8b9f841cc80babb972244c724968a5c085a06b69
2022-05-23 20:31:19 +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
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
Julia Reynolds
cb38803c23 Merge "Fix blockable system notifications" into tm-dev am: ddfeaa18f7 am: 0c63a032f3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18292722

Change-Id: I444b147a291bb8cf9db30f3ecb20fa00d8e7535e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 12:50:06 +00:00
Julia Reynolds
756a475be5 Fix blockable system notifications
Notifications can be non-blockable if their app has the
permission fixed or if the app holds certain roles.

Calculate that on device boot and role change, and use the same
source of truth for all UIs. As a bonus, we can remove some
systemui binder calls.

Test: SystemUiTests & FrameworkUiServicesTests
TesT: verify that 'usb debugging connected' notifs are non blockable
but magnification ones are, in systemui and settings
Fixes: 231662091

Change-Id: I980718ab61196901d976f9ea8ee035eafc021fc8
2022-05-11 21:37:44 +00:00
Tony Huang
c3565a503d Merge "Clean up the legacy split screen (9/n)" into tm-qpr-dev 2022-05-10 04:03:06 +00:00
Julia Reynolds
729eee42e5 Merge "Remove notification permission feature flag" into tm-dev am: af7982277b am: 1c7aab6735
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18164160

Change-Id: Ie439e1d17ace323879e1c7fa2ceeb0be866954ed
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 21:21:09 +00:00
Julia Reynolds
af7982277b Merge "Remove notification permission feature flag" into tm-dev 2022-05-09 20:16:09 +00:00
Tony Huang
103f4a9673 Clean up the legacy split screen (9/n)
This should be final clean patch, remove legacy split screen
package and its windowing modes

Bug: 199236198
Test: build pass
Test: pass existing tests
Ignore-AOSP-First: remove whole package
Change-Id: Ib2af42834938032bf525b8c16b1046b4c898b8d5
2022-05-09 13:59:13 +08:00
Shan Huang
78c429f948 Merge "Migrate IME to handle back with OnBackInvokedDispatcher." into tm-dev am: e3a61826eb am: 4472170cb9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17952046

Change-Id: Icf52d1afb13bdab55270c3e6319b4d889d114db0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 20:19:10 +00:00
Shan Huang
e3a61826eb Merge "Migrate IME to handle back with OnBackInvokedDispatcher." into tm-dev 2022-05-06 19:35:42 +00:00
Julia Reynolds
0be19ec3c5 Remove notification permission feature flag
And the related obsolete code.

Test: SystemUITests, framework services tests, NotificationManagerTest
Fixes: 231344755
Change-Id: Id14941f82305b0216f2a12221d4195f8afcc65ab
2022-05-04 17:59:02 -04:00
Adam Bookatz
7a5725bfe6 Merge "Ensure getUserName cannot return null" into tm-dev am: 1503b56202 am: 10b45a2107
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18126297

Change-Id: Ib4bc41d74d8f486e79e43e7b332c93a2051c562b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-04 17:58:46 +00:00
Shan Huang
a6666f2221 Migrate IME to handle back with OnBackInvokedDispatcher.
We currently close the IME by having the target application forward KEYCODE_BACK to the IME process through InputMethodManager#dispatchInputEvent and having the IME handle the keycode in InputMethodService#onKeyDown. When apps opt in to OnBackInvokedDispatcher API, we will not dispatch KEYCODE_BACK to apps anymore. Thus we need to migrate IME to the new API for it to close on back invocation.

This implementation forwards OnBackInvokedCallbacks from the IME process
to the app process. This is necessary because all callbacks need to
exist in the app process for them to be considered by hardware back keys. While back gestures go through WM to resolve callbacks from the focused window, hw keys are directly sent to the focused window's ViewRootImpl, bypassing server side back nav logic.

Bug: 228358882
Test: atest CtsInputMethodTestCases:KeyboardVisibilityControlTest
Test: atest CtsInputMethodTestCases:InputMethodServiceTest
Test: atest CtsInputMethodTestCases
Change-Id: Ie207b63b11a56c9b2173f26b734a27b13ebccc60
2022-05-04 05:31:08 +00:00
Sudheer Shanka
c767408a54 Merge "Verify INTERACT_ACROSS_USERS_FULL perm for cross-user calls." into tm-dev am: 5047c1abb4 am: 73b8912e2d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17947145

Change-Id: I4742c422bc9305d0dc24039b84ce18b60dcf177a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-02 22:48:58 +00:00
Adam Bookatz
cd2466ee30 Ensure getUserName cannot return null
A user can be created with an explicitly null name, as happens in tests.
But getUserName claims to never return null. So we must do a null-check
here to prevent it.

Bug: 227624966
Test: atest UserManagerTest
Change-Id: Iea0e7b6292c6dd49df1bebc5467091a82ddaedb5
2022-05-02 20:18:54 +00:00
Sudheer Shanka
5047c1abb4 Merge "Verify INTERACT_ACROSS_USERS_FULL perm for cross-user calls." into tm-dev 2022-04-30 01:07:51 +00:00
Yurii Zubrytskyi
8ea36089c6 Merge "frameworks/base - Tiramisu is now 33 #4" into tm-dev am: 029b86ef00 am: 6b3b2ebcce
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17778829

Change-Id: I7e0c35149c6cf8d26cee0ff91f75fd377a30f4b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 19:09:10 +00:00
Yurii Zubrytskyi
5b3038ea7e frameworks/base - Tiramisu is now 33 #4
update the lint baselines for the new SDK

Bug: 225745567
Test: Build
Change-Id: Ifcc86b065ce770561a391a84d8bb81c2b72307cd
Merged-In: Ifcc86b065ce770561a391a84d8bb81c2b72307cd
2022-04-27 16:37:19 +00:00
Sudheer Shanka
85a9add6bd Verify INTERACT_ACROSS_USERS_FULL perm for cross-user calls.
Bug: 218338453
Bug: 217935264
Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Change-Id: I3ef13204834e04228280a73e8a095720d5e854a3
2022-04-26 17:19:52 -07:00
Charles Chen
a4c2e9162b Merge "Promote isFloating to TestApi" into tm-dev am: 6ed3a87798 am: 98ff6c839b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17887364

Change-Id: Ic5e30c76c23e88986473559b7d2ca496afee9f93
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-26 07:27:16 +00:00
Charles Chen
6ed3a87798 Merge "Promote isFloating to TestApi" into tm-dev 2022-04-26 06:20:14 +00:00
Issei Suzuki
3a0ce75489 Merge "Add timestamp to ActivityOptions.OnAnimation*Listener" into tm-dev am: 408b90ffad am: 69ca04c6e1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17860344

Change-Id: I2eee80f5c11f997b8071ac62bcb1afa939365251
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-23 05:10:02 +00:00
Issei Suzuki
8fbc23c5c9 Add timestamp to ActivityOptions.OnAnimation*Listener
Bug: 229948029
Test: atest ActivityTransitionTests
Change-Id: I1e6d21c8b603f4e81bde6c649868baad625c2b38
2022-04-22 21:47:24 +02:00
Charles Chen
6010845a4a Promote isFloating to TestApi
fixes: 229824513
Test: presubmit
Change-Id: I0023ee49bb4bcc4a49563a26107484915dc7713b
2022-04-21 17:17:17 +08:00
Lucas Silva
b075a1d669 Merge "Cleanup dream preview complication." into tm-dev am: b6918681db am: 7a2fba6d8d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17731951

Change-Id: I327d1f2fd7955ad41fcbfc8995ea81338e44b306
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 16:48:56 +00:00
Lucas Silva
b6918681db Merge "Cleanup dream preview complication." into tm-dev 2022-04-20 16:17:50 +00:00
TreeHugger Robot
4c97129863 Merge "Correct Typo on Provision Refactor per API review" into tm-dev am: 82e82e1479 am: 3966b41c4c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17826202

Change-Id: I26ea5e3d5719e9e32ecbcb1af42fb6523b275064
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 12:15:04 +00:00
TreeHugger Robot
82e82e1479 Merge "Correct Typo on Provision Refactor per API review" into tm-dev 2022-04-20 07:38:36 +00:00
Tony Huang
b25b57b61c Merge "Remove some functions @hide in WindowContainerTransaction" into tm-dev am: 34e18413a8 am: 1790387c8d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17741151

Change-Id: I646827cfc2cb405236f0a967a198a435f9703497
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 04:07:40 +00:00
Tony Huang
34e18413a8 Merge "Remove some functions @hide in WindowContainerTransaction" into tm-dev 2022-04-20 03:35:17 +00:00
Hakjun Choi
e026d4c179 Correct Typo on Provision Refactor per API review
1) FeatureProvisioningCallback become abstract, which has empty impelemtation to override
2) Remove unnccessary {} from @hide
3) fix wrong comment for KEY_CARRIER_VOLTE_PROVISIONED_BOOL
4) move public interface RcsImsCapabilityFlag and it's component constants from RcsFeature to public class ImsRcsManager, and restore RcsFeature as SystemApi class
  set as @deprecated for RcsImsCapabilityFlag in RcsUceAdapter, which has duplicate in ImsRcsManager.

Bug: b/219985687
Test: CTS/ImsServiceTest, UnitTest/ImsProvisioningControllerTest

Change-Id: Iea386922f0377e01582fdb6547d60126d0bf1e8d
Merged-In: Iea386922f0377e01582fdb6547d60126d0bf1e8d
2022-04-20 02:33:05 +00:00
Kedar Chitnis
c60e7c4119 Guest mode updates to resolve privacy concerns in guest mode
- Add API in IUserManager to allow setting ephemeral user flag
- Implement and export this API in UserManagerService and UserManager
- Set guest as ephermal by default when createGuest in UserManager is called
- Handle guest user switching in UserSwitcherController for the case
  of dynamic change of ephemeral state
- Add persistant notification when in guest mode to indicate
  - if guest session is new or previously used.
  - if guest session will be cleared on exit or not
- Add buttons in persistant notification to reset or exit guest
- Add flags to enable/disable this feature

Bug: 214031645
Screenshots: go/ephemeral-guest-b-214031645-ux
Test: Manual test using sunfish, atest SystemUITests, atest SettingsRoboTests

Relands ag/16545010 after resolving post submit issues

Revert "Revert "Guest mode updates to resolve privacy concerns in guest mode""
This reverts commit dd5c440802.

Change-Id: I46b8ab527bab8fe665114ed0fffbb06a59d49a77
Merged-In: I46b8ab527bab8fe665114ed0fffbb06a59d49a77
2022-04-14 09:47:35 +00:00
Yurii Zubrytskyi
ec8a93368c Merge changes from topic "Tiramisu-SDK-Finalization" into tm-dev
* changes:
  frameworks/base - Tiramisu is now 33 #3 - resources
  frameworks/base - Tiramisu is now 33 #2
2022-04-14 06:21:09 +00:00
Lucas Silva
0b0ff3ddd9 Cleanup dream preview complication.
Fixed: 229089441
Bug: 226986434
Test: locally on device
Change-Id: I5f42fff23826505ca18f7b365371b433e32d2d20
2022-04-13 14:45:32 +00:00
Tony Huang
29f1e898dc Remove some functions @hide in WindowContainerTransaction
To using these function in CTS tests, we need to remove @hide.

Bug: 229024233
Test: build pass
Change-Id: I7102918593ef8886888604492e39c1f952408ec7
2022-04-13 17:30:00 +08:00
Sudheer Shanka
8338395749 Merge "Fix the @RequiresPermission annotation." into tm-dev 2022-04-12 23:11:37 +00:00
Yurii Zubrytskyi
637acc5b42 frameworks/base - Tiramisu is now 33 #3 - resources
Resources finalization

RESOURCES_FINALIZATION=Finalize for T
Test: build and boot
Bug: 225745567

Change-Id: I22c8fa54a466f52334746a0d28fd00bec3922a82
2022-04-12 12:35:04 -07:00
Yurii Zubrytskyi
f453228161 frameworks/base - Tiramisu is now 33 #2
Set current API level

Test: Build and boot
Bug: 225745567
Change-Id: If135d9795e812cc286c720b9351eaf6be621fd5b
2022-04-12 12:35:04 -07:00
Sudheer Shanka
86ef571dab Fix the @RequiresPermission annotation.
We initially were using PACKAGE_USAGE_STATS permission to guard
the API BroadcastOptions.recordResponseEventWhileInBackground()
but changed it's implementation to use the new
ACCESS_BROADCAST_RESPONSE_STATS permission later but didn't update
the annotation to specify the new permission.

Bug: 228894230
Test: treehugger
Change-Id: I5142e2d2f754e8014c0c291d56b5ec2254449e77
2022-04-12 15:34:16 +00:00
Yurii Zubrytskyi
bb014567f5 frameworks/base - Tiramisu is now 33
Removed deprecated at birth APIs

Test: build and boot
Bug: 225745567
Change-Id: I8a40f4a08e521a7c9632d7652ff1f51fb137b34d
2022-04-12 08:25:15 -07:00
Michael Wright
38dc7aa55c DO NOT MERGE Remove PWLE APIs from T
Fixes: 228529016
Test: build
Change-Id: Icfd576f3dff0850f464be32c5a3315e723c3d380
2022-04-07 23:26:18 +00:00
Shan Huang
bf8817d3f0 Merge "Remove OnBackInvokedDispatcherOwner interface." into tm-dev 2022-04-02 01:29:52 +00:00