Commit Graph

8144 Commits

Author SHA1 Message Date
Winson Chiu
bde104f8be Merge changes Id7d1ff26,Id53a2e65 into rvc-dev
* changes:
  Add am compat enable/disable/reset test for not installed app
  Gate stricter manifest enforcement on targetSdk R
2020-04-01 05:44:35 +00:00
Winson
db4355fed9 Add am compat enable/disable/reset test for not installed app
Should also cover installed apps, since this mocks at the
ApplicationInfo level.

The not installed behavior is used during package parsing to
pre-disable validation errors for an app that may not yet be
compliant with new targetSdk gated rules.

Bug: 152416067

Test: atest com.android.tests.gating.PlatformCompatCommandNotInstalledTest

Change-Id: Id7d1ff26f40626308d9b2e7c6cea60bce9b7f50f
2020-04-01 05:44:12 +00:00
JW Wang
1d68911a9d Merge changes I10355143,I85adb8c3 into rvc-dev
* changes:
  Run expiration when rollback lifetime is changed. DO NOT MERGE
  Add logs for debugging
2020-04-01 02:49:40 +00:00
Cody Kesting
5add803be8 Merge changes I2431a6d2,I9096969a,I748bd9de,Ia5387ca2,I803bdec8, ... into rvc-dev
* changes:
  Update CS helper for clearing NetworkCapabilities UIDs.
  Simplify unregister logic for Connectivity Diagnostics callbacks.
  Clarify comments for Connectivity Diagnostics reports.
  Sort administrator UIDs for NetworkCapabilities.
  Add combine() and equals() for NetworkCapabilities admin UIDs.
  Use IBinder as key for ConnectivityDiagnostics storage in CS.
  Decrement networkRequestPerUid when callbacks are unregistered.
  Invoke onConnectivityReport on registering ConnectivityDiagnostics.
2020-04-01 01:13:11 +00:00
Winson Chung
a531f922c9 Merge "Add task organizer based task embedder" into rvc-dev 2020-03-31 20:59:17 +00:00
TreeHugger Robot
38d362ca86 Merge "iorap: AppLaunch - wait for background job to complete." into rvc-dev 2020-03-31 20:24:58 +00:00
Benedict Wong
7df7129b40 Merge changes I97ba5903,Icd80b368 into rvc-dev
* changes:
  Make VpnProfile.maxMtu default value match Ikev2VpnProfile
  Add negotiated DNS servers to VPN config
2020-03-31 16:52:04 +00:00
Benedict Wong
ef5732b053 Merge "Automatically set IPsec tunnel interface as up" into rvc-dev 2020-03-31 16:51:58 +00:00
TreeHugger Robot
758aaeda59 Merge "PmPermissionsTest: Update test expectations for getPackageSizeInfo" into rvc-dev 2020-03-31 12:46:28 +00:00
JW Wang
9f8407b0aa Run expiration when rollback lifetime is changed. DO NOT MERGE
See b/151890602#comment6 for the detail.

When rollback lifetime is changed, we need to re-schedule the
expiration algorithm so rollbacks can expire at the correct time.

Note we combine #runExpiration and #scheduleExpiration so there is only
one entrance to schedule the expiration algorithm.

See
https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/10899294/1/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java#672
for the rationale.

Bug: 151890602
Test: atest RollbackTest
Change-Id: I10355143dedc0af92e0b2adfedb5f008e160cbb3
2020-03-31 18:52:29 +08:00
Narayan Kamath
6671601d6b PmPermissionsTest: Update test expectations for getPackageSizeInfo
Now unconditionally throws for apps targeting > 0.

Test: atest PmPermissionsTests
Bug: 148316352
Change-Id: Ia24d501257743db22d2f850a5fca933669f0a5ae
2020-03-31 09:11:56 +01:00
Benedict Wong
399c1365c2 Make VpnProfile.maxMtu default value match Ikev2VpnProfile
This change corrects the VpnProfile's maxMtu defaults to match that of
the Ikev2VpnProfile. 1400 is too high as a default, and Settings will
run into an issue here quite often.

Bug: 152573931
Test: FrameworksNetTests passing
Change-Id: I97ba5903b3cc1ed6a21c706ed3d78bd8ecbeee0c
Merged-In: I97ba5903b3cc1ed6a21c706ed3d78bd8ecbeee0c
(cherry picked from commit d0a44f49df)
2020-03-30 22:59:17 -07:00
JW Wang
5b163cfcee Add logs for debugging
See b/151890602#comment4.

