Commit Graph

30209 Commits

Author SHA1 Message Date
JianYang Liu
2c403a6526 Added systemui controller to control system bars.
When config_remoteInsetsControllerControlsSystemBars is true,
DisplaySystemBarsController provides its own policy of how system
bars are displayed for specific packages. Currently limited to
only auto versions of Android.

Bug: 149585273
Test: Manual, atest BarControlPolicyTest, atest InsetsPolicyTest,
      atest DisplaySystemBarsControllerTest
Change-Id: Ie6b1cc3e2760cbc9e48d62dfbd8bc3e23ffca20c
Merged-In: Ie6b1cc3e2760cbc9e48d62dfbd8bc3e23ffca20c
2020-07-08 23:06:14 +00:00
Jorim Jaggi
d42ab1b938 Pass in callsite of SurfaceControl constructor explicitly (1/3)
Creating a new Throwable (and filling in the stack trace) can take
up to 150us. Since we do this on the critical path when sending
over SurfaceControl via binder multiple times, this is too much.
Instead, add an option to pass in callsite manually.

Bug: 159056748
Change-Id: I46c339c15a07192d61c4c546e46f260684a47120
Merged-In: I46c339c15a07192d61c4c546e46f260684a47120
Exempt-From-Owner-Approval: Large scale refactor
2020-06-26 15:35:23 +02:00
Svetoslav Ganov
f8b9ddea71 Merge "Handle reperenting of InlineContentView" into rvc-dev 2020-06-24 06:28:59 +00:00
Svet Ganov
a5b4990d96 Handle reperenting of InlineContentView
When an inline content view is reparented its surface is
getting offset and not being under the view itelf. This is
because the surface views manage the postion of their
surface and are assuming a location based off the window's
surface position. However after a reparenting the inline
content view's surface position becomes relative to that
of the new parent surface view. For example, two surface
views at position (10, 10) being reparented would reslut
in the surface of the parent being at (10, 10) while the
surface of the child being at (20, 20) while both views
would still be at (10, 10).

To address this we are intecepting when an inline content
view's surface is reparented and get a weak reference to
the view that owns the new parent surface. We then position
the inline content view's surface relative to the view that
owns the new parent surface, i.e. we position the surface
such that its location would not change because of the
fact it is being reparented.

While at this make sure the inline content view is marked
as not important for a11y to ernsure the a11y plugins don't
try to click on the view tree in the app's process but
insted on the views in the remote proccess, i.e. on the
embedded view tree.

bug:153826463

Test: atest android.widget.cts.inline.InlineContentViewTest#testReparenting

Change-Id: I2cff4b88d404a740bc447668e948eabccad084d2
2020-06-24 06:27:17 +00:00
Joanne Chung
234a31e2f5 Merge "Made AutofillId.withoutSession is testable." into rvc-dev 2020-06-23 22:56:59 +00:00
Joanne Chung
24abde551e Made AutofillId.withoutSession is testable.
We add new test in stage-aosp-rvc-ts-dev for R2, we need make this API
testable.

Bug: 156408900
Test: atest android.autofillservice.cts.inline.\
InlineAugmentedWebViewActivityTest

Change-Id: I27d1227f858aac83b3de1cb8ef719edf177524dc
Merged-In: I27d1227f858aac83b3de1cb8ef719edf177524dc
2020-06-23 00:38:40 +00:00
Galia Peycheva
ce6270f532 Make config_assistantOnTopOfDream a TestApi
Test: atest AssistantStackTests
Bug: 158117282
Change-Id: I154e8b7d3fbf842fa9f1bef82a59193550af5620
2020-06-19 16:25:58 +02:00
Charles Chen
b28fb721f5 Trust System UI owned display to receive keys
A11y service cannot get focus of bubbles because it's not a
System owned display. This patch makes System UI owned display
a trusted display. Moreover, this patch refactors the logic to
identify a trusted display by introducing FLAG_TRUSTED and
removes the trusted display check along with supportsSystemDecorations()
because the check has been included in supportsSystemDecorations().

