Home
last modified time | relevance | path

Searched refs:InstallUtils (Results 1 – 22 of 22) sorted by relevance

/cts/hostsidetests/stagedinstall/app/src/com/android/tests/stagedinstall/
DApexShimValidationTest.java30 import com.android.cts.install.lib.InstallUtils;
71 InstallUtils.getPackageInstaller().getSessionInfo(sessionId); in testRejectsApexWithAdditionalFile_Commit()
79 InstallUtils.getPackageInstaller().getSessionInfo(sessionId); in testRejectsApexWithAdditionalFolder_Commit()
87 InstallUtils.getPackageInstaller().getSessionInfo(sessionId); in testRejectsApexWithPostInstallHook_Commit()
95 InstallUtils.getPackageInstaller().getSessionInfo(sessionId); in testRejectsApexWithPreInstallHook_Commit()
103 InstallUtils.getPackageInstaller().getSessionInfo(sessionId); in testRejectsApexWrongSHA_Commit()
109 assertThat(InstallUtils.getInstalledVersion(SHIM_APEX_PACKAGE_NAME)).isEqualTo(1); in testInstallRejected_VerifyPostReboot()
114 assertThat(InstallUtils.getInstalledVersion(SHIM_APEX_PACKAGE_NAME)).isEqualTo(1); in testRejectsApexWithAdditionalFile_rebootless()
117 InstallUtils.commitExpectingFailure( in testRejectsApexWithAdditionalFile_rebootless()
121 assertThat(InstallUtils.getInstalledVersion(SHIM_APEX_PACKAGE_NAME)).isEqualTo(1); in testRejectsApexWithAdditionalFile_rebootless()
[all …]
DStagedInstallTest.java19 import static com.android.cts.install.lib.InstallUtils.assertStatusFailure;
20 import static com.android.cts.install.lib.InstallUtils.assertStatusSuccess;
21 import static com.android.cts.install.lib.InstallUtils.getPackageInstaller;
50 import com.android.cts.install.lib.InstallUtils;
298 PackageInstaller.SessionInfo session = InstallUtils.getStagedSessionInfo(sessionId); in testAbandonStagedApkBeforeReboot_CommitAndAbandon()
301 InstallUtils.assertStagedSessionIsAbandoned(sessionId); in testAbandonStagedApkBeforeReboot_CommitAndAbandon()
331 InstallUtils.assertStagedSessionIsAbandoned(sessionId); in testAbandonStagedApkBeforeReady_CommitAndAbandon()
365 InstallUtils.openPackageInstallerSession(sessionId).commit(sender.getIntentSender()); in testNoSessionUpdatedBroadcastSentForStagedSessionAbandon()
367 InstallUtils.assertStagedSessionIsAbandoned(sessionId); in testNoSessionUpdatedBroadcastSentForStagedSessionAbandon()
525 InstallUtils.commitExpectingFailure(AssertionError.class, in testsFailsNonStagedApexInstall()
[all …]
/cts/tests/tests/util/src/android/util/cts/
DInstallUtilTest.java32 import com.android.cts.install.lib.InstallUtils;
69 InstallUtils.dropShellPermissionIdentity(); in teardown()
78 InstallUtils.adoptShellPermissionIdentity( in setup()
110 new File(InstallUtils.getPackageInfo(TestApp.A).applicationInfo.sourceDir)); in testNativeFilePathTestApp()
113 new File(InstallUtils.getPackageInfo(TestApp.B).applicationInfo.sourceDir)); in testNativeFilePathTestApp()
127 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(1); in testNativeFilePathTestApp()
128 assertThat(InstallUtils.getInstalledVersion(TestApp.B)).isEqualTo(2); in testNativeFilePathTestApp()
134 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(-1); in testCommitSingleTestApp()
143 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(1); in testCommitSingleTestApp()
150 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(-1); in testCommitMultiTestApp()
[all …]
/cts/hostsidetests/rollback/app/src/com/android/cts/rollback/host/app/
DHostTestHelper.java36 import com.android.cts.install.lib.InstallUtils;
73 InstallUtils.adoptShellPermissionIdentity( in setup()
84 InstallUtils.dropShellPermissionIdentity(); in teardown()
103 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(-1); in testApkOnlyStagedRollback_Phase1_Install()
116 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(2); in testApkOnlyStagedRollback_Phase2_RollBack()
117 InstallUtils.processUserData(TestApp.A); in testApkOnlyStagedRollback_Phase2_RollBack()
136 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(2); in testApkOnlyStagedRollback_Phase2_RollBack()
145 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(1); in testApkOnlyStagedRollback_Phase3_Confirm()
146 InstallUtils.processUserData(TestApp.A); in testApkOnlyStagedRollback_Phase3_Confirm()
162 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(-1); in testApkOnlyMultipleStagedRollback_Phase1_Install()
[all …]
/cts/tests/rollback/src/com/android/cts/rollback/
DRollbackManagerTest.java40 import com.android.cts.install.lib.InstallUtils;
111 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(1); in testBasic()
118 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(2); in testBasic()
119 InstallUtils.processUserData(TestApp.A); in testBasic()
127 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(1); in testBasic()
128 InstallUtils.processUserData(TestApp.A); in testBasic()
147 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(2); in testBasic_MultiPackage()
148 assertThat(InstallUtils.getInstalledVersion(TestApp.B)).isEqualTo(2); in testBasic_MultiPackage()
159 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(1); in testBasic_MultiPackage()
160 assertThat(InstallUtils.getInstalledVersion(TestApp.B)).isEqualTo(1); in testBasic_MultiPackage()
[all …]
/cts/tests/tests/packageinstaller/atomicinstall/src/com/android/tests/atomicinstall/
DSessionAbandonBehaviorTest.java22 import static com.android.cts.install.lib.InstallUtils.openPackageInstallerSession;
41 import com.android.cts.install.lib.InstallUtils;
164 InstallUtils.getPackageInstaller().unregisterSessionCallback(sessionCallback); in tearDown()
193 InstallUtils.getPackageInstaller().registerSessionCallback(sessionCallback, mHandler); in registerSessionCallbacks()
215 InstallUtils.getPackageInstaller().getSessionInfo(sessionId); in getAllChildSessions()
272 InstallUtils.getPackageInstaller().abandonSession(sessionId); in abandon_stagedSession_shouldReceiveAbandonCallBack()
286 InstallUtils.getPackageInstaller().abandonSession(sessionId); in abandon_nonStagedSession_shouldReceiveAbandonCallBack()
302 InstallUtils.getPackageInstaller().abandonSession(sessionId); in abandon_stagedSession_openedSession_canNotGetNames()
319 InstallUtils.getPackageInstaller().abandonSession(sessionId); in abandon_nonStagedSession_openedSession_canNotGetNames()
337 InstallUtils.getPackageInstaller().abandonSession(sessionId); in abandon_stagedSession_openForWriting_shouldFail()
[all …]
DAtomicInstallTest.java19 import static com.android.cts.install.lib.InstallUtils.assertStatusSuccess;
20 import static com.android.cts.install.lib.InstallUtils.getInstalledVersion;
21 import static com.android.cts.install.lib.InstallUtils.openPackageInstallerSession;
34 import com.android.cts.install.lib.InstallUtils;
94 InstallUtils.getPackageInstaller().getMySessions().forEach(info -> { in cleanUpSessions()
96 InstallUtils.getPackageInstaller().abandonSession(info.getSessionId()); in cleanUpSessions()
123 retry(() -> InstallUtils.getPackageInstaller().getSessionInfo(sessionId), in testSessionCleanUp_Single()
138 retry(() -> InstallUtils.getPackageInstaller().getSessionInfo(sessionId), in testSessionCleanUp_Multi()
168 InstallUtils.assertStatusSuccess(sender.getResult()); in testRemoveChild()
181 InstallUtils.commitExpectingFailure(AssertionError.class, in testInstallTwoApksDowngradeFail()
[all …]
/cts/libs/install/src/com/android/cts/install/lib/
DUninstall.java41 if (InstallUtils.getInstalledVersion(packageName) == -1 in uninstallSinglePackage()
42 || InstallUtils.isSystemAppWithoutUpdate(packageName)) { in uninstallSinglePackage()
51 InstallUtils.assertStatusSuccess(sender.getResult()); in uninstallSinglePackage()
DInstall.java228 InstallUtils.openPackageInstallerSession(sessionId)) { in commit()
235 InstallUtils.assertStatusSuccess(result); in commit()
251 InstallUtils.openPackageInstallerSession(sessionId)) { in createSession()
311 InstallUtils.mutateInstallFlags(params, mInstallFlags); in createEmptyInstallSession()
313 PackageInstaller installer = InstallUtils.getPackageInstaller(); in createEmptyInstallSession()
337 InstallUtils.getPackageInstaller().openSession(sessionId)) { in createSingleInstallSession()
DInstallUtils.java52 public class InstallUtils { class
/cts/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/
DInstallConstraintsTest.kt37 import com.android.cts.install.lib.InstallUtils in <lambda>()
38 import com.android.cts.install.lib.InstallUtils.getInstalledVersion in <lambda>()
122 InstallUtils.requestAudioFocus(TestApp.A) in <lambda>()
123 val pi = InstallUtils.getPackageInstaller() in <lambda>()
140 val pi = InstallUtils.getPackageInstaller() in <lambda>()
160 val pi = InstallUtils.getPackageInstaller() in <lambda>()
192 val pi = InstallUtils.getPackageInstaller() in <lambda>()
226 val pi = InstallUtils.getPackageInstaller() in <lambda>()
258 val pi = InstallUtils.getPackageInstaller() in <lambda>()
292 val pi = InstallUtils.getPackageInstaller() in <lambda>()
[all …]
/cts/hostsidetests/rollback/app2/src/com/android/cts/rollback/host/app2/
DHostTestHelper.java26 import com.android.cts.install.lib.InstallUtils;
49 InstallUtils.adoptShellPermissionIdentity( in setup()
60 InstallUtils.dropShellPermissionIdentity(); in teardown()
/cts/hostsidetests/install/app/src/android/cts/install/
DInstallTest.java21 import static com.android.cts.install.lib.InstallUtils.getPackageInstaller;
33 import com.android.cts.install.lib.InstallUtils;
107 InstallUtils.commitExpectingFailure(AssertionError.class, in assert_commitFailure_phase()
110 InstallUtils.commitExpectingFailure(IllegalStateException.class, in assert_commitFailure_phase()
DDowngradeTest.java22 import com.android.cts.install.lib.InstallUtils;
127 InstallUtils.commitExpectingFailure(AssertionError.class, in assert_downgradeNotAllowed_phase()
139 InstallUtils.commitExpectingFailure(AssertionError.class, in assert_downgradeNotRequested_phase()
DInstallRule.java19 import static com.android.cts.install.lib.InstallUtils.getPackageInstaller;
31 import com.android.cts.install.lib.InstallUtils;
107 PackageInfo info = InstallUtils.getPackageInfo(packageName); in assertPackageVersion()
DSessionRule.java19 import static com.android.cts.install.lib.InstallUtils.getPackageInstaller;
DSamegradeTest.java19 import static com.android.cts.install.lib.InstallUtils.getPackageInfo;
/cts/tests/tests/appenumeration/src/android/appenumeration/cts/
DUtils.java36 import com.android.cts.install.lib.InstallUtils;
265 InstallUtils.openPackageInstallerSession(sessionId); in commitSession()
268 InstallUtils.assertStatusSuccess(sender.getResult()); in commitSession()
275 InstallUtils.getPackageInstaller().getMySessions().forEach(info -> { in cleanUpMySessions()
277 InstallUtils.getPackageInstaller().abandonSession(info.getSessionId()); in cleanUpMySessions()
/cts/tests/tests/packageinstaller/adminpackageinstaller/src/android/packageinstaller/admin/cts/
DSessionCommitBroadcastTest.java41 import com.android.cts.install.lib.InstallUtils;
118 assertEquals(1, InstallUtils.getInstalledVersion(TestApp.A)); in testBroadcastNotReceivedForUpdateInstall()
128 assertEquals(2, InstallUtils.getInstalledVersion(TestApp.A)); in testBroadcastNotReceivedForUpdateInstall()
/cts/hostsidetests/appcloning/test-apps/AppCloningTestApp/src/com/android/cts/appcloningtestapp/
DAppCloningDeviceTest.java37 import com.android.cts.install.lib.InstallUtils;
63 InstallUtils.adoptShellPermissionIdentity( in setUp()
72 InstallUtils.dropShellPermissionIdentity(); in tearDown()
/cts/hostsidetests/os/test-apps/StaticSharedLibTestApp/src/android/os/lib/app/
DStaticSharedLibsTests.java41 import com.android.cts.install.lib.InstallUtils;
112 InstallUtils.commitExpectingFailure(AssertionError.class, in testSamegradeStaticSharedLibFail()
/cts/hostsidetests/scopedstorage/libs/ScopedStorageTestLib/src/android/scopedstorage/cts/lib/
DTestUtils.java74 import com.android.cts.install.lib.InstallUtils;
721 assertThat(InstallUtils.getInstalledVersion(packageName)).isEqualTo(1); in installApp()
753 boolean isAppInstalled = InstallUtils.getInstalledVersion(testApp.getPackageName()) != -1; in isAppInstalled()
771 assertThat(InstallUtils.getInstalledVersion(packageName)).isEqualTo(-1); in uninstallApp()