If the assumption is true, we will see logs that the rollback for
testappA is exipred happens slightly after the call to #getAvailableRollbacks.

Also move assertions below so the test runs to the end and we have a
better picture for what happened during the test.

(Cherry-picked from eab998a9af)

Bug: 151890602
Test: m
Merged-In: I85adb8c3c5598ef4ce11550b51f22d1ce3c282a6
Change-Id: I85adb8c3c5598ef4ce11550b51f22d1ce3c282a6
2020-03-31 11:01:23 +08:00
Cody Kesting
93c1e656b5 Sort administrator UIDs for NetworkCapabilities.
Administrator UIDs stored in NetworkCapabilities should be sorted. This
allows for easier equals checks and hashCode computation. Additionally,
duplicate UIDs should be prevented.

Bug: 147903575
Test: atest FrameworksNetTests
Change-Id: Ia5387ca2ce7c3fcbd04dc7fbff5266f7bcc71694
Merged-In: Ia5387ca2ce7c3fcbd04dc7fbff5266f7bcc71694
(cherry picked from commit 2091bd9059)
2020-03-30 17:14:44 -07:00
Chalard Jean
981dccab03 Add combine() and equals() for NetworkCapabilities admin UIDs.
NetworkCapabilities#mAdministratorUids should be checked for equality
when combining NetworkCapabilities. Administrator UIDs should also be
included in NetworkCapabilities equals() and hashCode().

Bug: 147903575
Test: FrameworksNetTests
Change-Id: I803bdec80e27ee80d3a39844c5fb7aed584ab07d
Merged-In: I803bdec80e27ee80d3a39844c5fb7aed584ab07d
(cherry picked from commit 5fad8aa761)
2020-03-30 17:14:33 -07:00
Cody Kesting
4600fa52a6 Use IBinder as key for ConnectivityDiagnostics storage in CS.
This change updates ConnectivityService to use IBinder instances as keys
when storing ConnectivityDiagnosticsCallbacks.

When storing ConnectivityDiagnosticsCallbacks in ConnectivityService,
the IConnectivityDiagnsoticsCallback is used as the key for
ConnectivityService.mConnectivityDiagnosticsCallbacks. However,
IConnectivityDiagnosticsCallback instances are received as different
objects. This causes them to produce different hashCode() values, so
attempts to remove an IConnectivityDiagnosticsCallback fail.

Bug: 150867635
Test: atest FrameworksNetTests
Change-Id: Ib99e68d5ae47fa27e12428f9a60a2c1204ac59a2
Merged-In: Ib99e68d5ae47fa27e12428f9a60a2c1204ac59a2
(cherry picked from commit c7c6a4ac12)
2020-03-30 17:14:20 -07:00
Cody Kesting
560eb2655b Invoke onConnectivityReport on registering ConnectivityDiagnostics.
This change updates the behavior for registering
ConnectivityDiagnosticsCallbacks. Now, after a successful register()
call, callbacks will receive cached ConnectivityReports for all
matching, permissioned networks. This allows registrants to be updated
with the network state for their networks without having to wait for the
next network validation.

Bug: 147849853
Test: atest FrameworksNetTests
Change-Id: I924ba8fdcc847f453557021591bde38602fe089c
Merged-In: I924ba8fdcc847f453557021591bde38602fe089c
(cherry picked from commit 95ec0b206b)
2020-03-30 17:13:55 -07:00
Winson Chung
a1f869d10e Add task organizer based task embedder
- Split TaskEmbedder into its current VirtualDisplay implementation
  and an implementation that uses task org to create and manage
  the task
- Use the task org embedder implementation in separate bubble task view
- Skip task org tasks from triggering task resizing
- Add task org callback for back press on task root if requested

Bug: 148977538
Test: atest CtsWindowManagerDeviceTestCases:ActivityViewTest
Test: atest WmTests:TaskOrganizerTests
Change-Id: Id422bb2547197c617f914ed7cf5085e02a1c3fb5
2020-03-30 23:29:08 +00:00
Igor Murashkin
fcbe6c4359 iorap: AppLaunch - wait for background job to complete.
The background job will always compile all pending packages,
so trying to resume app launching too quickly after just 1 package
has been compiled will lead to undefined behavior.

