Commit Graph

30182 Commits

Author SHA1 Message Date
Chavi Weingarten
5a4a5682a2 Merge "Remove getLeash from WindowContainerToken" into rvc-dev 2020-04-30 00:16:21 +00:00
chaviw
8d8b31b833 Added featureId to DisplayAreaInfo
This is something clients will need if they register to listen to
DisplayAreas for several features. This will help distinguish the
DisplayAreaInfos.

Test: Builds
Bug: 152114574
Change-Id: If1d14aee070388274afb6a43bc1c631d79fb4b38
2020-04-29 13:47:26 -07:00
chaviw
7de50009a3 Remove getLeash from WindowContainerToken
If the WindowContainer was revoked from a registered organizer, the
client could still call getLeash to system server and control the leash
for the WindowContainer. Instead, pass the leash back to the client in
onTaskAppeared and onDisplayAreaAppeared. Once the WindowContainer is
revoked from the client, the leash will reference the old
WindowContainer SurfaceControl and will not be able to control the
WindowContainer anymore.

Test: Split screen
Test: DisplayAreaOrganizerTest
Test: WindowOrganizerTest
Bug: 154558563
Change-Id: I1f6eb987a2a3fecfef912a3009ee52989c85ff4b
2020-04-29 09:36:35 -07:00
TreeHugger Robot
447914fcfe Merge "Add RoleControllerManagerTest." into rvc-dev 2020-04-29 05:56:34 +00:00
Hai Zhang
a39cf78c63 Add RoleControllerManagerTest.
Fixes: 155119713
Test: atest RoleControllerManagerTest
Change-Id: If90ba60cccbe1589365142a06d917a87b7a092ef
2020-04-28 12:14:01 -07:00
Fan Zhang
f7c753bc16 Add @TestApi to createLaunchEmergencyDialerIntent
Test: build
Bug: 154867896
Change-Id: Id2eb94b233c6c00a81c51d17c5414b3cce5ebdf5
2020-04-28 03:34:17 +00:00
TreeHugger Robot
bac5755dad Merge "Allow tests for more PermissionControllerManager methods" into rvc-dev 2020-04-27 16:16:28 +00:00
Alex Johnston
c5e9a48db8 Merge "Add factory reset protection policy Test API to DPM" into rvc-dev 2020-04-27 11:04:46 +00:00
Philip P. Moltmann
18247c1a8c Allow tests for more PermissionControllerManager methods
Test: atest RuntimePermissionPresentationInfoTest PermissionControllerTest
Bug: 155019930
Change-Id: I4baca0f35e7218fbf127d56fcdf1fe1855d64929
2020-04-26 17:52:41 -07:00
Sally Yuen
8ab42a27ce Merge "Add @TestApi to registerSystemAction and unregisterSystemAction" into rvc-dev 2020-04-24 20:12:16 +00:00
Fabian Kozynski
eab14fca5d Merge "[DO NOT MERGE] Add setting for power menu in lock screen privacy" into rvc-dev 2020-04-23 19:38:05 +00:00
sallyyuen
8bc474b8df Add @TestApi to registerSystemAction and unregisterSystemAction
@SystemApi requires @hide, so @TestApi is needed for these to
be visible to CTS testing

Test: methods visible to CTS test
Bug: 152052560
Change-Id: Icd7f82f3859a1deccd41d2279d8f9722a42df957
2020-04-23 09:40:18 -07:00
Chavi Weingarten
74aa929f63 Merge "Add DisplayAreaInfo" into rvc-dev 2020-04-23 15:55:20 +00:00
chaviw
d1a2393f6c Add DisplayAreaInfo
Pass DisplayAreaInfo to the client to communicate information about a
specific DisplayArea.

Test: Builds
Bug: 152114574
Change-Id: Iec53ec57d1e5e892d66a1da0bd48b75f91965d20
2020-04-22 14:29:18 -07:00
Fabian Kozynski
2095c43a25 [DO NOT MERGE] Add setting for power menu in lock screen privacy
Adds a new Setting for the user to show or hide power menu content
(cards & passes, controls) when the device is locked (secured). A value
of 0 (default) means hide content and a value of 1 means show.