fixes: 155823002
Bug: 152416787
Test: atest DisplayContentTests
Test: atest WindowFocusTests
Test: atest TaskDisplayAreaTests
Test: atest MultiDisplaySystemDecorationTests
Test: atest DisplayTest
Change-Id: Ie684c6488904e5aa8cae166a455c6d55455e5f55
2020-06-16 02:10:21 +08:00
Adrian Roos
cb32080a8f Settings: make SHOW_IME_WITH_HARD_KEYBOARD TestApi
Bug: 158637229
Test: atest WindowInsetsAnimationControllerTests
Change-Id: Ic4e1c97e728aa170670356db22d66677710ac2a3
2020-06-12 15:31:20 +02:00
Svet Ganov
185ddf644b Correctly offset app op history on reboot
The offset was computed based off the offset represented by
the most recent historical file while we have to use the time
this file was written.

Also now we persist the history on reboot and shutdown,
significantly minimizing the possibility of data loss.

Added test API to emulate reboot of the history to allow for
precise and tightly controlled test to prevent flakes due to
boot time deviations.

Test: atest android.app.appops.cts.HistoricalAppopsTest#testRebootHistory

Fixes:156853195

Change-Id: I4142371f8bc2b1d710cc8c300e7e79cb03764c04
2020-06-05 09:55:27 -07:00
Amy Zhang
e151e60843 Expose necessary SystemApi as test API for CEC CTS
This CL annotates multiple APIs in the HdmiControlManager as Test APIs.
Also creates a Test api wrapper for aidl interface IHdmiControlService.
HdmiPortInfo is the param under test that is also annotated as Test API.

Test: atest android.hardware.hdmi.cts
Bug: 155113872
Change-Id: I58b483eaaa5fe08f90415a7e044c30a28dc7d7c2
2020-06-04 13:47:37 -07:00
TreeHugger Robot
e40b321ee6 Merge "Add test for permission APEX." into rvc-dev 2020-05-29 21:40:19 +00:00
Nicholas Ambur
779a8966f5 Merge "add SoundTrigger TestApis" into rvc-dev 2020-05-29 03:17:09 +00:00
Hai Zhang
3562068af9 Add test for permission APEX.
Bug: 152055112
Test: atest PermissionApexTests
Change-Id: I4201501d586fe62df7a04d0e2da955d6d873d3df
2020-05-28 16:19:07 -07:00
TreeHugger Robot
f49fa1a9ea Merge "Add support for TvInputManager.acquireTvInputHardware CTS" into rvc-dev 2020-05-27 04:39:45 +00:00
Anton Hansson
206be52a78 Remove nullablility annotations from module-lib
They were added to workaround the problem of package-private versions
being added to the stubs, which prevented use of the annotations from
mainline modules.

Having them in the API leads to a different problem -- this version of
the nullability annotations have SOURCE retention. However in the stubs
build we want to have CLASS retention, so that kotlin can make use of
their presence.

This is arguably a much cleaner fix, since having a source-retention
annotation doesn't really make much sense.

Bug: 157010342
Test: m
Change-Id: Id78f00da5b6af2930224a82faa24cb8235362521
Merged-In: Id78f00da5b6af2930224a82faa24cb8235362521
2020-05-20 12:55:22 +01:00
Nicholas Ambur
add0956c25 add SoundTrigger TestApis
Test APIs are added to CTS to use for SoundTrigger system API test
coverage.

Bug: 152354427
Test: cts-tradefed run cts -m CtsSoundTriggerTestCases
Change-Id: Iea8d5f3095481a54520873b5c5e6976dc272b09c
2020-05-18 10:11:02 -07:00
Amy Zhang
5f8498bcf1 Add support for TvInputManager.acquireTvInputHardware CTS
1. Add a test api in TvInputManager to add hardware device for testing
2. Add Shell permission for TV_INPUT_HARDWARE
3. Add TUNER_RESOURCE_ACCESS permission for TvInput Framework.

