Commit Graph

10 Commits

Author SHA1 Message Date
Dario Freni
c20ac75c88 Merge "Add ability to stage multiple apexs." am: 7bd2a5e4fd am: 20d93a701c am: 5401dfbfb2 am: f15608a4ab
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1490738

Change-Id: I950fa97da1413689e95f43ee005e87bda8ec9fff
2020-11-09 13:00:51 +00:00
Dario Freni
5f541cbb88 Add ability to stage multiple apexs.
Test: atest sharedlibs_hosts_test
Change-Id: I9dfc6b783fd63c555622932d59712c0e0b9b073e
2020-11-09 10:27:04 +00:00
Treehugger Robot
331aa35d2e Merge "Avoid NullPointerException on non-existing file." am: 5db706a48f am: 2cf1c81e8b am: 9328409c4c am: e633b4095c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1488698

Change-Id: Id7436bf23606e4c21dc1e2311da88ab9f0e8ac11
2020-11-05 20:17:41 +00:00
Dario Freni
2d510d9b6c Avoid NullPointerException on non-existing file.
This change allows the method to throw a more informative exception
containing the file name that has not been found.

Test: used the library in sharedlibs_host_tests
Change-Id: I196385486ef4c121f1c655cd76c3ea5233e2a722
2020-11-05 14:32:18 +00:00
JW Wang
5b51c8c189 Rewrite how we abandon sessions
The original code is flawed in that `pm install-abandon` only abandons
the 1st session returned by `pm get-stagedsessions ...`.

1. move AbandonSessionsRule to be shared by multiple host tests
2. use AbandonSessionsRule to do the job

Bug: 160754072
Test: StagedInstallInternalTest
Change-Id: Ib7b32fbd7b1133ac6a8e6782234a4fe2c5a782bd
Merged-In: Ib7b32fbd7b1133ac6a8e6782234a4fe2c5a782bd
(cherry picked from commit 3ac333f2d2)
2020-09-29 15:03:20 +01:00
Winson
d3a10584c5 Add IntentFilter verification tests
In preparation for later changes, adds tests for the existing
domain verification flow for auto verified app links.

Implements a proxy verifier which saves incoming requests to
a file on disk which can be read back later by another call
from the host side test to send a success/failure code.

This tests some basic known success/failure cases, as well as
verifies the presence of bugs, which have been marked with TODOs
against the feature bug number, to be fixed with later work.

Also migrates manual test cases from
I200d85085ce79842a3ed39377d1f75ec381c8991.

Bug: 159952358
Bug: 162346237

Test: atest com.android.server.pm.test.intent.verify.IntentFilterVerificationTest

Change-Id: Ib646b7f6f155ae342195dd25f82bb2463a9ca2b7
2020-08-13 17:44:15 -07:00
Winson
328aa43bff Fix uninstall/disable with multi-user compressed stubs
Updates uninstall logic to ensure that only the user
being acted on is affected.

Previously, uninstalling from any user would disable
the app for user 0. This updates it to only change
the state of the stubbed package for the user that
initiates the uninstall.

This also changes the re-uncompression logic such that
stubs are kept in their system-only state until any
user has marked it installed and enabled.

Also adds tests for all the uninstall scenarios for
a stub system app. Some test cases are migrated from
I6fdd3ed485db0d3f8135266010d6797d9ac37ea0. Only the
corruption test isn't implemented, as this change
doesn't verify the install/scan behavior at boot.

Bug: 159204252

Test: atest com.android.server.pm.test.SystemStubMultiUserDisableUninstallTest
Test: atest PackageManagerServiceHostTests

Change-Id: I4ee2affc058d2bae363c537b3294d5d46a5051a0
2020-08-03 10:59:27 -07:00
JW Wang
3ac333f2d2 Rewrite how we abandon sessions
The original code is flawed in that `pm install-abandon` only abandons
the 1st session returned by `pm get-stagedsessions ...`.

1. move AbandonSessionsRule to be shared by multiple host tests
2. use AbandonSessionsRule to do the job

Bug: 160754072
Test: StagedInstallInternalTest
Change-Id: Ib7b32fbd7b1133ac6a8e6782234a4fe2c5a782bd
2020-07-08 18:57:24 +08:00
Winson
db6d1df791 Fix PackageManagerServiceHostTests disk usage
It seems adb shell stop/start has a bug with taking up disk
space. For now, use a full reboot of the device for each
test step.

This will double the already extremely long test time, so the
entire PackageManagerServiceHostTests module has been moved
to postsubmit, except for tests annotated @Presubmit, of which
there are none as of this change.

Bug: 159540015
Bug: 159256824

Test: atest PackageManagerServiceHostTests

Change-Id: I67da61cb02baa572fc298e6f617d6e53ec2c4724
2020-06-25 10:19:51 -07:00
Winson
af8399a682 Fix original-package support
This broke in P. Basic support was broken by a simple negation
issue with the logic that checks for the original package.

That, along with the suggestion in the bug to fix the renamed
package association means this should now work as expected,
carrying data over from a previous installed, differently named
package.

Bug: 131355130
Bug: 132749720
Bug: 111967720

Test: atest PackageManagerServiceHostTests

Change-Id: Ifc4c7af47c4b633cd27ba4a40b6baa0e27960d71
2020-06-10 10:34:43 -07:00