Commit Graph

3270 Commits

Author SHA1 Message Date
Jerry Chang
99702662ed Move adjacent tasks forward together to ensure occluding state
In multi-window split, if one of the adjacent task are moved to front,
we need to move another one forward to ensure all the other tasks will
be occluded by these adjacent tasks as expectedly. Add a flag to
distinguish whether to move the adjacent tasks together when setting
adjacent tasks.

Fix: 204130085
Test: atest TaskTests
Test: atest WMShellUnitTests
Change-Id: I34ccd2633b23425a978bd3df4acc50f17323de21
2021-12-02 11:25:22 +08:00
Chris Li
d45dba76ac Remove TaskFragmentAppearedInfo
We don't really have any use case to manipulate TaskFragment leash, and
removing it can reduce chance for related security issue.

Fix: 207061678
Test: pass existing
Change-Id: I24617228991f030335ba74ce7c2ee48b9c33b9d6
2021-11-19 12:42:37 +08:00
Felipe Leme
1f37c4f7c7 Fixed permisssions on setStopBackgroundUsersOnSwitch().
It was requiring INTERACT_ACROSS_USERS_FULL (instead of
INTERACT_ACROSS_USERS), which cannot be granted by Shell
(and hence cannot be used by CtsVerifier).

Test: m update-api
Test: manual verification
Bug: 203752848

Change-Id: Ie84311e6500cefa055548e309ee6d629c62fb10d
2021-11-11 17:42:24 -08:00
Tom Natan
bf925d3b2f Merge "Introduce an OVERRIDE_MIN_ASPECT_RATIO_PORTRAIT_ONLY change ID" into sc-v2-dev 2021-11-11 12:48:05 +00:00
Felipe Leme
61292e22ed Renamed setStopBackgroundUsersOnSwitch to setStopUserOnSwitch()
Test: atest NeneTest:UsersTest
Test: m update-api CtsVerifier
Test: adb shell cmd activity set-stop-user-on-switch false
Test: adb shell cmd activity set-stop-user-on-switch
Test: adb shell dumpsys activity users|grep OnSwitch

Bug: 203752848

Merged-In: Iea03164319768abf159bf8ae2ccc539620cb30fe
Change-Id: Iea03164319768abf159bf8ae2ccc539620cb30fe
2021-11-08 16:32:42 -08:00
tomnatan
5a676f6f15 Introduce an OVERRIDE_MIN_ASPECT_RATIO_PORTRAIT_ONLY change ID
This change ID will determine whether the OVERRIDE_MIN_ASPECT_RATIO override will be applied for portrait only activities (if enabled), and for all orientations (if disable).

Note that this change is enabled by default because it will need to be
enabled for most use cases.

Fix: 203647190
Test: atest WmTests:SizeCompatTests
Change-Id: I0fccbdc22ff387d33695fbf432cf96cd517de095
2021-11-08 16:47:49 +00:00
Felipe Leme
9cab317f2a New TestAPIs on ActivityManager to not stop bg users on switch.
Test: atest NeneTest:UsersTest
Test: m update-api
Test: adb shell cmd activity set-stop-user-on-switch false
Test: adb shell cmd activity set-stop-user-on-switch
Test: adb shell dumpsys activity users|grep OnSwitch

Bug: 203752848

Change-Id: Ib57989aff323dc1f7d98720d01215e4f7c79ba3a
2021-11-04 12:36:56 -07:00
Michael Wright
b16d94b4fb Merge "Add constant for SC V2." into sc-v2-dev 2021-10-28 18:52:52 +00:00
Yurii Zubrytskyi
2ef09f9ce9 Merge changes I507f8573,I6d9efe2e into sc-v2-dev
* changes:
  [res] Finalize resources in SC-v2 RESTRICT AUTOMERGE
  [aapt2] Fix finalized resources removal
2021-10-27 23:04:26 +00:00
Michael Wright
dec589fbce Add constant for SC V2.
Bug: 204295952
Test: N/A
Merged-In: Ieecebfccf9366815c93d620b70aeabc1abcd3ebd
Change-Id: Ieecebfccf9366815c93d620b70aeabc1abcd3ebd
2021-10-27 17:51:58 +01:00
Jean-Michel Trivi
a991d6bdc2 MediaFormat: fix key value for KEY_MAX_OUTPUT_CHANNEL_COUNT
Fix type that used "_" instead of "-"

