Now IntervalStats.events field is initialized at construction of
IntervalStats object, we can remove the extra null-check on
IntervalStats.events, make code more clean and readable.
Test: atest UsageStatsDatabaseTest.java
Change-Id: I2580509f41593c1fdf380ba56ebc7a5b6c6f0c5f
Previously, they were only updated when underlying network set was
non-null.
This change also ensures that all the calls b/w ConnectivityService and
Vpn that leads to updating capabilities are on ConnectivityService
handler thread.
Additionally, it also ensures that capabilities are propagated after VPN
enters connected state.
This change also updates VPN capabilities inline from
ConnectivityService handler thread. Previously, there was an additional
loop where Vpn would update capabilities via NetworkAgent thru
AsyncChannel which posts back to CS handler thread, which could
potentially lead to delays in updating VPN capabilities.
Bug: 119129310
Bug: 118856062
Bug: 124268198
Test: atest FrameworksNetTests
Test: manual - verified VPNs capabilities are getting updated and
DownloadManager is working correctly.
(cherry picked from commit 4fa80e8a2f)
Change-Id: Iae5f2024b19df04c31938815b52687781d016cde
Merged-In: Id0abc4d304bb096e92479a118168690ccce634ed
* changes:
Fix merge problems with cherry-picking "Add notification settings to backup&restore" change into pi-dev
DO NOT MERGE - Merge PPRL.190205.001 into master
Renaming DexLoggerIntegrationTests to
DynamicCodeLoggerIntegrationTests, to match the rename and changed
scope of the code it is testing.
Test: atest -p services/core/java/com/android/server/pm/dex
Bug: 122946463
Change-Id: I66abd6b173f148279085dee7a714aa64df7a941b
This will allow us to inject dependencies into the API classes that are
not parcelable or do not come from ircs.
Bug: 123699565
Test: Unit tests pass
Change-Id: Iab4e6ea3fd983eef7fb0cba7311175ea82a444ff
Bug: 122652441
Test: atest com.android.server.connectivity.VpnTest
Test: Establish a IPv4 VPN with minimal routes and check
(dumpsys connectivity) the VPN network does not have INTERNET
capability.
Change-Id: Ic7f19ebb7b7f78a6ffb2a8ec3fc3eca5e5421f57
When SystemUI start up, ColorExtractor will get wallpaper colors so
status bar can use it to update theme, however, this will also block
SystemUI start up process if the wallpaper is image wallpaper.
In order to break the latency, we can extract getWallpaperColors
method from ColorExtractor's contructor, and do it at another thread,
so it won't block SystemUI start up.
Bug: 124279857
Test: atest ColorExtractorTest
Test: Manual test change theme feature can work normally.
Merged-In: I8589b28a17b0a2b33b4bbbda2265080af983f26a
Change-Id: I8589b28a17b0a2b33b4bbbda2265080af983f26a
- snapshotAppData gets PackageRollbackInfo and updates pending backups
and inodes of CE user data snapshots;
- computePendingBackups/Restores is now merged into
commitPendingBackupAndRestoreForUser;
- essentially commitPendingBackupAndRestoreForUser now gets lists of
pending and recently executed rollbacks, computs what backups and
restores are pending and commits them.
Bug: 124029909
Test: RollbackTest, AppDataRollbackHelperTest
Change-Id: I5aecdfd47b535492165614ee7cf9676778e292ad
When SystemUI start up, ColorExtractor will get wallpaper colors so
status bar can use it to update theme, however, this will also block
SystemUI start up process if the wallpaper is image wallpaper.
In order to break the latency, we can extract getWallpaperColors
method from ColorExtractor's contructor, and do it at another thread,
so it won't block SystemUI start up.
Bug: 124279857
Test: atest ColorExtractorTest
Test: Manual test change theme feature can work normally.
Change-Id: I8589b28a17b0a2b33b4bbbda2265080af983f26a
* changes:
Create basic test for rollback of staged install.
Stub out code for a host driven StagedRollbackTest.
Move RollbackTest app code to a new subdirectory.
Some of these tests rely on audit logs being generated and then
visible when we try to read them. Occasionally this doesn't work -
probably because of throttling or the asynchronous, background nature
of logging. When it happens the tests fail.
To avoid this, re-run the susceptible tests multiple times rather than
failing on the first go, with increasingly long delays between
triggering and reading the logs on each run.
Bug: 123507824
Test: atest -p services/core/java/com/android/server/pm/dex
Change-Id: I62db997c912b2d153ecaea34011529c4c58207c7
The new test tests rollback of a staged install involving a single apk.
Test: atest StagedRollbackTest
Bug: 124043688
Bug: 124221060
Bug: 124284714
Change-Id: Ie125d44c4d30d142ee32beac4c42e735a47ec71e
NetworkStack is only used in services.net or clients of services.net. It
cannot stay in framework.jar because it needs to depend on AIDL
interfaces, which would conflict with app implementations if they were
in framework.jar.
Test: atest FrameworksNetTests NetworkStackTests
Bug: 124033493
Change-Id: Ib1d08a3669983640119d008db7e2990fa798724f
Merged-In: I501b125a388c1100c2182bde4670944c2f0d7a02
Previously, they were only updated when underlying network set was
non-null.
This change also ensures that all the calls b/w ConnectivityService and
Vpn that leads to updating capabilities are on ConnectivityService
handler thread.
Additionally, it also ensures that capabilities are propagated after VPN
enters connected state. This was previously done from establish which
could potentially lead to race between VPN getting connected and
capabilities getting updated.
This change also updates VPN capabilities inline from
ConnectivityService handler thread. Previously, there was an additional
loop where Vpn would update capabilities via NetworkAgent thru
AsyncChannel which posts back to CS handler thread, which could
potentially lead to delays in updating VPN capabilities.
Bug: 119129310
Bug: 118856062
Bug: 124268198
Test: atest FrameworksNetTests
Test: manual - verified VPNs capabilities are getting updated and
DownloadManager is working correctly.
Change-Id: Id0abc4d304bb096e92479a118168690ccce634ed
The test doesn't test anything meaningful yet, but it builds and runs.
Bug: 124043688
Test: atest StagedRollbackTest
Change-Id: If9b5d57e28846b0ba28a580b74a486bbedb8f8d5
In preparation for adding another subdirectory for a host-driven test of
staged rollbacks.
Bug: 124043688
Test: atest RollbackTest
Change-Id: I001427c7a659c2c934345e1dba1c421209accb6c
NetworkStack is only used in services.net or clients of services.net. It
cannot stay in framework.jar because it needs to depend on AIDL
interfaces, which would conflict with app implementations if they were
in framework.jar.
(cherry-pick of aosp/905233 with trivial conflicts in SystemServer.java)
Test: atest FrameworksNetTests NetworkStackTests
Bug: 124033493
Change-Id: I501b125a388c1100c2182bde4670944c2f0d7a02