/cts/libs/install/src/com/android/cts/install/lib/ |
D | InstallUtils.java | 30 import android.content.pm.PackageInstaller; 125 public static PackageInstaller getPackageInstaller() { in getPackageInstaller() 133 public static PackageInstaller.Session openPackageInstallerSession(int sessionId) in openPackageInstallerSession() 142 int status = result.getIntExtra(PackageInstaller.EXTRA_STATUS, in assertStatusSuccess() 143 PackageInstaller.STATUS_FAILURE); in assertStatusSuccess() 144 if (status == PackageInstaller.STATUS_PENDING_USER_ACTION) { in assertStatusSuccess() 147 } else if (status != PackageInstaller.STATUS_SUCCESS) { in assertStatusSuccess() 148 String message = result.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE); in assertStatusSuccess() 158 int status = result.getIntExtra(PackageInstaller.EXTRA_STATUS, in assertStatusFailure() 159 PackageInstaller.STATUS_SUCCESS); in assertStatusFailure() [all …]
|
D | PackageInstallerSessionInfoSubject.java | 19 import android.content.pm.PackageInstaller; 28 private final PackageInstaller.SessionInfo mActual; 31 @Nullable PackageInstaller.SessionInfo subject) { in PackageInstallerSessionInfoSubject() 37 PackageInstaller.SessionInfo> sessions() { in sessions() 39 PackageInstaller.SessionInfo>() { in sessions() 42 PackageInstaller.SessionInfo session) { in sessions() 49 PackageInstaller.SessionInfo session) {
|
D | LocalIntentSender.java | 27 import android.content.pm.PackageInstaller; 83 int sessionId = intent.getIntExtra(PackageInstaller.EXTRA_SESSION_ID, -1); in prettyPrint() 84 int status = intent.getIntExtra(PackageInstaller.EXTRA_STATUS, in prettyPrint() 85 PackageInstaller.STATUS_FAILURE); in prettyPrint() 86 String message = intent.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE); in prettyPrint()
|
D | Install.java | 22 import android.content.pm.PackageInstaller; 53 private int mSessionMode = PackageInstaller.SessionParams.MODE_FULL_INSTALL; 227 try (PackageInstaller.Session session = in commit() 250 try (PackageInstaller.Session session = in createSession() 285 PackageInstaller.SessionParams params = in createEmptyInstallSession() 286 new PackageInstaller.SessionParams(mSessionMode); in createEmptyInstallSession() 313 PackageInstaller installer = InstallUtils.getPackageInstaller(); in createEmptyInstallSession() 336 try (PackageInstaller.Session session = in createSingleInstallSession()
|
/cts/hostsidetests/silentupdate/testapp/src/com/android/tests/silentupdate/ |
D | SilentUpdateTests.java | 22 import static android.content.pm.PackageInstaller.SessionParams.USER_ACTION_NOT_REQUIRED; 23 import static android.content.pm.PackageInstaller.SessionParams.USER_ACTION_REQUIRED; 24 import static android.content.pm.PackageInstaller.SessionParams.USER_ACTION_UNSPECIFIED; 37 import android.content.pm.PackageInstaller; 38 import android.content.pm.PackageInstaller.SessionParams; 106 PackageInstaller.STATUS_PENDING_USER_ACTION, in newInstall_RequiresUserAction() 113 PackageInstaller.STATUS_PENDING_USER_ACTION, in updateWithUnknownSourcesDisabled_RequiresUserAction() 120 PackageInstaller.STATUS_PENDING_USER_ACTION, in updateAsNonInstallerOfRecord_RequiresUserAction() 127 PackageInstaller.STATUS_SUCCESS, in updatedInstall_RequiresNoUserAction() 134 PackageInstaller.STATUS_PENDING_USER_ACTION, in updatedInstallWithoutCallSetUserAction_RequiresUserAction() [all …]
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | PackageInstallTest.java | 6 import android.content.pm.PackageInstaller; 30 private PackageInstaller mPackageInstaller; 31 private PackageInstaller.Session mSession; 63 assertEquals(PackageInstaller.STATUS_SUCCESS, in testPackageInstall() 64 intent.getIntExtra(PackageInstaller.EXTRA_STATUS, in testPackageInstall() 67 PackageInstaller.EXTRA_PACKAGE_NAME)); in testPackageInstall() 79 assertEquals(PackageInstaller.STATUS_SUCCESS, in testPackageUninstall() 80 intent.getIntExtra(PackageInstaller.EXTRA_STATUS, in testPackageUninstall() 83 PackageInstaller.EXTRA_PACKAGE_NAME)); in testPackageUninstall() 102 PackageInstaller.SessionParams params = new PackageInstaller.SessionParams( in installPackage() [all …]
|
/cts/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/ |
D | PreapprovalInstallTest.kt | 25 import android.content.pm.PackageInstaller 105 assertThat(result.status).isEqualTo(PackageInstaller.STATUS_SUCCESS) in requestUserPreapproval_userAgree_statusSuccess() 140 PackageInstaller.EXTRA_STATUS, in requestUserPreapprovalWithUpdateOwnership_userAgree_statusSuccess() 141 PackageInstaller.STATUS_FAILURE_INVALID in requestUserPreapprovalWithUpdateOwnership_userAgree_statusSuccess() 145 PackageInstaller.EXTRA_PRE_APPROVAL, in requestUserPreapprovalWithUpdateOwnership_userAgree_statusSuccess() 148 val msg = intent.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE) in requestUserPreapprovalWithUpdateOwnership_userAgree_statusSuccess() 151 if (status == PackageInstaller.STATUS_SUCCESS) { in requestUserPreapprovalWithUpdateOwnership_userAgree_statusSuccess() 154 } else if (status == PackageInstaller.STATUS_PENDING_USER_ACTION) { in requestUserPreapprovalWithUpdateOwnership_userAgree_statusSuccess() 159 PackageInstaller.ACTION_CONFIRM_PRE_APPROVAL in requestUserPreapprovalWithUpdateOwnership_userAgree_statusSuccess() 202 assertThat(result.status).isEqualTo(PackageInstaller.STATUS_PENDING_USER_ACTION) in requestUserPreapprovalWithUpdateOwnership_userAgree_statusSuccess() [all …]
|
D | SessionTestInstant.kt | 18 import android.content.pm.PackageInstaller 38 PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_FULL_INSTALL)) in instantAppsCannotCreateInstallSessions()
|
D | InstallConstraintsTest.kt | 26 import android.content.pm.PackageInstaller in <lambda>() 27 import android.content.pm.PackageInstaller.InstallConstraints in <lambda>() 125 val future = CompletableFuture<PackageInstaller.InstallConstraintsResult>() in <lambda>() 161 val f1 = CompletableFuture<PackageInstaller.InstallConstraintsResult>() in <lambda>() 176 val f2 = CompletableFuture<PackageInstaller.InstallConstraintsResult>() in <lambda>() 193 val f1 = CompletableFuture<PackageInstaller.InstallConstraintsResult>() in <lambda>() 208 val f2 = CompletableFuture<PackageInstaller.InstallConstraintsResult>() in <lambda>() 227 val f1 = CompletableFuture<PackageInstaller.InstallConstraintsResult>() in <lambda>() 238 val f2 = CompletableFuture<PackageInstaller.InstallConstraintsResult>() in <lambda>() 259 val f1 = CompletableFuture<PackageInstaller.InstallConstraintsResult>() in <lambda>() [all …]
|
D | InstallInfoTest.kt | 21 import android.content.pm.PackageInstaller in <lambda>() 44 private val mParams = PackageInstaller.SessionParams( in <lambda>() 45 PackageInstaller.SessionParams.MODE_FULL_INSTALL in <lambda>() 94 assertThrows(PackageInstaller.PackageParsingException::class.java) { in <lambda>() 107 assertThrows(PackageInstaller.PackageParsingException::class.java) { in <lambda>() 119 } catch (e: PackageInstaller.PackageParsingException) { in <lambda>()
|
D | UpdateOwnershipEnforcementTest.kt | 23 import android.content.pm.PackageInstaller 114 assertEquals(PackageInstaller.STATUS_SUCCESS, result.status) in setRequestUpdateOwnership_whenInitialInstall_hasUpdateOwner() 136 assertEquals(PackageInstaller.STATUS_SUCCESS, result.status) in setRequestUpdateOwnership_whenUpdate_hasNoUpdateOwner() 186 assertEquals(PackageInstaller.STATUS_SUCCESS, result.status) in updateOwnershipEnforcement_updateByOwner_hasNoUserAction() 213 assertEquals(PackageInstaller.STATUS_SUCCESS, result.status) in updateOwnershipEnforcement_updateByNonOwner_hasUserAction() 300 assertEquals(PackageInstaller.STATUS_SUCCESS, result.status) in updateArchivedAppViaSessionByNonOwner_showConfirmDialog() 328 assertEquals(PackageInstaller.STATUS_SUCCESS, result.status) in featureDisabled_updateByNonOwner_hasNoUserAction() 347 assertEquals(PackageInstaller.STATUS_SUCCESS, result.status) in updateOwnershipEnforcement_updateByNonOwner_hasNoUpdateOwner() 365 assertEquals(PackageInstaller.STATUS_SUCCESS, result.status) in setRequestUpdateOwnership_notRequestWhenUpdate_ownerRetained() 394 PackageInstaller.REASON_CONFIRM_PACKAGE_CHANGE, in getPendingUserActionReason_notRequestUpdateOwnership_reasonUnspecified() [all …]
|
D | SessionTest.kt | 27 import android.content.pm.PackageInstaller 28 import android.content.pm.PackageInstaller.STATUS_FAILURE_ABORTED 29 import android.content.pm.PackageInstaller.STATUS_SUCCESS 30 import android.content.pm.PackageInstaller.SessionParams.MODE_FULL_INSTALL 77 val sessionParam = PackageInstaller.SessionParams(MODE_FULL_INSTALL) in sessionWithImmutablePendingIntent() 249 val sessionParam = PackageInstaller.SessionParams(MODE_FULL_INSTALL) in withPrivilegedPermissions_canAccessResolvedPath() 254 var sessionInfo: PackageInstaller.SessionInfo? = null in withPrivilegedPermissions_canAccessResolvedPath() 272 val sessionParam = PackageInstaller.SessionParams(MODE_FULL_INSTALL) in withoutPrivilegedPermissions_cannotAccessResolvedPath() 295 private fun commitSessionWithImmutablePendingIntent(session: PackageInstaller.Session) { in commitSessionWithImmutablePendingIntent()
|
D | InstallSourceInfoTest.kt | 21 import android.content.pm.PackageInstaller 83 assertThat(info.packageSource).isEqualTo(PackageInstaller.PACKAGE_SOURCE_OTHER) in installViaAdb() 115 installViaSession(PackageInstaller.PACKAGE_SOURCE_STORE) in installViaSessionByStore() 120 installViaSession(PackageInstaller.PACKAGE_SOURCE_LOCAL_FILE) in installViaSessionByLocalFile() 134 assertThat(result.status).isEqualTo(PackageInstaller.STATUS_SUCCESS) in installViaSession() 146 PackageInstaller.PACKAGE_SOURCE_UNSPECIFIED) in installViaSession()
|
/cts/tests/tests/content/TestInstallerApp/src/com/android/cts/testinstallerapp/ |
D | MainActivity.java | 20 import android.content.pm.PackageInstaller; 33 final PackageInstaller packageInstaller = getPackageManager().getPackageInstaller(); in onCreate() 34 final PackageInstaller.SessionParams params = in onCreate() 35 new PackageInstaller.SessionParams( in onCreate() 36 PackageInstaller.SessionParams.MODE_FULL_INSTALL); in onCreate()
|
/cts/hostsidetests/devicepolicy/app/PackageInstaller/src/com/android/cts/packageinstaller/ |
D | BasePackageInstallTest.java | 27 import android.content.pm.PackageInstaller; 56 private PackageInstaller mPackageInstaller; 57 private PackageInstaller.Session mSession; 68 mCallbackStatus = intent.getIntExtra(PackageInstaller.EXTRA_STATUS, 70 if (mCallbackStatus == PackageInstaller.STATUS_SUCCESS) { 73 PackageInstaller.EXTRA_PACKAGE_NAME)); 74 } else if (mCallbackStatus == PackageInstaller.STATUS_PENDING_USER_ACTION) { 126 PackageInstaller.SessionParams params = new PackageInstaller.SessionParams( in installPackage() 127 PackageInstaller.SessionParams.MODE_FULL_INSTALL); in installPackage() 193 return mCallbackStatus == PackageInstaller.STATUS_SUCCESS; in executeAndWaitForPckageInstallCallback()
|
/cts/tests/tests/packageinstaller/uninstall/src/android/packageinstaller/uninstall/cts/ |
D | ArchiveTest.java | 48 import android.content.pm.PackageInstaller; 49 import android.content.pm.PackageInstaller.UnarchivalState; 115 private PackageInstaller mPackageInstaller; 211 assertThat(intent.getIntExtra(PackageInstaller.EXTRA_STATUS, -100)).isEqualTo( in requestArchive_confirmationDialog() 212 PackageInstaller.STATUS_PENDING_USER_ACTION); in requestArchive_confirmationDialog() 255 assertThat(archiveIntent.getIntExtra(PackageInstaller.EXTRA_STATUS, in unarchiveApp_weakPermissions() 257 PackageInstaller.STATUS_SUCCESS); in unarchiveApp_weakPermissions() 269 assertThat(unarchiveIntent.getStringExtra(PackageInstaller.EXTRA_PACKAGE_NAME)).isEqualTo( in unarchiveApp_weakPermissions() 271 assertThat(unarchiveIntent.getIntExtra(PackageInstaller.EXTRA_UNARCHIVE_STATUS, in unarchiveApp_weakPermissions() 273 PackageInstaller.STATUS_PENDING_USER_ACTION); in unarchiveApp_weakPermissions() [all …]
|
/cts/hostsidetests/appsecurity/test-apps/SessionInspector/src/com/android/cts/sessioninspector/ |
D | SessionInspectorTest.java | 31 import android.content.pm.PackageInstaller; 58 final PackageInstaller.SessionInfo sessionToMe = getSessionInfo(myPackage, sessionId); in testOnlyOwnerCanSee() 59 final PackageInstaller.SessionInfo sessionToOther = getSessionInfo(otherPackage, sessionId); in testOnlyOwnerCanSee() 74 return result.getInt(PackageInstaller.EXTRA_SESSION_ID, 0); in createSession() 77 private PackageInstaller.SessionInfo getSessionInfo(String packageName, int session) in getSessionInfo() 80 PackageInstaller.EXTRA_SESSION_ID, session).setComponent( in getSessionInfo() 82 return result.getParcelable(PackageInstaller.EXTRA_SESSION); in getSessionInfo() 86 sendCommand(new Intent(ACTION_ABANDON_SESSION).putExtra(PackageInstaller.EXTRA_SESSION_ID, in abandonSession()
|
D | SessionInspectorActivity.java | 20 import static android.content.pm.PackageInstaller.EXTRA_SESSION; 21 import static android.content.pm.PackageInstaller.EXTRA_SESSION_ID; 22 import static android.content.pm.PackageInstaller.SessionInfo; 23 import static android.content.pm.PackageInstaller.SessionParams; 24 import static android.content.pm.PackageInstaller.SessionParams.MODE_FULL_INSTALL;
|
/cts/tests/tests/packageinstaller/adminpackageinstaller/src/android/packageinstaller/admin/cts/ |
D | BasePackageInstallTest.java | 34 import android.content.pm.PackageInstaller; 79 private PackageInstaller mPackageInstaller; 80 private PackageInstaller.Session mSession; 94 mCallbackStatus = intent.getIntExtra(PackageInstaller.EXTRA_STATUS, 96 if (mCallbackStatus == PackageInstaller.STATUS_SUCCESS) { 99 PackageInstaller.EXTRA_PACKAGE_NAME)); 100 } else if (mCallbackStatus == PackageInstaller.STATUS_PENDING_USER_ACTION) { 190 assertEquals(PackageInstaller.STATUS_SUCCESS, mCallbackStatus); in assertInstallPackage() 208 return mCallbackStatus == PackageInstaller.STATUS_SUCCESS; in tryUninstallPackage() 213 PackageInstaller.SessionParams params = new PackageInstaller.SessionParams( in installPackage() [all …]
|
/cts/tests/tests/packageinstaller/test-apps/criticaluserjourneyinstaller/src/android/packageinstaller/cts/cujinstaller/ |
D | MainActivity.java | 23 import static android.content.pm.PackageInstaller.EXTRA_STATUS; 24 import static android.content.pm.PackageInstaller.STATUS_FAILURE_INVALID; 25 import static android.content.pm.PackageInstaller.STATUS_PENDING_USER_ACTION; 34 import android.content.pm.PackageInstaller; 83 private PackageInstaller mPackageInstaller; 113 List<PackageInstaller.SessionInfo> sessionInfoList = mPackageInstaller.getMySessions(); in cleanUpSessions() 175 final PackageInstaller.SessionParams params = new PackageInstaller.SessionParams( in startInstallationViaPackageInstallerSession() 176 PackageInstaller.SessionParams.MODE_FULL_INSTALL); in startInstallationViaPackageInstallerSession() 181 final PackageInstaller.Session session = mPackageInstaller.openSession(sessionId); in startInstallationViaPackageInstallerSession() 244 int sessionId = intent.getIntExtra(PackageInstaller.EXTRA_SESSION_ID, -1); in prettyPrint() [all …]
|
/cts/tests/tests/packageinstaller/atomicinstall/src/com/android/tests/atomicinstall/ |
D | AtomicInstallTest.java | 28 import android.content.pm.PackageInstaller; 162 try (PackageInstaller.Session parent = openPackageInstallerSession(parentId)) { in testRemoveChild() 215 PackageInstaller.SessionParams.MODE_INHERIT_EXISTING); in testChildFailurePropagated() 236 PackageInstaller.SessionParams params = new PackageInstaller.SessionParams( in testInvalidStateScenario_MultiSessionCantBeApex() 237 PackageInstaller.SessionParams.MODE_FULL_INSTALL); in testInvalidStateScenario_MultiSessionCantBeApex() 258 try (PackageInstaller.Session parent = openPackageInstallerSession(parentId)) { in testInvalidStateScenario_AddChildToSingleSessionShouldFail() 274 try (PackageInstaller.Session parent = openPackageInstallerSession(parentId)) { in testInvalidStateScenario_MultiSessionAddedAsChildShouldFail() 290 try (PackageInstaller.Session parent = openPackageInstallerSession(parentId)) { in testInvalidStateScenario_AddChildToCommittedSessionShouldFail() 309 try (PackageInstaller.Session parent = openPackageInstallerSession(parentId)) { in testInvalidStateScenario_RemoveChildFromCommittedSessionShouldFail() 329 try (PackageInstaller.Session parent1 = openPackageInstallerSession(parent1Id); in testInvalidStateScenario_RemoveWrongChildShouldDoNothing() [all …]
|
/cts/tests/tests/packageinstaller/packagescheme/src/android/packageinstaller/packagescheme/cts/ |
D | PackageSchemeTestBase.kt | 26 import android.content.pm.PackageInstaller in <lambda>() 67 val mInstaller: PackageInstaller = mContext.packageManager.packageInstaller in <lambda>() 190 val params = PackageInstaller.SessionParams( in <lambda>() 191 PackageInstaller.SessionParams.MODE_FULL_INSTALL in <lambda>() 193 params.setRequireUserAction(PackageInstaller.SessionParams.USER_ACTION_NOT_REQUIRED) in <lambda>() 195 val session: PackageInstaller.Session = mInstaller.openSession(sessionId) in <lambda>() 205 val installStatus = result.getIntExtra(PackageInstaller.EXTRA_STATUS, Int.MIN_VALUE) in <lambda>() 206 if (installStatus != PackageInstaller.STATUS_SUCCESS) { in <lambda>() 207 val id = result.getIntExtra(PackageInstaller.EXTRA_SESSION_ID, Int.MIN_VALUE) in <lambda>() 214 assertThat(installStatus).isEqualTo(PackageInstaller.STATUS_SUCCESS) in <lambda>()
|
/cts/hostsidetests/stagedinstall/app/src/com/android/tests/stagedinstall/ |
D | ApexShimValidationTest.java | 25 import android.content.pm.PackageInstaller; 70 PackageInstaller.SessionInfo info = in testRejectsApexWithAdditionalFile_Commit() 78 PackageInstaller.SessionInfo info = in testRejectsApexWithAdditionalFolder_Commit() 86 PackageInstaller.SessionInfo info = in testRejectsApexWithPostInstallHook_Commit() 94 PackageInstaller.SessionInfo info = in testRejectsApexWithPreInstallHook_Commit() 102 PackageInstaller.SessionInfo info = in testRejectsApexWrongSHA_Commit() 174 try (PackageInstaller.Session session = in stageApex()
|
/cts/tests/tests/content/src/android/content/pm/cts/ |
D | InstallSessionParamsUnitTest.java | 23 import static android.content.pm.PackageInstaller.SessionParams.MODE_FULL_INSTALL; 24 import static android.content.pm.PackageInstaller.SessionParams.MODE_INHERIT_EXISTING; 39 import android.content.pm.PackageInstaller; 40 import android.content.pm.PackageInstaller.SessionInfo; 41 import android.content.pm.PackageInstaller.SessionParams; 98 private PackageInstaller mInstaller = InstrumentationRegistry.getInstrumentation() 173 {{PackageInstaller.PACKAGE_SOURCE_UNSPECIFIED, in getParameters() 174 PackageInstaller.PACKAGE_SOURCE_OTHER, in getParameters() 175 PackageInstaller.PACKAGE_SOURCE_STORE, in getParameters() 176 PackageInstaller.PACKAGE_SOURCE_LOCAL_FILE, in getParameters() [all …]
|
/cts/tests/tests/security/src/android/security/cts/ |
D | CVE_2024_0044.java | 19 import static android.content.pm.PackageInstaller.SessionParams; 20 import static android.content.pm.PackageInstaller.SessionParams.MODE_FULL_INSTALL; 31 import android.content.pm.PackageInstaller; 66 final PackageInstaller packageInstaller = in testPocCVE_2024_0044()
|