Bug: 198197610
Test: TBA on new decoder
Change-Id: Ief5ae1f708b27347bf5a700abfd51f9c53e2c888
2021-10-26 09:13:07 -07:00
Yurii Zubrytskyi
e9e1d94c4a [res] Finalize resources in SC-v2 RESTRICT AUTOMERGE
+ modify the finalization script to support new mode -
  staging-public-group

+ support removed items

Bug: 203782582
Test: manual, aapt2 dump on the generated resources

Change-Id: I507f85737d0ba5bf074dd8d98633087ff33c8382
2021-10-21 18:39:53 +00:00
tomnatan
d223334e60 Make ActivityOptions#setLaunchTaskId a system API
This is needed for digital wellbeing, see go/dwb-dialog-multi-window-dd for more information.

Bug: 199825187
Test: N/A
Change-Id: Ic0acbb034f326d0e8bc0e63d8c1a7b3f35a0e931
2021-10-21 08:33:35 +00:00
Arc Wang
3fc42998a8 Merge "Improve scalability of Settings deep link API" into sc-v2-dev 2021-10-19 03:56:27 +00:00
TreeHugger Robot
d159eccc3c Merge "MediaFormat: codec-agnostic key for max number of output channels" into sc-v2-dev 2021-10-16 02:58:36 +00:00
Jean-Michel Trivi
632f1930b8 MediaFormat: codec-agnostic key for max number of output channels
New key behaving like KEY_AAC_MAX_OUTPUT_CHANNEL_COUNT but not
AAC specific.

Bug: 198197610
Test: TBA on new decoder
Change-Id: If4d5f4580cba4ababbe4f18e19efbd070ec8f65c
2021-10-15 10:04:51 -07:00
Tom Natan
282c40c660 Merge "Make isVisible member in TaskInfo public for digital wellbeing" into sc-v2-dev 2021-10-15 14:56:51 +00:00
tomnatan
8d78842f93 Make isVisible member in TaskInfo public for digital wellbeing
Bug: 199825187
Test: N/A
Change-Id: If2e8ff32e865591ea8b2de68e5cb1e8b05e06f35
2021-10-14 10:17:51 +00:00
Emilian Peev
cd056ddbb8 Merge "Camera: Rename DeviceStateOrientationMap" into sc-v2-dev 2021-10-13 22:40:46 +00:00
Emilian Peev
1a1461e5ae Camera: Rename DeviceStateOrientationMap
Use "DeviceStateSensorOrientationMap" to avoid possible
association with other common orientation states such as
Portrait and Landscape.

Bug: 202832229
Test: atest -c
cts/tests/camera/src/android/hardware/camera2/cts/ExtendedCameraCharacteristicsTest.java#testDeviceStateSensorOrientationMapCharacteristics
Change-Id: I6fc9d452f0bb4099389e30d0404e1c6c20dff8ff

Change-Id: Icde1a8eb25b15b237812f583de8f7a46b6576772
2021-10-12 14:01:30 -07:00
Jean-Michel Trivi
859de8a0ed Spatializer: add API for monitoring output changes
Add privileged API for monitoring audio output stream changes
for the output used by the spatializer effect.

Bug: 202723925
Test: atest SpatializerTest
Change-Id: Ie35ff41e2bec8448997873ca4cf1e229080d2f6a
2021-10-12 08:46:14 -07:00
TreeHugger Robot
492bdf0074 Merge "Rename getSurfaceTransformHint API and switch to using NDK transform constants" into sc-v2-dev 2021-10-12 00:35:32 +00:00
Vishnu Nair
8eb0c64cf4 Rename getSurfaceTransformHint API and switch to using NDK transform constants
NDK exposes ANativeWindowTransform/NATIVE_WINDOW_TRANSFORM_*. These
constants are aligned with HAL definitions and are used internally to
specify buffer transforms. Native consumers of the transform hint
 are expected to generate ANativeWindowTransform from the hint.

Aligning the SDK and the NDK transform values will make the API
less confusing.

Bug: 196167822
Test: atest AttachedSurfaceControlTest
Change-Id: Ib20be045f6c8c6d7befef93a839a27098da55ffa
2021-10-11 16:28:20 -07:00
Nick Chameyev
ff265fecb9 Merge "Rename shouldUseDefaultDisplayStateChangeTransition attribute" into sc-v2-dev 2021-10-08 12:16:40 +00:00
Emilian Peev
01d8df412d Merge "Camera: Keep sensor orientation consistent with device fold state" into sc-v2-dev 2021-10-07 22:53:24 +00:00
Emilian Peev
2bf82bbfef Camera: Keep sensor orientation consistent with device fold state
Allow foldable devices to advertise the mapping between device fold
state and sensor orientation.
Additionally return the current  sensor orientation
based on the specific device fold state.

