8405 Commits

Author SHA1 Message Date
Winson Chiu
1eeef296d2 Merge changes Id7d1ff26,Id53a2e65 into rvc-dev am: bde104f8be
Change-Id: Ib687652d8b04f7b6241351c078f583baafd1f73e
2020-04-01 05:45:41 +00:00
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
8b07029f26 Run expiration when rollback lifetime is changed. DO NOT MERGE am: 9f8407b0aa
Change-Id: I5e5f19289a1fb9224d9a2d4dfa2d45dde5614359
2020-04-01 02:50:57 +00:00
JW Wang
ca390e122d Add logs for debugging am: 5b163cfcee
Change-Id: Idbef34b58b57605d7044fe0cc04995743a4ceaa5
2020-04-01 02:50:52 +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
cc679e9085 Merge "Add task organizer based task embedder" into rvc-dev am: a531f922c9
Change-Id: Ic9e56948f6afc0449c0c5383c009947e1c4a707e
2020-03-31 21:02:13 +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
9ab63132c2 Merge "iorap: AppLaunch - wait for background job to complete." into rvc-dev am: 38d362ca86
Change-Id: Ifa0d578a61672737f2dbd6a4029982c93d2a43e3
2020-03-31 20:28:05 +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
Cody Kesting
b654993f34 Merge "Sort administrator UIDs for NetworkCapabilities." am: 976f715d2e am: 39c41d3439
Change-Id: I453f81bcb7c426ab4b529acce5c32c502a29331b
2020-03-31 18:17:14 +00:00
Cody Kesting
88f1f165cf Merge "Add combine() and equals() for NetworkCapabilities admin UIDs." am: 55b71cb731 am: 3e72530a42
Change-Id: Ic8fc22f0eb47836053fc6b9423018c16ae46ef46
2020-03-31 18:16:18 +00:00
Cody Kesting
976f715d2e Merge "Sort administrator UIDs for NetworkCapabilities." 2020-03-31 17:43:02 +00:00
Cody Kesting
55b71cb731 Merge "Add combine() and equals() for NetworkCapabilities admin UIDs." 2020-03-31 17:42:18 +00:00
Cody Kesting
8827ce5e8a Merge "Use IBinder as key for ConnectivityDiagnostics storage in CS." am: f0697914ca am: c295bbab20
Change-Id: Ia63d6ab70027e4d1b389a05f3d46162a68747e77
2020-03-31 17:35:09 +00:00
Cody Kesting
f0697914ca Merge "Use IBinder as key for ConnectivityDiagnostics storage in CS." 2020-03-31 17:00:03 +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
ea5727ecd5 Merge "PmPermissionsTest: Update test expectations for getPackageSizeInfo" into rvc-dev am: 758aaeda59
Change-Id: Id59fc0fc6201954b38407d6b56a369c19f2f154e
2020-03-31 13:00:55 +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 d0a44f49df01a1aefa505ee90c9806dee135b4e4)
2020-03-30 22:59:17 -07:00
Benedict Wong
91aa444667 Merge "Make VpnProfile.maxMtu default value match Ikev2VpnProfile" am: 328ef02bf3 am: 1ee1f86749
Change-Id: I51a3ec89f215dd937357e5a77f679a063a7b8a18
2020-03-31 03:06:19 +00: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 eab998a9afb052b5e022d0db9ab889e141213c42)

Bug: 151890602
Test: m
Merged-In: I85adb8c3c5598ef4ce11550b51f22d1ce3c282a6
Change-Id: I85adb8c3c5598ef4ce11550b51f22d1ce3c282a6
2020-03-31 11:01:23 +08:00
Benedict Wong
328ef02bf3 Merge "Make VpnProfile.maxMtu default value match Ikev2VpnProfile" 2020-03-31 02:22:54 +00:00
Cody Kesting
91e0076fe8 Merge "Invoke onConnectivityReport on registering ConnectivityDiagnostics." am: e4479f571f am: 778c743170
Change-Id: Ib65d67f8d9a6e44d03f745cdcb27d7535fd40c58
2020-03-31 00:54:30 +00: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 2091bd9059d1d24f8c6bd1cd345361f185cab1ea)
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 5fad8aa761336012bb228afc3b6f7d42fa274242)
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 c7c6a4ac12beb7c216076958612869426da06da0)
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 95ec0b206b759e1d26bc1dbb2255a515bb24358a)
2020-03-30 17:13:55 -07:00
Cody Kesting
e4479f571f Merge "Invoke onConnectivityReport on registering ConnectivityDiagnostics." 2020-03-31 00:06:26 +00: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
Cody Kesting
2091bd9059 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
2020-03-30 14:51:24 -07:00
Jorim Jaggi
66d146769c Merge "Revert "Defer updating InsetsSource.mFrame while animating"" into rvc-dev am: 684afc926d
Change-Id: I68c19edf8639e00e57cfc9907d22b18b5f4dba01
2020-03-30 21:32:25 +00:00
Chalard Jean
5fad8aa761 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
2020-03-30 14:27:20 -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
34060d2d4d Merge "Don't generate test config for block_device_writer_module" into rvc-dev am: 22431018b6
Change-Id: I6c53fe9e80acf85f95404869526f4dda7bbb8659
2020-03-30 20:08:49 +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
Cody Kesting
c7c6a4ac12 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
2020-03-30 11:10:46 -07:00
Cody Kesting
95ec0b206b 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
2020-03-30 11:10:46 -07:00
Jorim Jaggi
8c56ac6b94 Revert "Defer updating InsetsSource.mFrame while animating"
This reverts commit 2751c29414d17650b1737e19c250ffbe4f266b82.

Reason: Broken logic

Test: Open IME in Messages
Fixes: 152695319
Change-Id: I6a63f20c6342d4284a5da99e39e8f835028a5b6b
2020-03-30 19:22:37 +02:00
Chiachang Wang
4ef106c4fc Merge "Update constructor of NetworkMonitor" am: 2ec47eeb7c am: e33bba74fc
Change-Id: I59f68083d374afc1d0bf38cc6abd5fe4cbe068d1
2020-03-30 09:12:37 +00:00
JW Wang
cdc80e6ab4 Merge "Fix an NPE in WatchdogEventLogger#stop" into rvc-dev am: 1ad1f9938f
Change-Id: I912195d949b5df261f876848fc828270146abbdf
2020-03-30 09:05:46 +00:00
JW Wang
1ad1f9938f Merge "Fix an NPE in WatchdogEventLogger#stop" into rvc-dev 2020-03-30 09:03:27 +00:00
Chiachang Wang
2ec47eeb7c Merge "Update constructor of NetworkMonitor" 2020-03-30 08:40:45 +00:00
Chiachang Wang
59ed66a8a5 Update constructor of NetworkMonitor
Remove redundant parameter.

Bug: 152374582
Test: m -j40 ; atest FrameworksNetIntegrationTests
Change-Id: I3a636f0ea5145ac4435e06a9827bb8e01862542d
2020-03-30 07:52:02 +00:00
Xiao Ma
7410a9c352 Merge "Add CTS tests for ApfCapabilities static APIs." into rvc-dev 2020-03-30 07:46:30 +00:00