The setting updates from the notification in the following way:
* If Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS is 1 AND
Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS is 1, the new setting is
set to 1 (the user has allowed sensitive content).
* If at least one of those settings is 0, the new setting is set to 0
(the user has not allowed sensitive content).
* If the settings are not set, the new setting is not set.

Test: build
Test: manual with adb
Bug: 152212779
Change-Id: If6d9436f633bc45330956372ea7f8a40ed22ed52
2020-04-22 13:16:15 +00:00
Alex Johnston
e62d8d1117 Add factory reset protection policy Test API to DPM
* Add @TestApi isFactoryResetProtectionPolicySupported()
  to DevicePolicyManager which returns whether factory
  reset protection policy is supported on the device.

Bug: 153696811
Test: atest com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testFactoryResetProtectionPolicy
Change-Id: Id0bd6cdacf33f0fb2f795e1ead5127b79f42960e
2020-04-22 10:23:15 +01:00
Jacky Kao
ec8733e497 Makes AccessibilityNodeInfo#getSourceNodeId as test API
For testing the accessibilityNodeInfo constructor methods, making this
method, AccessibilityNodeInfo#getSourceNodeId, to become a testing API.

Bug: 154163930
Bug: 154163953
Test: a11y CTS & unit tests
Change-Id: I9a2ff665996e28d6d5770723d98b49f96eab1f50
2020-04-22 15:43:27 +08:00
Brad Ebinger
c05ba6325d Merge "Using RegistrationManager was causing unintended public APIs" into rvc-dev 2020-04-21 22:33:37 +00:00
Wale Ogunwale
201af5078f Merge "Allow CTS test to control organized tasks" into rvc-dev 2020-04-21 22:01:40 +00:00
TreeHugger Robot
6b74050d48 Merge "Add currentUiModeSupportsErrorDialogs() into ActivityTaskManager." into rvc-dev 2020-04-21 18:35:44 +00:00
Yuncheol Heo
5d9b2710da Add currentUiModeSupportsErrorDialogs() into ActivityTaskManager.
The method will be used in AnrTests to check if the system can support ANR Dialog or not.

Bug: 149510025
Test: atest AnrTests
Change-Id: I7a78be06fcf3c4882931aaea1d330b2cebdc2d84
2020-04-21 16:24:22 +00:00
Linus Tufvesson
3bfec32633 Merge "Make ActivityViews backing virtual display private" into rvc-dev 2020-04-20 14:00:28 +00:00
Wale Ogunwale
20ab6d4999 Allow CTS test to control organized tasks
Changes to allow CTS test to control organized task so we can have the
tests run the same way sys-ui is driving things now. Control is given
back to sys-ui once the test is done running.

Bug: 149338177
Test: atest CtsWindowManagerDeviceTestCases:SplitScreenTests
Change-Id: I74a03ee3411f5b10ea4e26c1cc3c663dc394dd97
2020-04-19 19:09:33 -07:00
Nicholas Ambur
d3c1f27b0c add KeyphraseEnrollmentInfo to TestApi
KeyphraseEnrollmentInfo is used for testing the system enrollment
application support within GTS.

Bug: 153264697
Test: gts-tradefed run gts-dev -m GtsAssistIntentTestCases \
-t com.google.android.assist.gts.KeyphraseModelManagerTest# \
testAllSystemKeyphrasesAndLocales

Change-Id: I66558cf849f2815f2c917d128f9f9cc0673750ef
Merged-In: I66558cf849f2815f2c917d128f9f9cc0673750ef
2020-04-17 22:12:13 +00:00
Jerry Chang
e63ae2f84f Mark more directory getter APIs @TestApi
To have a way to verify behavior of more directories, mark more
directory getter APIs @TestApi.

Bug: 148664742
Test: atest SysConfigTest#testStageWhitelist
Change-Id: I2d22412935b24ec4c33d8d1b3a7fbb7df4a08841
2020-04-17 14:50:48 +08:00
Ming-Shin Lu
49ccdb557f Merge "Add test APIs for makeCustomAnimation" into rvc-dev 2020-04-17 03:33:51 +00:00
Linus Tufvesson
db1f2ec052 Make ActivityViews backing virtual display private
Bug: 150310377
Test: atest CtsWindowManagerDeviceTestCases:ActivityViewTest
Test: Used bubbles test app to verify that it's still happy when using
private VDs

