Commit Graph

11434 Commits

Author SHA1 Message Date
Evan Rosky
5d4046125b Merge "Fix ReOpenImeWindowTest flicker test for shell transitions" into sc-v2-dev 2021-09-22 20:09:25 +00:00
Benedict Wong
ada726e26d Merge "Always trigger safe mode callbacks" into sc-qpr1-dev am: 24ad5af4f5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15818048

Change-Id: Ieed9c2e04e586ddc73d66ef260d8b4a3a1d97bfa
2021-09-17 13:04:35 +00:00
Evan Rosky
b685ccae88 Fix ReOpenImeWindowTest flicker test for shell transitions
In this case, legacy transitions is incorrect because it was
written before live-tiles and, due to some quirk, still manages
to pass the now-incorrect test. However, the test is technically
wrong and thus shell transitions doesn't pass. This CL fixes the
tests when shell transitions is enabled.

Specifically, there are a few tests explicitly called "X is ALWAYS
visible" which should test that the window in question remains
visible throughout the test. However, the test was adjusted to
test that the windows go away and come back. With shell transitions
the windows behave correctly, so we can remove the adjustments.

Bug: 193565597
Test: atest ReOpenImeWindowTest
Change-Id: I33c5b6327e5b5762958b66ff20d5fe67b9566c10
Merged-In: I33c5b6327e5b5762958b66ff20d5fe67b9566c10
2021-09-15 20:22:10 +00:00
Benedict Wong
5f78eff397 Always trigger safe mode callbacks
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 7cf35e7bd9)
2021-09-13 20:35:48 +00:00
Nataniel Borges
c8287a930f [DO NOT MERGE] Sync flicker from master to sc-v2
Flicker on master diverged form sc-v2, to make it easier to debug
flicker issues on sc-v2, push the current version of flicker into sc-v2

Test: atest FlickerTests WMShellFlickerTests
Bug: 188792659
Change-Id: I1c832bf32214b12ba4b708bccfc95cf259324844
2021-09-01 12:06:21 +00:00
TreeHugger Robot
0b7f506aa9 Merge "[DO NOT MERGE] Full - Compatibilize winscope with master" into sc-v2-dev 2021-07-30 14:47:23 +00:00
Benedict Wong
66657e13ee Merge "Set TRANSPORT_PRIMARY for VCN NetworkOffers and NetworkAgents" into sc-dev am: 9eee7d3f29
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15344043

Change-Id: I95583dcea69d627eefc6074f50efd0f152d7b7d6
2021-07-29 19:13:30 +00:00
Nataniel Borges
3dab1eaeec [DO NOT MERGE] Full - Compatibilize winscope with master
Bug: 194813677
Test: none
Change-Id: I88e0e6d5b75ae3511491d6711279b951b3d9c761
2021-07-28 07:23:14 +00:00
Benedict Wong
9eee7d3f29 Merge "Set TRANSPORT_PRIMARY for VCN NetworkOffers and NetworkAgents" into sc-dev 2021-07-28 03:37:47 +00:00
Nikita Ioffe
6fc998c833 Merge changes from topic "apex-installers-restriction" into sc-dev am: e8b129351c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15347597

Change-Id: I73ec1d4f70afe3ac8f9f25cdeed64b05943b92a3
2021-07-22 16:56:07 +00:00
Nikita Ioffe
85af284b2f Restrict what APEXes different installers can update am: e501fd8379
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15331871

Change-Id: I06443f46326c1a877d7245ba913e0261432db352
2021-07-22 16:56:05 +00:00
Nikita Ioffe
db9892300e Reject non-staged APEX install if there is staged install of same APEX
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-22 12:05:41 +01:00
Nikita Ioffe
e501fd8379 Restrict what APEXes different installers can update
* 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-21 16:44:42 +01:00
Benedict Wong
8d35744f98 Set TRANSPORT_PRIMARY for VCN NetworkOffers and NetworkAgents
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-21 02:11:01 +00:00
Mohammad Samiul Islam
7e0cbf4d28 Merge "Test apexd behaves correctly when not in fs-checkpoint mode" into sc-dev am: b713ec62bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15302099