Bug: 201005727
Test: Manual using AOSP Camera2 application,
Camera CTS

Change-Id: Idc76903da22567d29cc55d991b41df7e19490aa3
2021-10-07 11:29:21 -07:00
Nick Chameyev
46578a254a Rename shouldUseDefaultDisplayStateChangeTransition attribute
Renames the shouldUseDefaultDeviceStateChangeTransition attribute name to
shouldUseDefaultUnfoldTransition to make it less generic.

Test: manual
Fixes: 200730817
Change-Id: Icc7f25f20758162c318e0b0896fb9a7bb2de5911
2021-10-07 15:10:37 +00:00
wilsonshih
9987513af6 Fix snapshot starting window stuck if the task never gain focus
The tasksnapshot starting window could stuck on task if the task never
gain focus, this could happen when launch multiple tasks to front, e.g.
split screen, or add snapshot starting window to a pip task.

As using task focus to judge the task snapshot removal may error-prone.
(i.e. unexpected window focus in/lost, non-focusable task window..)

To ensure the tasksnapshot removal works stable, extanding
MAX_DELAY_REMOVAL_TIME_IME_VISIBLE timeout from 450ms to 600ms and also
reference mayImeShowOnLaunchingActivity to know whether IME showing on
this activity.

Bug: 199377815
Bug: 201264769
Bug: 200778734
Test: atest ActivityRecordTests StartingSurfaceDrawerTests
SplashscreenTests
Test: manual launch apps with IME from Recents.
Test: enter pip, power on/off, verify starting window is removed.
Test: manual enter split screen, verify starting window is removed.

Change-Id: I81b048a655124923a5f19e7f236511502bbf4c91
(cherry picked from commit a4f760bee7)
2021-10-05 20:43:35 +08:00
Arc Wang
d98bcb3363 Improve scalability of Settings deep link API
Avoid using 'two pane' and 'large screen' because
they are implementation details exposure.

Bug: 201662312
Test: build pass
Change-Id: I67e4b07ab957285ac0410f307030c491b3f6e95d
2021-10-05 20:23:33 +08:00
Nick Chameyev
3d984a776f Merge "Rename shouldUseDefaultDeviceStateChangeTransition attribute" into sc-v2-dev 2021-10-04 09:00:00 +00:00
TreeHugger Robot
442864cace Merge "Added a DevicePolicyManager.setDeviceOwnerOnly() method." into sc-v2-dev 2021-10-01 15:37:15 +00:00
Nick Chameyev
5985d390d6 Rename shouldUseDefaultDeviceStateChangeTransition attribute
Renames the shouldUseDefaultDeviceStateChangeTransition attribute name to
shouldUseDefaultDisplayStateChangeTransition to make it less generic.

Test: manual
Fixes: 200698833
Change-Id: Ib6f90bcba2e75485e954bdbc1833fd67728e51c6
2021-09-30 11:39:03 +00:00
Felipe Leme
895f3ba3f0 Added a DevicePolicyManager.setDeviceOwnerOnly() method.
It will be used by the test infra to just set the device owner,
without setting the profile owner on current user on systems
using headless system user.

Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testDeviceOwnerSetup
Test: adb shell dpm set-device-owner --user 0 --device-owner-only com.afwsamples.testdpc/.DeviceAdminReceiver
Test: m update-api

Fixes: 201313785
Bug: 192395248

Change-Id: I41c2cf187c1eceebe7c6ef30f9cff693b9dcbc15
2021-09-29 09:30:53 -07:00
TreeHugger Robot
80fcbc8fe0 Merge "[NGA v2] Reliable Visible Activity Lookup" into sc-v2-dev 2021-09-28 17:50:34 +00:00
Nick Chameyev
b85da640d1 Merge "Rename shouldUseDefaultUnfoldTransition attribute and update docs" into sc-v2-dev 2021-09-28 10:06:27 +00:00
lpeter
918ea9940f [NGA v2] Reliable Visible Activity Lookup
To enable more voice-oriented in-app user journeys, Google Assistant
needs to access more information regarding the visible activities
via the Voice Interaction Session. Thus, we provide the APIs to receive
the changed visible activities in Voice Interaction Session.