Bug: 152322429
Test: am instrument
Change-Id: I97f773206196bf0ac469fbb87109fd5473b5ea07
2020-03-30 15:27:31 -07:00
Jorim Jaggi
684afc926d Merge "Revert "Defer updating InsetsSource.mFrame while animating"" into rvc-dev 2020-03-30 21:21:25 +00:00
TreeHugger Robot
22431018b6 Merge "Don't generate test config for block_device_writer_module" into rvc-dev 2020-03-30 20:00:46 +00:00
Jorim Jaggi
8c56ac6b94 Revert "Defer updating InsetsSource.mFrame while animating"
This reverts commit 2751c29414.

Reason: Broken logic

Test: Open IME in Messages
Fixes: 152695319
Change-Id: I6a63f20c6342d4284a5da99e39e8f835028a5b6b
2020-03-30 19:22:37 +02:00
JW Wang
1ad1f9938f Merge "Fix an NPE in WatchdogEventLogger#stop" into rvc-dev 2020-03-30 09:03:27 +00:00
Xiao Ma
7410a9c352 Merge "Add CTS tests for ApfCapabilities static APIs." into rvc-dev 2020-03-30 07:46:30 +00:00
Xiao Ma
2b6773f6e6 Add CTS tests for ApfCapabilities static APIs.
Add tests for getApfEtherTypeBlackList and getApfDrop8023Frames APIs.

Bug: 150640397
Test: atest CtsNetTestCasesLatestSdk:android.net.apf.ApfCapabilitiesTest
      on both of Q and R devices.

Change-Id: I11555934df4b27cbb6b7ddbb81022d8fb7c25e15
Merged-In: I11555934df4b27cbb6b7ddbb81022d8fb7c25e15
(cherry picked from commit 7d51a72487)
2020-03-30 05:41:02 +00:00
JW Wang
28310268d9 Fix an NPE in WatchdogEventLogger#stop
See b/152550404#comment15.

https://cs.corp.google.com/android/frameworks/base/tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java?rcl=0b9230489ead3a2ad328d46a47194cfa9dffd25c&l=86
My theory is that somehow #setUp throws before calling mLogger.start()
and then mLogger.stop() runs into an NPE.

Let's add a null-check in the hope that the actual root cause will stand
out.

Bug: 152550404
Test: atest StagedRollbackTest
Change-Id: Ifd323e6a8707a2de19d03ecbe536feacdbb4e9c6
2020-03-30 10:19:36 +08:00
Hall Liu
952697b886 Merge changes from topic "phonestatelistener-limit-rvc-dev" into rvc-dev
* changes:
  Add gating, logging for PhoneStateListener's limit
  Institute limit on PhoneStateListener
2020-03-28 06:48:56 +00:00
Hall Liu
ed6d6e69a8 Add gating, logging for PhoneStateListener's limit
Add gating via PlatformCompat and DeviceConfig and logging via
PlatformCompat to the limit instituted on per-process listeners

Fixes: 152074216
Test: atest CtsTelephonyHostCases
Change-Id: I4d6681d90705b68c3349f4124e434a29b50fd3a2
2020-03-27 19:21:51 -07:00
TreeHugger Robot
5c0b30caab Merge changes from topic "iorap-perfmaster-fix" into rvc-dev
* changes:
  iorap: Change AppLaunch to parse logcat waiting for the service to reset.
  iorap: Log a message when we reconnect to iorapd after binder death.
2020-03-28 02:05:38 +00:00
Chalard Jean
996492f866 Merge changes from topics "api-fix-networkagent", "networkprovider_api", "satisfiedby" into rvc-dev
* changes:
  Rename satisfiedBy into canBeSatisfiedBy
  Address further API council comments.
  Update the NetworkProvider API for council comments
2020-03-27 22:50:42 +00:00
Igor Murashkin
938c63035c iorap: Change AppLaunch to parse logcat waiting for the service to
reset.

No longer race with sleep against iorapd resetting, this time wait
definitively until system_server reconnects to iorapd.