Change-Id: I25a8ee1135352b2a5ccc201e7652011782a35991
2021-07-20 18:13:52 +00:00
Mohammad Samiul Islam
b713ec62bb Merge "Test apexd behaves correctly when not in fs-checkpoint mode" into sc-dev 2021-07-20 18:02:29 +00:00
Samiul Islam
6d9107a468 Test apexd behaves correctly when not in fs-checkpoint mode
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-19 13:54:57 +01:00
Benedict Wong
ff3a9bf309 Merge "Ensure VcnGatewayConnection#isQuitting never gets unset after being set" into sc-dev am: 0df66631c0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15316004

Change-Id: I151b67855b705197cb832caa32c91cc746569b56
2021-07-17 03:15:31 +00:00
Benedict Wong
0df66631c0 Merge "Ensure VcnGatewayConnection#isQuitting never gets unset after being set" into sc-dev 2021-07-17 02:52:32 +00:00
Benedict Wong
a5565eb79c Merge "Limit VCNs to one running at a given time" into sc-dev am: dd6c887985
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15315835

Change-Id: I9c5c265402ca7b78cf618c61c0d24576cc89260b
2021-07-16 23:40:34 +00:00
Benedict Wong
29b3fdd6b6 Ensure VcnGatewayConnection#isQuitting never gets unset after being set
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-16 22:30:25 +00:00
Benedict Wong
e53cbf4df3 Limit VCNs to one running at a given time
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-16 22:03:37 +00:00
Nikita Ioffe
99ca20251e Merge "Fix PackageManager query API's related to rebootless APEX updates" into sc-dev am: 09f8e5de00
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15245533

Change-Id: Id4e25ee06ccdee239405ef7e1e8878198aeaac61
2021-07-12 19:37:07 +00:00
Nikita Ioffe
3e62b8f748 Fix PackageManager query API's related to rebootless APEX updates
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-12 13:51:11 +00:00
Nikita Ioffe
a4c28b230b Merge "Treat APEX installs as upgrades" into sc-dev am: bdf97e12ea
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15245531

Change-Id: Ifd39ecd7a84b8e66676a6ea71bf903fe8d18ebbf
2021-07-12 13:46:16 +00:00
Nikita Ioffe
24e3ed6e78 Treat APEX installs as upgrades
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-09 18:25:57 +01:00
TreeHugger Robot
3235aa7b56 Merge "Add VCN underlying networks" into sc-dev am: 053213b1cb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15191631

Change-Id: I7c7daeee0120ec92bf08a3c7d8e0ae2fc529ae7b
2021-07-05 01:40:43 +00:00
TreeHugger Robot
053213b1cb Merge "Add VCN underlying networks" into sc-dev 2021-07-05 01:30:13 +00:00
Tom Natan
f7149f15f6 Merge "Handle multiple users when adding and rechecking overrides." into sc-dev am: b295cc900b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15080634

Change-Id: I8d1ea625ad7e9f7831d803f00dc8cd65290ac82d
2021-07-03 12:08:49 +00:00
Tom Natan
b295cc900b Merge "Handle multiple users when adding and rechecking overrides." into sc-dev 2021-07-03 11:56:43 +00:00
Kohsuke Yatoh
17cd93a447 Merge "Remove dependency to real NotoColorEmoji.ttf." into sc-dev am: 0bff2fa4b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15114229

Change-Id: I9cbf52de6a9863e0984a0529fca90c4857497ca5
2021-07-03 01:45:39 +00:00
Kohsuke Yatoh
0bff2fa4b2 Merge "Remove dependency to real NotoColorEmoji.ttf." into sc-dev 2021-07-03 01:29:45 +00:00
Benedict Wong
d926f329e1 Add VCN underlying networks
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-02 19:30:19 +00:00
tomnatan
4d859f35bc Handle multiple users when adding and rechecking overrides.
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-02 12:25:59 +00:00
Tracy Zhou
c0f6b90eaf Merge "Update ReOpenImeWindowTest to be in gestural nav mode" into sc-dev am: 6949bcfce7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15152030