Bug: 178244510
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Change-Id: I019d09fee8105ae1eadbc76803f46fd8b1948f6b
2021-09-28 17:06:49 +08:00
Nick Chameyev
10b13e8505 Rename shouldUseDefaultUnfoldTransition attribute and update docs
Renames the shouldUseDefaultUnfoldTransition attribute
name to use more generic
shouldUseDefaultDeviceStateChangeTransition name as
the transition could be used on different form factors
depending on the OEMs.

Test: manual
Fixes: 200730817
Fixes: 200698833
Change-Id: I1c5d755f76f455475471fc893d4748c6adf51b8c
2021-09-24 09:25:54 +00:00
Arc Wang
6f7d870b56 Remove Settings#EXTRA_SETTINGS_LARGE_SCREEN_DEEP_LINK_PENDING_INTENT
For the Intent ACTION_SETTINGS_LARGE_SCREEN_DEEP_LINK,
EXTRA_SETTINGS_LARGE_SCREEN_DEEP_LINK_PENDING_INTENT is for partner
apps to tell target Activity the private Activity to start.

However, developers feedback that customization extra data are
preferred, so a later CL supports customized extra data for
ACTION_SETTINGS_LARGE_SCREEN_DEEP_LINK.

Developers will not need
EXTRA_SETTINGS_LARGE_SCREEN_DEEP_LINK_PENDING_INTENT to specify
a private Activity.

Bug: 197048599
Test: build pass
Change-Id: Icc949b897ff36755004cc34b31caf5b06974bfae
2021-09-24 13:50:16 +08:00
TreeHugger Robot
dedfe23d54 Merge "Expose getSurfaceTransformHint API" into sc-v2-dev 2021-09-22 23:55:07 +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
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
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
Nick Chameyev
c87aa1a23e Merge "Add should use default unfold transition attribute to wallpaper" into sc-v2-dev 2021-09-21 16:09:41 +00:00
Jean-Michel Trivi
7966f9aa68 Spatializer: support for effect parameters
Add set/get API for implementatation-specific parameters

Bug: 191404931
Test: atest SpatializerSystemTest
Change-Id: Ibc49e05670c7bc473dad2421808b4a60970f16c9
2021-09-20 22:02:03 -07:00
Nick Chameyev
0a14f33198 Add should use default unfold transition attribute to wallpaper
Adds new attribute to wallpaper XML declaration to indicate
whether a wallpaper should receive default zooming transition
updates when folding or unfolding. This attribute allows to
opt-out from the default behaviour during this transition and
implement custom behaviour.

Bug: 196933493
Test: atest android.app.cts.WallpaperInfoTest
Change-Id: I7cb104bf7dfbbe92de72e505ec31d866a59bae4a
2021-09-20 09:55:02 +00:00
Jean-Michel Trivi
68bfa3b30a Immersive audio APIs for headtracking
Headtracking:
- setter / getter and listener for headtracking mode
- listener for head pose
- global transform
- recentering

Bug: 191404931
Test: atest SpatializerHeadTrackingTest
Change-Id: I15cea62365584f84ae5a9149719902c671944f28
2021-09-16 13:15:05 -07:00
Jean-Michel Trivi
c5f69571ef AudioManager.getSpatializer() never returns null
Spatializer instance returned by AudioManager.getSpatializer()
 is never null.
Instead of having this getter return null when the device
 doesn't support spatialization, the user can query the
 instance for it's level of support for the feature.
The level of support is independent of the state of the
 spatializer.

Bug: 191404931
Test: atest SpatializerTest
Change-Id: Id08670749b4d34230313d2cd829aa5ba414dae21
2021-09-14 13:11:58 -07:00
Jonathan Scott
54c399f81c Merge "Add TestApi to clear organization Id" into sc-v2-dev 2021-09-13 12:55:26 +00:00
Rubin Xu
0a1f866c4e Add TestApi to clear organization Id
Needed in CTS tests to reset the organization ID and
enrollment specific ID.

Bug: 197760250
Test: atest android.devicepolicy.cts.EnrollmentSpecificIdTest
Change-Id: Ice1123744957ab57636ec1d9b0ca60a16c5a93cf
Merged-In: Ice1123744957ab57636ec1d9b0ca60a16c5a93cf
2021-09-10 12:29:30 +00:00