Change-Id: I02c6840b1f908a5177c217494de0110f5ce78f7e
2020-04-16 15:50:48 +01:00
Brad Ebinger
db3e8ee013 Using RegistrationManager was causing unintended public APIs
Remove the dependency on this interface until it is intended
to be public.

Fixes: 153908410
Test: atest CtsTelephonyTestCases
Change-Id: Iad82b7d06738468861bd49164fbb4b4dafb8c014
2020-04-14 15:17:46 -07:00
Winson Chung
1df39e2cf6 Send task description changed though task org taskInfoChanged
- This removes the need for a separate task stack listener and aligns
  with other task info change properties
- Also implement equals/hashCode for the token so we can use it in
  containers

Bug: 148977538
Test: atest TaskOrganizerTests

Signed-off-by: Winson Chung <winsonc@google.com>
Change-Id: Ie035e6389fdbdc374c1a4b4a684758efa0cb7a9e
2020-04-11 00:01:05 -07:00
Michael Groover
f4cd234bcb Merge "Update permission requirements for TelecomManager#getLine1Number" into rvc-dev 2020-04-09 17:21:42 +00:00
TreeHugger Robot
ffce5f2b7c Merge "Make OPSTR_MANAGE_EXTERNAL_STORAGE test API" into rvc-dev 2020-04-08 23:21:23 +00:00
Andrii Kulian
ac4b972e7a Merge "6/n Manage multiple task display area in the policy" into rvc-dev 2020-04-08 17:35:42 +00:00
shafik
2a20790621 Make OPSTR_MANAGE_EXTERNAL_STORAGE test API
We need that to enable CTS for Environment#isExternalStorageManager API

Test: build
Bug: 152478019
Change-Id: I8c24c08991558629c83a25b4bed89c817723d732
2020-04-08 17:49:47 +01:00
Andrii Kulian
44b3c569f4 6/n Manage multiple task display area in the policy
Delegate task display area creation and container management to the
display area policy implementation. This should allow creating and
handling device-specific task display area arrangements.

Bug: 152116619
Test: WM CTS and unit tests
Change-Id: Ic1182d064e7d8387f701f04fb267e2bb6d4da0c5
2020-04-07 21:30:26 -07:00
Jorim Jaggi
ee54070608 Re-apply local client state when leash changes
When leash changes, we need to re-apply our local state, to ensure
new leash has same state as before and new leash is visible on
screen.

Test: Switch IME while open
Test: SurfaceControlTest
Fixes: 152876819
Change-Id: Ieae1aecdc3ddc427ccb89c4aa7ef7ae9283f39eb
2020-04-07 23:04:44 +00:00
Steven Thomas
2845ad86a4 Merge "Add frame rate flexibility token" into rvc-dev 2020-04-07 18:20:36 +00:00
Ming-Shin Lu
b6d7002f36 Add test APIs for makeCustomAnimation
For CTS to verify activity custom transition duration
with onAnimationStartedListener / onAnimationFinishedListener
in ActivityOptions

Bug: 150443017
Test: build, atest ActivityTransitionTests
Change-Id: I603ab60a65343f3f336b311064ad55b01ead4929
2020-04-07 21:21:59 +08:00
Santos Cordon
29d5b8f43e Expose Display.getType() via TestApi.
Bug: 151124371
Test: atest android.display.cts.DisplayTest
Change-Id: Id3c25fe675c1fa2b0070cf95736c608315b5e26b
2020-04-07 09:56:16 +00:00
TreeHugger Robot
5eb9c8fada Merge "Store conversation requirement in a setting" into rvc-dev 2020-04-07 03:47:02 +00:00
François Gaffie
d83e946d53 AudioSystem: add annotation on API used by CTS media
Add @TestApi for the class so some methods and
constants can be visible to test API.
  Also @hide for all other members of the class
that are not @TestApi, as they are exposed to the
test API visibility.