Bug: 152322429
Test: manual
Change-Id: Ia9c1094bb32a59dd94412e8dd693e672290e1504
2020-03-27 14:33:36 -07:00
Nicholas Ambur
95ee3d7ad5 Merge "remove SoundTrigger public member variables" into rvc-dev 2020-03-27 20:54:22 +00:00
Cody Kesting
91af7c65f0 Merge "Clean up unit testing for ConnectivityDiagnostics." into rvc-dev 2020-03-27 19:09:00 +00:00
Cody Kesting
bb2144e4c9 Merge "Restrict VPN Diagnostics callbacks to underlying networks." into rvc-dev 2020-03-27 18:22:20 +00:00
Gavin Corkery
da41b0a238 Merge "Preserve failure history when calling startObservingHealth" into rvc-dev 2020-03-27 15:46:12 +00:00
Chalard Jean
2da4f9f9ae Rename satisfiedBy into canBeSatisfiedBy
Test: FrameworksNetTests NetworkStackTests
Bug: 152238712
Change-Id: I076876a6662bde143ef7d315ce3767acafff93c1
2020-03-27 23:46:30 +09:00
Andrii Kulian
363edf449a Merge "Report bounds instead of size in WindowMetrics" into rvc-dev 2020-03-27 01:08:37 +00:00
Igor Murashkin
459baa256d Merge "tests: AppLaunch - Add iorap compilation filters whitelist" into rvc-dev 2020-03-26 21:48:35 +00:00
Nicholas Ambur
1e43767f10 remove SoundTrigger public member variables
Bug: 150127026
Test: boot and verify soundtrigger hotword is functional

Change-Id: I04061cdb3eba02aac0f08de96f957e2b74c70a12
2020-03-26 19:44:31 +00:00
Victor Hsieh
3f79948d4b Don't generate test config for block_device_writer_module
This module itself is not a test, but an executable to run by another
test.

Test: TH
Bug: 152437576
Change-Id: Id6561278879f5eb7d900dd5b6f6a6c90189fefb6
2020-03-26 08:41:18 -07:00
TreeHugger Robot
2089dc67c7 Merge "Add CTS for BlobStoreManager.Session.openRead()." into rvc-dev 2020-03-26 00:24:51 +00:00
TreeHugger Robot
8cb538c94c Merge "tests: AppLaunch - increase sleep duration after resetting iorapd" into rvc-dev 2020-03-25 22:59:04 +00:00
Igor Murashkin
a7176aaad1 tests: AppLaunch - increase sleep duration after resetting iorapd
Makes it less likely we'll launch the next app too quickly after
restarting iorapd.

Bug: 152322429
Test: am instrument
Change-Id: I4fc35665f03ae7d9fe073accfcb1e04842c737dd
2020-03-25 21:17:46 +00:00
Sudheer Shanka
2a973ab626 Add CTS for BlobStoreManager.Session.openRead().
Bug: 152423769
Test: atest --test-mapping apex/blobstore
Change-Id: I517adb501bf6899dadd78c1b28c2135ae0b6f798
2020-03-25 12:49:30 -07:00
JW Wang
37d52ce20b Merge "Fix a flaky test" into rvc-dev 2020-03-25 10:06:50 +00:00
Benedict Wong
d78ad3d41a Automatically set IPsec tunnel interface as up
This change makes IPsec tunnel interfaces automatically get brought up
once they are created. Originally this was considered to be an
additional safety check, as they would not be start routing traffic
until explicitly brought up. However, in the intervening time, the
NetworkManagementController now requires the NETWORK_STACK permission to
set an interface as up. Additionally, that call is a hidden API, and
thus not usable for use cases such as IWLAN.

Bug: 149348618
Test: FrameworksNetTests, CtsNetTestCases passing.
Change-Id: I55b63a748463a388e1e2991d2d5d6b3023545e60
Merged-In: I55b63a748463a388e1e2991d2d5d6b3023545e60
(cherry picked from commit 7c5704d177)
2020-03-25 06:14:13 +00:00
Lucas Lin
a5f08bda7e Merge "Fix NetworkCapabilitiesTest fail on Q device" into rvc-dev 2020-03-25 02:00:35 +00:00
Gavin Corkery
007e9df3e1 Preserve failure history when calling startObservingHealth
Instead of always creating a new MonitoredPackage every time
PackageWatchdog#startObservingHealth is called, just update
the duration of an existing MonitoredPackage if one exists. This
means that the failure history will be preserved.

Test: atest PackageWatchdogTest
Bug: 150114865
Change-Id: I6d6e3e0e893a603fda50df833bc5b6ce1757b6ec
2020-03-24 23:46:29 +00:00
TreeHugger Robot
c51f491286 Merge "tests: Save contents of dumpsys iorapd to launch_logs directory." into rvc-dev 2020-03-24 23:20:48 +00:00
TreeHugger Robot
d3a0b89571 Merge "Defer updating InsetsSource.mFrame while animating" into rvc-dev 2020-03-24 22:16:09 +00:00