summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2022-03-15Merge SP2A.220305.013Haamed Gheibi
Bug: 220074017 Change-Id: Idfdd94e902f656ac65a2a75dfdd199f6f85ba472
2021-12-22Merge s-mpr-2021-12-05Eric Arseneau
Change-Id: Ic2889f5eb531008340529eadc36ec8efc62b1984
2021-09-13Always trigger safe mode callbacksBenedict Wong
This change ensures that safe mode callbacks are always triggered from the VcnGatewayConnection up, ensuring that if a gateway connection is restarted and successfully validates, it will notify the Vcn class, and kick it out of safe mode. Previously, if a VCN had entered safe mode, and a config was updated, the newly updated VcnGatewayConnection would be brought up as "not" in safe mode, and thus the onSafeModeStatusChanged() callback would never be fired if the new VcnGatewayConnection successfully connected. Calling onSafeModeStatusChanged() multiple times is safe, and serves as a "connection status changed" callback. Bug: 196841140 Test: atest FrameworksVcnTests Test: manual testing Original-Change: https://android-review.googlesource.com/1811936 Change-Id: I43c82ada9e9429e8283be65ab73d13075dfd6038 Merged-In: I856517924d0a767b63ea6127b7d4e39e09e93f2c (cherry picked from commit 7cf35e7bd940c6f4ee0035a4c1b081c71c85c7f9)
2021-08-06Merge SP1A.210803.001Scott Lobdell
Change-Id: I09253f8614e9ee85a59460f3ef25f17dd98cac80
2021-07-28Merge "Set TRANSPORT_PRIMARY for VCN NetworkOffers and NetworkAgents" into ↵Benedict Wong
sc-dev
2021-07-27Merge SP1A.210723.002Scott Lobdell
Change-Id: I220cdfc5cb9db40162fd33f400a54591018d54cf
2021-07-23Merge SP1A.210715.002Scott Lobdell
Change-Id: I65e2b7db097927b87c9c4023015c754033c62086
2021-07-22Reject non-staged APEX install if there is staged install of same APEXNikita Ioffe
There is a interesting interaction between staged and non-staged installs of the same APEX. Let's say an installer staged v1 -> v2 APEX update, and then does a non-staged update to v3. After device is rebooted, apexd will apply the staged v1 -> v2 session, silently downgrading an APEX from v3. For apks, this problem is solved by storing an expected version. When an APK session is being applied during boot, Package Manager will check if the currently installed version is equal to the expected one stored in the staged session. If they mismatch, an install is failed. Unfortunately, implementing the same logic in apexd will require a non-trivial refactoring which is too late to do in S. Instead we are just going to fail the non-staged installation. Test: atest StagedInstallInternalTest Bug: 187864524 Change-Id: I9000f40cede9a324a5059a09deb8eb5be13b21f9
2021-07-21Restrict what APEXes different installers can updateNikita Ioffe
* Mainline APEXes can only be updated by a modulesInstaller (an entry in whitelisted-staged-installer.xml with isModulesInstaller="true") * The whitelisted-staged-installer.xml file can have only one entry with isModulesInstaller="true" * Vendor APEXes can only be updated by an installer defined in the corresponding entry in vendor-apex-allowlist.xml. BYPASS_INCLUSIVE_LANGUAGE_REASON=existing occurrences Test: atest StagedInstallInternalTest Test: atest GtsStagedInstallHostTestCases Test: atest CtsRollbackManagerHostTestCases Test: atest CtsStagedInstallHostTestCases Bug: 190802380 Change-Id: I729abb5153df079fb6885016a4b41d0acc827e3c
2021-07-21Set TRANSPORT_PRIMARY for VCN NetworkOffers and NetworkAgentsBenedict Wong
This change sets TRANSPORT_PRIMARY for all NetworkScore objects passed to ConnectivityService by the VCN. Without this patch, a VCN in safe mode will never get any NetworkRequests, since the new Policy-based NetworkRanker always prioritizes a existing satisfier of a network, regardless of score. However, a higher-priority policy check ensures that a TRANSPORT_PRIMARY request is used if it exists. This changes the VCN to utilize that functionality. Bug: 194122634 Test: atest FrameworksVcnTests Original-Change: https://android-review.googlesource.com/1772025 Merged-In: I3a298a6c4c594c6e224f3f05764614802c00e9b0 Change-Id: I3a298a6c4c594c6e224f3f05764614802c00e9b0
2021-07-20Merge "Test apexd behaves correctly when not in fs-checkpoint mode" into sc-devMohammad Samiul Islam
2021-07-19Test apexd behaves correctly when not in fs-checkpoint modeSamiul Islam
This CL contains two tests: 1) When fs-checkpoint-mode is false, but fs-rollback-mode is true 2) When both modes are false Bug: 193648282 Test: atest StagedInstallInternalTest Change-Id: I9c96296343a7f39a65de9e06e8a07d765f832044
2021-07-17Merge "Ensure VcnGatewayConnection#isQuitting never gets unset after being ↵Benedict Wong
set" into sc-dev
2021-07-16Ensure VcnGatewayConnection#isQuitting never gets unset after being setBenedict Wong
This change ensures that the VcnGatewayConnection can never abort a quitting command; specifically, if a non-quitting disconnect request is processed after a quitting disconnect request, the isQuitting value MUST continue to stay set (as true). Failure to OR the values results in orphaned VcnGatewayConnection(s), and the VCN network thrashing. Additionally reduce verbosity of local logs, to ensure it better captures failures and logWtf(s) Bug: 192776413 Test: atest FrameworksVcnTests Original-Change: https://android-review.googlesource.com/1768623 Merged-In: Iec8dae701838794261957609bae4e270eaa9cdc7 Change-Id: Iec8dae701838794261957609bae4e270eaa9cdc7
2021-07-16Limit VCNs to one running at a given timeBenedict Wong
This change ensures that there is only ever one VCN running at a given point in time, and that if the device has switched to using a subscription in a different subscription group, the VCN will immediately tear down. This ensures that when on a DSDS device, when the VCN-enabled subscription is not the default/active subscription, the other subscription's network will never be outscored by the VCN, and thus get torn down. Bug: 190761448 Test: atest FrameworksVcnTests Test: Manual testing to ensure common functionality Original-Change: https://android-review.googlesource.com/1767050 Merged-In: I8031fab7502880d38420058451df41f47567c458 Change-Id: I8031fab7502880d38420058451df41f47567c458
2021-07-14Merge SP1A.210709.002Haamed Gheibi
Change-Id: I4610885d5d770d858895057cdd9fea387a5e33dd
2021-07-12Fix PackageManager query API's related to rebootless APEX updatesNikita Ioffe
There were two bugs: 1. In case of the first update, ApexManager removed information about pre-installed version of the APEX. 2. After an update, getPackageInfo cache wasn't invalidated, which resulted in getPackageInfo returning stale information. Bug: 193085724 Test: atest ApexManagerTest Test: atest StagedInstallInternalTest Change-Id: I6df7b296cd5d83c93524178f1546855747ea6b07
2021-07-09Treat APEX installs as upgradesNikita Ioffe
It's not allowed to install a completely new APEX, hence APEX installations should be treated as upgrades. This change allows holders of INSTALL_PACKAGE_UPDATES permission to silently install APEX upgrades. Bug: 193085724 Bug: 190802380 Test: atest StagedInstallInternalTest Change-Id: Idde7644122eeae6c444e3520f66ab1546ba7fdf6
2021-07-09Merge SP1A.210624.001Scott Lobdell
Change-Id: I96a39cdca22771b76e89caebd53ed52416005092
2021-07-05Merge "Add VCN underlying networks" into sc-devTreeHugger Robot
2021-07-03Merge "Handle multiple users when adding and rechecking overrides." into sc-devTom Natan
2021-07-03Merge "Remove dependency to real NotoColorEmoji.ttf." into sc-devKohsuke Yatoh
2021-07-02Add VCN underlying networksBenedict Wong
This change declares underlying networks for the VCN for the purposes of app data accounting Bug: 190620024 Test: atest FrameworksVcnTests Original-Change: https://android-review.googlesource.com/1750241 Merged-In: Ida2cd5975250604064b0baed00bc7c201ea97c5e Change-Id: Ida2cd5975250604064b0baed00bc7c201ea97c5e
2021-07-02Handle multiple users when adding and rechecking overrides.tomnatan
This is important for multi-user devices that have different applications or versions installed for each user. Bug: 190483583 Test: atest FrameworksServicesTests:CompatConfigTest Test: atest FrameworksServicesTests:OverrideValidatorImplTest Test: atest FrameworksServicesTests:PlatformCompatTest Test: atest PlatformCompatGating:PlatformCompatPermissionsTest Change-Id: I74c061001efbbd9699087e603a580cb2538891ec
2021-07-02Merge "Update ReOpenImeWindowTest to be in gestural nav mode" into sc-devTracy Zhou
2021-06-30Remove dependency to real NotoColorEmoji.ttf.Kohsuke Yatoh
NotoColorEmoji.ttf has 'by-exception-only' license and should not have been depended by vts. This CL swaps it with a fake NotoColorEmoji.ttf font. testdata/NotoColorEmoji.ttx is based on cts/tests/tests/text/assets/fonts/samplefont.ttx Bug: 191914223 Test: atest UpdatableSystemFontTest Change-Id: If5f57471b492cae1eb35f6d4a4ac0054270b23a3
2021-06-30Merge "Add INTERACT_ACROSS_USERS_FULL to PlatformCompatChangeRule" into sc-devTom Natan
2021-06-30Add INTERACT_ACROSS_USERS_FULL to PlatformCompatChangeRuletomnatan
Fix: 192123697 Test: atest CtsWindowManagerDeviceTestCases:CompatChangeTests Change-Id: I6814db76a9020a6e18995a2949646afea0ed47fc
2021-06-29Update ReOpenImeWindowTest to be in gestural nav modeTracy Zhou
- and update some test assumptions accordingly (live tile) Bug: 185934639 Test: ReOpenImeWindowTest Change-Id: If6f40dce174bef5ccc3c3731764607a5826b4762
2021-06-28Merge "Move IoUtils#deleteContents from CorePlatformApi set to framework" ↵TreeHugger Robot
into sc-dev
2021-06-26Merge "Fix dangling NetworkAgent" into sc-devTreeHugger Robot
2021-06-25Fix dangling NetworkAgentBenedict Wong
This change fixes the potential for a networkAgent to be left dangling, due to a situation where a VcnGatewayConnection shuts down, but fails to unregister it's NetworkAgent. The root cause was that the NetworkAgent was not unregistered when moving to the DisconnectedState from the RetryTimeoutState, and the new state assumed that there was no NetworkAgent, and thus failed to close it when disconnecting. Thus, this change ensures that the NetworkAgent is closed before moving to the DisconnectedState. Additionally, it adds safety-checks to onQuitting(), ensuring that if all else fails, these fields are cleaned up. Lastly, this change adds the specific gateway reference to facilitate future debugging of issues such as this where there is potential for duplicate networks, or gateway connections. Bug: 191707296 Test: atest FrameworksVcnTests Change-Id: I84cd43a0c136662f5c2d229650f1f5f889e6f144 Merged-In: I84cd43a0c136662f5c2d229650f1f5f889e6f144 (cherry picked from commit 7207a83ca8796ced7e7fc4f7eba2433ecaa2ff0f)
2021-06-24Merge "Update the session object with the error msg from ApexSessionInfo" ↵Mohammad Samiul Islam
into sc-dev
2021-06-24Update the session object with the error msg from ApexSessionInfoSamiul Islam
Now that apexd returns an error message with details about why APEX activation has failed, we can append it to session object's error message. Bug: 178192690 Test: atest StagedInstallInternalTest#testApexActivationFailureIsCapturedInSession Change-Id: Id2d1df7f86ca85b044cfa15990eae548a176882b
2021-06-23Include IkeTunnelConnectionParams in #hashCode and #equalsYan Yan
This commit includes IkeTunnelConnectionParams in VcnGatewayConnectionConfig#hashCode and VcnGatewayConnectionConfig#equals. This commit fixes the issue that VcnGatewayConnection was not being restarted as expected. Bug: 191317512 Test: atest FrameworksVcnTests (new tests added) Test: atest CtsVcnTestCases Original-Change: https://android-review.googlesource.com/1742657 Merged-In: I70182f9b645e55eced1e0a048a1bd87778c1c0f6 Change-Id: I70182f9b645e55eced1e0a048a1bd87778c1c0f6
2021-06-22Merge "Update serialization of WallpaperColors" into sc-devJames O'Leary
2021-06-21Merge SP1A.210616.001Daniel Norman
Change-Id: I9acdc955f698dbebb8fad19cfd5cb71fcdd27b45
2021-06-18Update serialization of WallpaperColorsSantiago Etchebehere
Do not assume mMainColors and mAllColors contain the same color since recent changes modified that. Update equals and hashCode as well to account for this. Bug: 191391779 Bug: 191374703 Test: atest WallpaperColorsTest Change-Id: I8c7775055a2360ec3a91cee76a42d14a143ec7fb
2021-06-18Update Mobile Data State on subscription changes.Cody Kesting
This CL ensures that Vcn instances refresh their mobile data state when they receive a new TelephonySubscriptionSnapshot. A new snapshot may contain different subId -> subGroup mappings, which can affect whether a Vcn instance's subGroup has mobile data enabled or not. This in turn can change which VcnGatewayConnections are brought up by the Vcn. Bug: 191394092 Test: atest FrameworksVcnTests CtsVcnTestCases Original-Change: https://android-review.googlesource.com/1740514 Merged-In: Ib59b4ed7900a177b17ed4a6e197e271b10937f65 Change-Id: Ib59b4ed7900a177b17ed4a6e197e271b10937f65
2021-06-17Merge SP1A.210604.001Brian Orr
Change-Id: I5200ee05285ae422d5e9c1c00f45709a5d6188be
2021-06-17Move IoUtils#deleteContents from CorePlatformApi set to frameworkNikita Iashchenko
As a part of internal core libraries cleanup move usages of IoUtils#deleteContents from CorePlatformApi set to framework. Bug: 154796679 Test: m update-api Merged-In: If7037029026b6753ab64be09aa52c40e04d5c7b1 Change-Id: If7037029026b6753ab64be09aa52c40e04d5c7b1
2021-06-15Merge "Allow MANAGE_TEST_NETWORKS to register and get VCN policies." into sc-devTreeHugger Robot
2021-06-14Merge "Read font attributes from buffer." into sc-devKohsuke Yatoh
2021-06-14Allow MANAGE_TEST_NETWORKS to register and get VCN policies.Cody Kesting
This CL updates VcnManagementService to allow permission MANAGE_TEST_NETWORKS to register/unregister VCN policy listers as well as apply VCN policies. Previously, only permission NETWORK_FACTORY was allowed to perform this operations. Bug: 189125789 Test: atest FrameworksVcnTests CtsVcnTestCases Change-Id: I6ad3a58f4ef87d931917fbd772a810af81b27da1 Merged-In: I6ad3a58f4ef87d931917fbd772a810af81b27da1 (cherry picked from commit f658c7f394adc2af459afd60c8a6dbe7e20c0584)
2021-06-14Merge "Move tests with reboot to @LargetTest suite" into sc-devTreeHugger Robot
2021-06-11Move tests with reboot to @LargetTest suiteSamiul Islam
Bug: 190759634 Test: atest StagedInstallInternalTest Change-Id: I903052f7178a6800c29164012b2e03aef357c982
2021-06-11Improve picture capture debug pathJohn Reck
* Fixes hardware bitmap capture * Fixes mutable bitmap capture (no flickering) * Adds basic single-frame LRU cache to avoid repeated readbacks of GPU resources * Does up-front readback of GPU resources * Moves serialization off RenderThread again thanks to up-front readback avoiding needing GPU access off-thread * Reduces RAM usage & improves performance by serializing directly to output stream instead of first copying to a byte[] Bug: 174223722 Test: PictureCaptureDemo mirrors the content Change-Id: If7ec208b61d5b917e82087cc312880fc5a38c943
2021-06-10Read font attributes from buffer.Kohsuke Yatoh
minikin::Font::typeface() is expensive because it will open the font file. Font attribute getters should avoid calling it. Bug: 188201287 Test: atest UpdatableSystemFontTest Test: atest CtsGraphicsTestCases:FontTest Test: atest CtsGraphicsTestCases:SystemFontsTest Change-Id: Ic8554f6dfacbe27ddfea6b375633c96bced2cc09
2021-06-07Merge "Remove underlying network caps" into sc-devBenedict Wong
2021-06-07Merge "Promote stable flicker tests (ime)" into sc-devNataniel Borges