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
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)
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
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
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
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
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