Commit Graph

11382 Commits

Author SHA1 Message Date
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
bfeb5980f2 Include IkeTunnelConnectionParams in #hashCode and #equals
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-23 23:38:16 +00:00
James O'Leary
6aad992ea5 Merge "Update serialization of WallpaperColors" into sc-dev 2021-06-22 02:48:57 +00:00
Santiago Etchebehere
3af6019b81 Update serialization of WallpaperColors
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-18 16:56:30 -07:00
Cody Kesting
1dba7e09df Update Mobile Data State on subscription changes.
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-18 17:35:48 +00:00
TreeHugger Robot
263fe8886e Merge "Allow MANAGE_TEST_NETWORKS to register and get VCN policies." into sc-dev 2021-06-15 00:41:54 +00:00
Kohsuke Yatoh
7adad678e0 Merge "Read font attributes from buffer." into sc-dev 2021-06-14 20:53:59 +00:00
Cody Kesting
5a1961ac48 Allow MANAGE_TEST_NETWORKS to register and get VCN policies.
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 f658c7f394)
2021-06-14 16:17:03 +00:00
TreeHugger Robot
506284e2f9 Merge "Move tests with reboot to @LargetTest suite" into sc-dev 2021-06-14 06:12:36 +00:00
Samiul Islam
23e0755152 Move tests with reboot to @LargetTest suite
Bug: 190759634
Test: atest StagedInstallInternalTest
Change-Id: I903052f7178a6800c29164012b2e03aef357c982
2021-06-11 11:47:24 +00:00
John Reck
760051854e Improve picture capture debug path
* 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-11 01:52:14 +00:00
Kohsuke Yatoh
a3f5f22cbc Read font attributes from buffer.
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-10 21:02:24 +00:00
Benedict Wong
c52419c68a Merge "Remove underlying network caps" into sc-dev 2021-06-07 17:24:45 +00:00
Nataniel Borges
a50b03521f Merge "Promote stable flicker tests (ime)" into sc-dev 2021-06-07 12:56:31 +00:00
Nataniel Borges
128a9fdbcb Merge "Promote stable flicker tests (app launch)" into sc-dev 2021-06-07 12:56:23 +00:00
Nataniel Borges
9ac4eb345a Merge "Promote stable flicker tests (rotation)" into sc-dev 2021-06-04 15:32:49 +00:00
Nataniel Borges
fb8237605a Promote stable flicker tests (ime)
The tests have been stable since last week when the underlying bugs were closed.

Bug: 185401242
Bug: 185400889
Test: atest FlickerTests:com.android.server.wm.flicker.ime
Change-Id: I8cea435a9fa295626c45d9d11549c1a4d4f4e63b
2021-06-04 17:05:11 +02:00
Nataniel Borges
b77a5fb78a Promote stable flicker tests (app launch)
The tests have been stable since last week when the underlying bugs were closed.

Bug: 185401242
Bug: 185400889
Test: atest FlickerTests:com.android.server.wm.flicker.launch
Change-Id: I8ef26ac7144766f7269bef2589842e07d098efc3
2021-06-04 16:26:32 +02:00
Nataniel Borges
f420024bf5 Promote stable flicker tests (rotation)
The tests have been stable since last weeks when the underlying bugs were closed.

Bug: 185401242
Bug: 185400889
Test: atest FlickerTests:com.android.server.wm.flicker.rotation
Change-Id: I4aa13016f214f99bcff5adcd98e71096eacada2d
2021-06-04 16:04:56 +02:00
Nataniel Borges
b94ab5c28f Promote stable flicker tests (app close)
The tests have been stable since last weeks when the underlying bugs were closed.

Bug: 185401242
Bug: 185400889
Test: atest FlickerTests:com.android.server.wm.flicker
Change-Id: I6c99e84f0da01c122d8ff6a28eebbdb9bcc6582a
2021-06-04 15:23:54 +02:00
Benedict Wong
4ab47decd6 Remove underlying network caps
This change removes unused fields in the persistable bundle and
VcnGatewayConnectionConfig classes to ensure future flexibility.

Bug: 182219992
Test: atest FrameworksVcnTests
Change-Id: Ic2fec8a87fd19a1780333c61759c4092598d349e
Merged-In: Ic2fec8a87fd19a1780333c61759c4092598d349e
(cherry picked from commit 1f06b95c62)
2021-05-25 23:17:58 +00:00
Benedict Wong
211f7f9e20 Merge changes I5ce7fe05,I2d5dc5b9,Ibcc4bdc0 into sc-dev
* changes:
  Add additional dump information for UnderlyingNetworkTracker
  Copy up/downstream bandwidth and TCP buffer sizes from underlying
  Prevent concurrent modification exceptions in VcnManagementService