Change-Id: Ic04940751ca0f9312544cff0677687324457a4cf
2021-07-02 01:22:38 +00:00
Tracy Zhou
6949bcfce7 Merge "Update ReOpenImeWindowTest to be in gestural nav mode" into sc-dev 2021-07-02 01:04:04 +00:00
Kohsuke Yatoh
5ef0ea1d84 Remove dependency to real NotoColorEmoji.ttf.
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-30 16:11:01 +00:00
Tom Natan
1ecf837881 Merge "Add INTERACT_ACROSS_USERS_FULL to PlatformCompatChangeRule" into sc-dev am: e54680b389
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15143495

Change-Id: Id57cf00bdb957c46ccf64633fc60ae43bc167233
2021-06-30 14:49:10 +00:00
Tom Natan
e54680b389 Merge "Add INTERACT_ACROSS_USERS_FULL to PlatformCompatChangeRule" into sc-dev 2021-06-30 14:36:35 +00:00
tomnatan
03c15770ed Add INTERACT_ACROSS_USERS_FULL to PlatformCompatChangeRule
Fix: 192123697
Test: atest CtsWindowManagerDeviceTestCases:CompatChangeTests
Change-Id: I6814db76a9020a6e18995a2949646afea0ed47fc
2021-06-30 09:47:36 +00:00
Tracy Zhou
626522d77f Update ReOpenImeWindowTest to be in gestural nav mode
- and update some test assumptions accordingly (live tile)

Bug: 185934639
Test: ReOpenImeWindowTest
Change-Id: If6f40dce174bef5ccc3c3731764607a5826b4762
2021-06-29 23:09:07 -07:00
TreeHugger Robot
95d5266d81 Merge "Move IoUtils#deleteContents from CorePlatformApi set to framework" into sc-dev am: 99503ca1c0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15016191

Change-Id: I439de9e49cb636eae7ccca5ccd3e8efebd574574
2021-06-28 20:37:54 +00:00
TreeHugger Robot
99503ca1c0 Merge "Move IoUtils#deleteContents from CorePlatformApi set to framework" into sc-dev 2021-06-28 20:24:34 +00:00
TreeHugger Robot
50551f73da Merge "Fix dangling NetworkAgent" into sc-dev am: 465da826b1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15114387

Change-Id: I636bd6571f61fee9f54568997a1e7db4169ed1ac
2021-06-26 00:24:26 +00:00
TreeHugger Robot
465da826b1 Merge "Fix dangling NetworkAgent" into sc-dev 2021-06-26 00:12:01 +00:00
Benedict Wong
f07cc3718a Fix dangling NetworkAgent
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 7207a83ca8)
2021-06-25 15:34:22 -07:00
Mohammad Samiul Islam
5e538c7560 Merge "Update the session object with the error msg from ApexSessionInfo" into sc-dev am: d8244c55fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14840459

Change-Id: I20e2d8aed90a223f44338da6a83551738b905f85
2021-06-24 13:18:14 +00:00
Mohammad Samiul Islam
d8244c55fd Merge "Update the session object with the error msg from ApexSessionInfo" into sc-dev 2021-06-24 13:04:13 +00:00
Samiul Islam
6473c8ea19 Update the session object with the error msg from ApexSessionInfo
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-24 11:24:39 +01:00
Yan Yan
55c4eebc4a Merge "Include IkeTunnelConnectionParams in #hashCode and #equals" into sc-dev am: 388e0cba03
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15083856

Change-Id: I181cc99d4d5ca61e13867e5c640697eaf0ac15a1
2021-06-24 02:38:22 +00:00