Test: atest android.media.tv.cts
Bug: 155114656
Change-Id: I227f13cbf14532d8732729412ae9c2518755ef02
2020-05-14 17:37:52 -07:00
Cody Kesting
a611e762ad Merge "Create TestApi for simulating a Data Stall on ConnectivityService." into rvc-dev 2020-05-14 18:56:36 +00:00
Matt Pietal
9788fd4afd Controls API - Flag controls support
Add a package manager flag so that apps can programmatically query
whether the device have system interface to support the Controls API

Bug: 156096063
Test: manual
Change-Id: I2dab2ecb762b59308c51615137f89733ff42caeb
2020-05-13 14:11:34 -04:00
Automerger Merge Worker
42f8135c6e Create TestApi for simulating a Data Stall on ConnectivityService.
This change adds a TestApi for simulating a Data Stall to
ConnectivityService. This allows for Data Stalls to be triggered without
having to manipulate the signals used by NetworkMonitor . This also
allows NetworkMonitor to update the ways it detects Data Stalls without
affecting CTS tests for ConnectivityDiagnosticsManager.

Bug: 148032944
Test: atest ConnectivityDiagnosticsManagerTest
Change-Id: Icad439efa2ab4c872c21d3ee6ceaae8c5b49f18d
Merged-In: Icad439efa2ab4c872c21d3ee6ceaae8c5b49f18d
(cherry picked from commit b06463a002)
2020-05-12 20:34:50 +00:00
Torne (Richard Coles)
76752c8f02 Deprecate WebSettings.setAppCacheEnabled and related.
Chrome will be removing the Application Cache API in future; deprecate
the APIs in WebView which allow Android apps to enable it.

Test: make offline-sdk-docs
Fixes: 156266477
Change-Id: I0feff5289706b5f7985013a18d9cf0e3e6b3ba78
2020-05-12 11:57:30 -04:00
Galia Peycheva
95f8aba25e Merge "Add isDreaming method to DreamManager" into rvc-dev 2020-05-06 08:18:19 +00:00
Galia Peycheva
e1903416bb Add isDreaming method to DreamManager
This CL adds isDreaming to DreamMaanger and changes the way it starts a
dream to use IDreamManager.dream()

DreamManager is only used for testing. So far it has been using the
DreamManagerInternal.testDream() API to start the dream. This restricts
the amount of verification that can be done in the dream tests because
it doesn't put the device in a dreaming state -
IDreamManager.isDreaming() is always false.
IDreamManager.dream() puts the device in a dreaming state and enables
better testing.

Bug: 152994058

Test: atest DreamManagerServiceTests
Change-Id: Id4d947e83eabcafa9724764b8d063357c5f2cb49
2020-05-05 21:59:24 +02:00
Yuncheol Heo
8f4363a226 Merge changes from topic "immersive" into rvc-dev
* changes:
  Add test api getStatus/NavigationBarBackgroundView.
  Notify the visibility change to update color views without control.
2020-05-05 00:14:09 +00:00
Yuncheol Heo
70c4bb9007 Add test api getStatus/NavigationBarBackgroundView.
Introduces new test api to access the background view of status bar and
navigation bar.

Bug: 154720832
Test: atest WindowInsetsPolicyTest

Change-Id: If38d3f57edfbb2631d4c1e47ed5347a332edacfb
2020-05-04 14:36:43 -07:00
Svet Ganov
38cd221d81 Updating platform SDK version for R
* Finalize resources
  * Update appt/aapt2 constants
  * Update R and SDK constants
  * Fix a crashloop bug

Test: build + boot

bug:150281259

Change-Id: Ie56e12336cd1fcf347ac7164f6988b0c2da77c7d
Merged-In: Ie56e12336cd1fcf347ac7164f6988b0c2da77c7d
2020-05-03 09:58:54 -07:00
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