2021-05-25 16:43:51 +00:00
Benedict Wong
9d92b77ad7 Copy up/downstream bandwidth and TCP buffer sizes from underlying
This change copies the relevant pieces of information used to tune the
system for performance

Bug: 188943592
Test: atest FrameworksVcnTests
Change-Id: I2d5dc5b9000fa9d0da9d34772b3704110694c526
2021-05-24 17:23:04 -07:00
TreeHugger Robot
608a439238 Merge "Split flicker tests into groups" into sc-dev 2021-05-22 09:44:36 +00:00
Nataniel Borges
8aaaeea849 Split flicker tests into groups
The flicker test suite grew and now trigger a treehuger SLO violation. To address this problem create different groups for different tests using: --module-arg <TEST SUITE>:include-annotation:<GROUP>

Where:
   <TEST SUITE> = FlickerTests or WMShellFlickerTests
   <GROUP> = com.android.server.wm.flicker.annotation.Group1 or com.android.server.wm.flicker.annotation.Group2 or com.android.server.wm.flicker.annotation.Group3

For example:

1) to run only tests in the first group in flicker use: `--module-arg FlickerTests:include-annotation:com.android.server.wm.flicker.annotation.Group1`

2) to run only the third group of tests from wmshell flicker: ``--module-arg FlickerTests:include-annotation:com.android.server.wm.flicker.annotation.Group3`

Bug: 180620475
Test: atest FlickerTests WMShellFlickerTests with the respective parameters
Change-Id: I82f668713ba262bafe2758e2c618bfc060cc2c8a
2021-05-20 09:36:44 +02:00
Chris Wailes
5d8c1369c1 Make BackgroundDexOpt aware of thermal state
This change makes the BackgroundDexOpt service consider the thermal
state of the device before running.  If the device is in a moderate thermal
state or worse background dexopt will not run.

Bug: 165935246
Bug: 181795682
Test: Treehugger && atest BackgroundDexOptServiceIntegrationTests
Change-Id: Ie5ccbab7aa6d414241780136407f397d326340bf
2021-05-19 16:41:25 +00:00
Siarhei Vishniakou
234adf7cb2 Merge "Check mInputEventReceiver before sending timeline -- 2" into sc-dev 2021-05-17 17:35:24 +00:00
Benedict Wong
e0ee346120 Merge "Make VcnTransportInfo unparcel to null if no data contained" into sc-dev 2021-05-14 23:00:21 +00:00
Benedict Wong
d9695aced3 Make VcnTransportInfo unparcel to null if no data contained
When VcnTransportInfo is redacted, it contains no useful information. In
order to preserve the abstraction, the VcnTransportInfo should be
unparcelled to null


Bug: 8675309
Test: atest VcnTransportInfoTest
Change-Id: Ia9dbb9f259027acc74004eb1207e0a13cea56088
2021-05-14 22:53:51 +00:00
TreeHugger Robot
d285109ef2 Merge "Close FDs even when throwing SecurityException." into sc-dev 2021-05-14 16:40:14 +00:00
Kohsuke Yatoh
d3275de48e Close FDs even when throwing SecurityException.
Bug: 187879195
Test: atest UpdatableSystemFontTest
Change-Id: I34d04f152210fe2f89f4d96e920978dde21d06c8
2021-05-13 23:08:33 -07:00
Benedict Wong
d9c05c23e6 Merge "Custom network selection" am: bc3638ce5d am: b3f0495383 am: 2a86eae65e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1706226

Change-Id: Icdf319d564e4eab468d9d4e722716a2ef7d2c3cd
2021-05-14 05:25:38 +00:00
Benedict Wong
9028cac4fe Custom network selection
This change adds a basic prioritization framework in the VCN, and signal
strength thresholds for WiFi.

Bug: 188104094
Test: atest FrameworksVcnTests
Change-Id: Iee4e3dbecf1102ddc127a8c8daf08a00b6fccbbd
2021-05-13 18:57:05 -07:00
Kohsuke Yatoh
048d4b1788 Close FDs / mmap handles promptly.
Currently we rely on GC to close them.
This may cause system_server crash depending on the timing of GC.

Bug: 187879195
Test: atest UpdatableSystemFontTest
Change-Id: I09ac3f349e5ec100e4164320cbf27977474cc4bb
2021-05-13 16:23:55 +00:00
Lorenzo Colitti
34748be150 Make VcnTransportInfoTest pass on AOSP.
AOSP contains the core networking redaction changes, but not the
wifi redaction changes, so the tests that depend on wifi S
behaviour will not pass on AOSP.

Fix testApplicableRedactions by checking that the applicable
redactions are the same ones as returned by the underlying
WifiInfo object.

Fix testMakeCopyRedactForAccessFineLocation by testing the wifi
redaction code iff Build.VERSION.SDK_INT is S or later. This is
different from SdkLevel.isAtLeastS, because the latter returns
true in AOSP.

Bug: 183938194
Test: atest VcnTransportInfoTest
Change-Id: Ia5bc896c92be19f570638f8051492e0f2d7342f9
2021-05-13 20:24:20 +09:00
Lorenzo Colitti
1ad18702f1 Immediately redact VcnTransportInfo.
Redaction of NetworkCapabilities is changing from redacting at
parcel time to redacting immediately when makeCopy() is called.
Update VcnTransportInfo redaction accordingly.

Bug: 183938194
Test: atest VcnTransportInfoTest
Change-Id: I0c9406f426b66fd36b47d11799955def531c16ba
2021-05-13 20:24:20 +09:00
Remi NGUYEN VAN
1665a3d634 Move net unit tests to packages/Connectivity
Move the tests together with packages/Connectivity code, so both can be
moved to packages/modules/Connectivity together.

Also reorganize unit tests in a unit/ directory, as other tests
(integration/, common/ etc.) have been added in tests/net since they
were created. This makes the directory structure consistent.

Test: atest FrameworksNetTests
Bug: 187814163
Merged-In: I254ffd1c08ec058d594b4ea55cbae5505f8497cc

Change-Id: I254ffd1c08ec058d594b4ea55cbae5505f8497cc
2021-05-13 08:30:33 +00:00
Remi NGUYEN VAN
007a886baf Move net unit tests to packages/Connectivity
Move the tests together with packages/Connectivity code, so both can be
moved to packages/modules/Connectivity together.

Also reorganize unit tests in a unit/ directory, as other tests
(integration/, common/ etc.) have been added in tests/net since they
were created. This makes the directory structure consistent.

Test: atest FrameworksNetTests
Bug: 187814163
Ignore-AOSP-First: needs per-branch move for merge conflicts
Change-Id: I254ffd1c08ec058d594b4ea55cbae5505f8497cc
2021-05-13 05:55:44 +00:00
Ken Chen
92bc335785 Merge "Add testVpnTypesEqual to verify consistency" am: 785dc4871c am: 3ae939569e am: 233682e675
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1705385

Change-Id: I53d58c5b2277ba2d88a848ed3e6d6269b4b886b3
2021-05-13 03:00:17 +00:00
Ken Chen
2216da85aa Merge "Switch from networkCreate[Physical/Vpn] to networkCreate" am: c9d5cd9fbc am: 62258932ff am: a4d53bfa6d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1669648

Change-Id: I3475e674c3914c4c61fd0a4246c9ee3e7e02c4fb
2021-05-13 02:59:30 +00:00
Ken Chen
785dc4871c Merge "Add testVpnTypesEqual to verify consistency" 2021-05-13 01:22:08 +00:00
Ken Chen
c9d5cd9fbc Merge "Switch from networkCreate[Physical/Vpn] to networkCreate" 2021-05-13 01:20:39 +00:00
Cody Kesting
be6088d11c Merge changes I4b135749,If4fcaa52 am: 576dad4673 am: cd4e6ae6d6 am: 5cdc27d2ac
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1704175

Change-Id: I7d636497dbc26008e659495e4236f161c90599ab
2021-05-12 23:40:05 +00:00
Cody Kesting
576dad4673 Merge changes I4b135749,If4fcaa52
* changes:
  Restructure Test Network requests for VCN connections.
  Correct variable name in VcnManagementService.
2021-05-12 22:55:17 +00:00
Lorenzo Colitti
79d74a6448 Merge changes from topic "transportinfo-explicit-redaction" into sc-dev
* changes:
  Immediately redact VcnTransportInfo.
  Do not automatically redact TransportInfo objects.
2021-05-12 22:46:36 +00:00
Treehugger Robot
1761a873cb Merge changes Icb59b15d,I6fc6a266,I5cc340e5,I94db52a8 am: b79dcb24d0 am: 5804521e8c am: 32c2d34383
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1700309

Change-Id: Ifab0469fb2687cae7b361b5009abe152a35048c5
2021-05-12 17:16:19 +00:00
Lucas Lin
1742bf024c Merge "Update PrivateDnsMode from StringDef to IntDef" 2021-05-12 17:09:50 +00:00
Treehugger Robot
b79dcb24d0 Merge changes Icb59b15d,I6fc6a266,I5cc340e5,I94db52a8
* changes:
  Request Test Networks for VCNs when in Test Mode.
  Specify if a VCN is in 'test-mode' in VcnContext.
  Create test-mode for VcnConfig.
  Require MOBIKE for IkeSessionParams in VCN configs.
2021-05-12 16:21:25 +00:00
Paul Hu
47d38bc76c Merge "Add MATCH_ANY_USER flag to PackageInfo queries" am: 68301eb7cb am: 2b0351ce1e am: 168172c2c0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1689207

Change-Id: Ie3dd72aa4b8166198884f348f59c77befc229dc0
2021-05-12 10:19:57 +00:00