Bug: 136121584
Test: run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioProductStrategyTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioVolumeGroupTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioVolumeGroupChangeHandlerTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testPermissionsForVolumePerAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testGetAndValidateProductStrategies
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testGetAndValidateVolumeGroups
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testSetGetVolumePerAttributesWithInvalidAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testSetGetVolumePerAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testVolumeGroupCallback
Signed-off-by: François Gaffie <francois.gaffie@renault.com>

Change-Id: Iff9abda2cf971d9c234dcf7df7c2b9a4ad5294c3
2020-04-06 15:04:22 -07:00
Joanne Chung
62cd75f90d Merge "Made ExplicitHealthCheckService testable." into rvc-dev 2020-04-06 02:33:24 +00:00
Steven Thomas
6ec6fbc2cc Add frame rate flexibility token
Add support for temporarily relaxing frame rate restrictions in surface
flinger. This is used by CTS tests to get a consistent device state
while running frame rate tests.

Bug: 148033900

Test: - On a Pixel 4, I turned the brightness down and covered the
ambient light sensor, causing the display manager to set a frame rate
restriction. I ran the frame rate CTS test without these CLs applied,
and confirmed the test failed because surface flinger couldn't switch
frame rates, as expected. Then I ran the tests with the CLs applied, and
confirmed the tests pass.

- I confirmed that, without adopting shell permission identity, the CTS
test is denied the request to acquire a frame rate flexibility token. So
normal apps won't be able to access this.

Change-Id: Ie2b611cf5726c14a7a22e315a85bf6200d190682
2020-04-04 19:55:00 -07:00
Henry Fang
1eef1d2f26 Add test api for CTS to test resource lost event
bug: 152343262
Test: Manual
Change-Id: I5660cea3e57771c8a09f57ed88723064bb592c30
2020-04-03 17:39:13 +00:00
Amith Yamasani
040563da5f Merge "Mark secondary lockscreen API as SystemApi." into rvc-dev 2020-04-03 14:13:43 +00:00
Jack Yu
30be5e5d3d Added a new capability for temporarily unmetered network.
Added a new network capability TEMOPORARILY_NOT_METERED to support
the case that a network can temporarily become unmetered. This
allows carriers to deploy unmetered 5G network. When devices
camp on 5G network, this capability will be dynamically added
to the network and will be removed once leaving 5G coverage.

Bug: 153081494
Test: Manual
Change-Id: I10e26cb0852e67f614e7b9c4e49f95e078602e21
2020-04-02 19:28:41 -07:00
Julia Reynolds
e24faa2c86 Store conversation requirement in a setting
So we can show it in developer options. Also fix a bug
where the setting wasn't being respected in systemui.

Test: atest
Bug: 152907434
Change-Id: I1eaed93a0c8a1ec4486c7072972e2f924402bb94
2020-04-02 16:28:40 -04:00
Yvonne Jiang
70a62376d0 Mark secondary lockscreen API as SystemApi.
It is currently not meant for use by general enterprise device admins.

Bug: 152478326

Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest KeyguardUpdateMonitorTest
Test: atest AdminSecondaryLockScreenControllerTest
Change-Id: I6d60bc35a4e8f74b1da55b042582a2f2fa89d57f
2020-04-02 08:41:04 +00:00
Joanne Chung
ea12c719b6 Made ExplicitHealthCheckService testable.
Bug: 149077550
Test: atest CtsPackageWatchdogTestCases
Change-Id: I588052de62bce6cbfa8118d1be56257a1dde422f
2020-04-01 22:54:35 +08:00
Wale Ogunwale
adf116ec95 Add TestApi interfaces for window organizers
Enables testing the API surfaces from CTS.

Bug: 149338177
Test: they pass!
Change-Id: I7e1f2852585a10c20d299bd87e9a87f828d06d6a
2020-04-01 13:25:23 +00:00
Feng Cao
edb332c645 Replace Nullable bundle with NonNull and use Bundle.EMPTY
Test: atest InlineSuggestionsRequestTest
Bug: 152525467

Change-Id: Ie510e08ced8be4cc8df486f1acfa6eb330d194ef
2020-03-31 14:50:51 -07:00