/cts/libs/install/src/com/android/cts/install/lib/ |
D | TestApp.java | 32 public class TestApp { class 40 public static final TestApp A1 = new TestApp("Av1", A, 1, /*isApex*/false, 42 public static final TestApp A2 = new TestApp("Av2", A, 2, /*isApex*/false, 44 public static final TestApp A3 = new TestApp("Av3", A, 3, /*isApex*/false, 46 public static final TestApp ACrashing2 = new TestApp("ACrashingV2", A, 2, /*isApex*/false, 48 public static final TestApp ASplit1 = new TestApp("ASplitV1", A, 1, /*isApex*/false, 50 public static final TestApp ASplit2 = new TestApp("ASplitV2", A, 2, /*isApex*/false, 52 public static final TestApp AIncompleteSplit = new TestApp("AIncompleteSplit", A, 1, 54 public static final TestApp AOriginal1 = new TestApp("AOriginalV1", A, 1, /*isApex*/false, 56 public static final TestApp ARotated2 = new TestApp("ARotatedV2", A, 2, /*isApex*/false, [all …]
|
D | Install.java | 40 private final TestApp[] mTestApps; 61 private Install(boolean isMultiPackage, TestApp... testApps) { in Install() 69 mTestApps = new TestApp[0]; in Install() 76 public static Install single(TestApp testApp) { in single() 83 public static Install multi(TestApp... testApps) { in multi() 255 for (TestApp testApp : mTestApps) { in createSession() 334 private int createSingleInstallSession(TestApp app) throws IOException { in createSingleInstallSession()
|
/cts/tests/rollback/src/com/android/cts/rollback/ |
D | RollbackManagerTest.java | 42 import com.android.cts.install.lib.TestApp; 91 Uninstall.packages(TestApp.A, TestApp.B, TestApp.C); in setup() 99 Uninstall.packages(TestApp.A, TestApp.B, TestApp.C); in teardown() 110 Install.single(TestApp.A1).commit(); in testBasic() 111 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(1); in testBasic() 113 () -> getRollbackManager().getAvailableRollbacks(), TestApp.A); in testBasic() 115 () -> getRollbackManager().getRecentlyCommittedRollbacks(), TestApp.A); in testBasic() 117 Install.single(TestApp.A2).setEnableRollback().commit(); in testBasic() 118 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(2); in testBasic() 119 InstallUtils.processUserData(TestApp.A); in testBasic() [all …]
|
/cts/hostsidetests/rollback/app/src/com/android/cts/rollback/host/app/ |
D | HostTestHelper.java | 37 import com.android.cts.install.lib.TestApp; 62 private static final TestApp Apex2SignedBobRotRollback = new TestApp( 103 assertThat(InstallUtils.getInstalledVersion(TestApp.A)).isEqualTo(-1); in testApkOnlyStagedRollback_Phase1_Install() 105 Install.single(TestApp.A1).commit(); in testApkOnlyStagedRollback_Phase1_Install() 106 Install.single(TestApp.A2).setStaged().setEnableRollback().commit(); 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() 119 RollbackInfo available = RollbackUtils.getAvailableRollback(TestApp.A); in testApkOnlyStagedRollback_Phase2_RollBack() 122 Rollback.from(TestApp.A2).to(TestApp.A1)); in testApkOnlyStagedRollback_Phase2_RollBack() 123 assertThat(RollbackUtils.getCommittedRollback(TestApp.A)).isNull(); in testApkOnlyStagedRollback_Phase2_RollBack() [all …]
|
/cts/tests/tests/util/src/android/util/cts/ |
D | InstallUtilTest.java | 34 import com.android.cts.install.lib.TestApp; 67 Uninstall.packages(TestApp.A, TestApp.B); in teardown() 82 Uninstall.packages(TestApp.A, TestApp.B); in setup() 88 private void assertSameResource(TestApp a, TestApp b) throws Exception { in assertSameResource() 106 Install.multi(TestApp.A1, TestApp.B2).commit(); in testNativeFilePathTestApp() 108 TestApp a1 = new TestApp(TestApp.A1.toString(), TestApp.A1.getPackageName(), in testNativeFilePathTestApp() 109 TestApp.A1.getVersionCode(), false, in testNativeFilePathTestApp() 110 new File(InstallUtils.getPackageInfo(TestApp.A).applicationInfo.sourceDir)); in testNativeFilePathTestApp() 111 TestApp b2 = new TestApp(TestApp.B2.toString(), TestApp.B2.getPackageName(), in testNativeFilePathTestApp() 112 TestApp.B2.getVersionCode(), false, in testNativeFilePathTestApp() [all …]
|
/cts/tests/tests/packageinstaller/atomicinstall/src/com/android/tests/atomicinstall/ |
D | AtomicInstallTest.java | 36 import com.android.cts.install.lib.TestApp; 63 private static final TestApp CORRUPT_TESTAPP = new TestApp( 78 Uninstall.packages(TestApp.A, TestApp.B, TestApp.C); in setup() 119 int sessionId = Install.single(TestApp.A1).commit(); in testSessionCleanUp_Single() 120 assertThat(getInstalledVersion(TestApp.A)).isEqualTo(1); in testSessionCleanUp_Single() 133 int sessionId = Install.multi(TestApp.A1, TestApp.B1).commit(); in testSessionCleanUp_Multi() 134 assertThat(getInstalledVersion(TestApp.A)).isEqualTo(1); in testSessionCleanUp_Multi() 135 assertThat(getInstalledVersion(TestApp.B)).isEqualTo(1); in testSessionCleanUp_Multi() 145 Install.multi(TestApp.A1, TestApp.B1).commit(); in testInstallTwoApks() 146 assertThat(getInstalledVersion(TestApp.A)).isEqualTo(1); in testInstallTwoApks() [all …]
|
D | SessionAbandonBehaviorTest.java | 42 import com.android.cts.install.lib.TestApp; 261 Uninstall.packages(TestApp.A, TestApp.B); in setUp() 267 final int sessionId = Install.single(TestApp.A1).setStaged().createSession(); in abandon_stagedSession_shouldReceiveAbandonCallBack() 281 final int sessionId = Install.single(TestApp.A1).createSession(); in abandon_nonStagedSession_shouldReceiveAbandonCallBack() 296 final int sessionId = Install.single(TestApp.A1).setStaged().createSession(); in abandon_stagedSession_openedSession_canNotGetNames() 313 final int sessionId = Install.single(TestApp.A1).createSession(); in abandon_nonStagedSession_openedSession_canNotGetNames() 330 final int sessionId = Install.single(TestApp.A1).setStaged().createSession(); in abandon_stagedSession_openForWriting_shouldFail() 348 final int sessiondId = Install.single(TestApp.A1).createSession(); in abandon_nonStagedSession_openForWriting_shouldFail() 366 final int sessionId = Install.single(TestApp.A1).setStaged().createSession(); in abandon_stagedSession_canNotOpenAgain() 382 final int sessionId = Install.single(TestApp.A1).createSession(); in abandon_nonStagedSession_canNotOpenAgain() [all …]
|
/cts/hostsidetests/install/app/src/android/cts/install/ |
D | InstallRule.java | 32 import com.android.cts.install.lib.TestApp; 55 private static final Table<String, Integer, TestApp> sTestAppMap = getTestAppTable(); 91 Uninstall.packages(TestApp.A, TestApp.B); in cleanUp() 95 List<TestApp> getTestApps(INSTALL_TYPE installType, int versionCode) { in getTestApps() 131 return Arrays.asList(TestApp.A); in getTestPackageNames() 135 return Arrays.asList(TestApp.A, TestApp.B); in getTestPackageNames() 137 return Arrays.asList(TestApp.A, SHIM_APEX_PACKAGE_NAME); in getTestPackageNames() 143 private static TestApp getTestApp(String packageName, int version) { in getTestApp() 150 private static Table<String, Integer, TestApp> getTestAppTable() { in getTestAppTable() 151 Table<String, Integer, TestApp> testAppMap = HashBasedTable.create(); in getTestAppTable() [all …]
|
/cts/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/ |
D | InstallConstraintsTest.kt | 40 import com.android.cts.install.lib.TestApp in <lambda>() 58 private val HelloWorldSdk1 = TestApp( in <lambda>() 62 private val HelloWorldUsingSdk1 = TestApp( in <lambda>() 81 Uninstall.packages(TestApp.A, TestApp.B, TestApp.S) in <lambda>() 117 Install.single(TestApp.A1).commit() in <lambda>() 120 AppOpsUtils.setOpMode(TestApp.A, OPSTR_TAKE_AUDIO_FOCUS, MODE_ALLOWED) in <lambda>() 122 InstallUtils.requestAudioFocus(TestApp.A) in <lambda>() 127 listOf(TestApp.A), in <lambda>() 133 AppOpsUtils.reset(TestApp.A) in <lambda>() 139 assertThat(getInstalledVersion(TestApp.A)).isEqualTo(-1) in <lambda>() [all …]
|
/cts/tests/tests/appenumeration/src/android/appenumeration/cts/ |
D | PackageInstallerEnumerationTests.java | 40 import com.android.cts.install.lib.TestApp; 65 final int sessionId = Install.single(TestApp.A1).setPackageName(TestApp.A).createSession(); in getSessionInfo_queriesNothing_cannotSeeSession() 73 final int sessionId = Install.single(TestApp.A1).setPackageName(TestApp.A).createSession(); in getSessionInfo_queriesNothingHasPermission_canSeeSession() 81 final int sessionId = Install.single(TestApp.A1).setPackageName(TestApp.A).createSession(); in getSessionInfo_queriesPackage_canSeeSession() 89 final int sessionId = Install.single(TestApp.A1).setPackageName(TestApp.A).createSession(); in getSessionInfo_queriesNothingTargetsQ_canSeeSession() 97 final int sessionId = Install.single(TestApp.A1).setPackageName(TestApp.A).createSession(); in getSessionInfo_sessionOwner_canSeeSession() 105 final int sessionId = Install.single(TestApp.A1).setPackageName(TestApp.A).setStaged() in getStagedSessions_queriesNothing_cannotSeeSession() 114 final int sessionId = Install.single(TestApp.A1).setPackageName(TestApp.A).setStaged() in getStagedSessions_queriesNothingHasPermission_canSeeSession() 123 final int sessionId = Install.single(TestApp.A1).setPackageName(TestApp.A).setStaged() in getStagedSessions_queriesPackage_canSeeSession() 132 final int sessionId = Install.single(TestApp.A1).setPackageName(TestApp.A).setStaged() in getStagedSessions_queriesNothingTargetsQ_canSeeSession() [all …]
|
D | LauncherAppsEnumerationTests.java | 82 import com.android.cts.install.lib.TestApp; 244 final int sessionId = Install.single(TestApp.A1).setPackageName(TestApp.A) in sessionCallback_queriesNothing_cannotSeeSession() 252 uninstallPackage(TestApp.A); in sessionCallback_queriesNothing_cannotSeeSession() 262 final int sessionId = Install.single(TestApp.A1).setPackageName(TestApp.A) in sessionCallback_queriesNothingHasPermission_canSeeSession() 270 uninstallPackage(TestApp.A); in sessionCallback_queriesNothingHasPermission_canSeeSession() 280 final int sessionId = Install.single(TestApp.A1).setPackageName(TestApp.A) in sessionCallback_queriesPackage_canSeeSession() 288 uninstallPackage(TestApp.A); in sessionCallback_queriesPackage_canSeeSession() 298 final int sessionId = Install.single(TestApp.A1).setPackageName(TestApp.A) in sessionCallback_queriesNothingTargetsQ_canSeeSession() 306 uninstallPackage(TestApp.A); in sessionCallback_queriesNothingTargetsQ_canSeeSession() 316 final int expectedSessionId = Install.single(TestApp.A1).setPackageName(TestApp.A) in sessionCallback_sessionOwner_canSeeSession() [all …]
|
/cts/hostsidetests/stagedinstall/app/src/com/android/tests/stagedinstall/ |
D | StagedInstallTest.java | 52 import com.android.cts.install.lib.TestApp; 118 private static final TestApp TESTAPP_SAME_NAME_AS_APEX = new TestApp( 121 private static final TestApp Apex2DifferentCertificate = new TestApp( 124 private static final TestApp Apex2DifferentPackageName = new TestApp( 127 private static final TestApp Apex2SignedBob = new TestApp( 130 private static final TestApp Apex2SignedBobRot = new TestApp( 133 private static final TestApp Apex2SignedBobRotRollback = new TestApp( 136 private static final TestApp ApexNoHashtree2 = new TestApp( 139 private static final TestApp ApexWrongSha2 = new TestApp( 142 private static final TestApp Apex2WithoutApkInApex = new TestApp( [all …]
|
D | ApexShimValidationTest.java | 32 import com.android.cts.install.lib.TestApp; 115 TestApp apex = new TestApp("ShimApex", SHIM_APEX_PACKAGE_NAME, 2, in testRejectsApexWithAdditionalFile_rebootless() 127 TestApp apex = new TestApp("ShimApex", SHIM_APEX_PACKAGE_NAME, 2, in testRejectsApexWithAdditionalFolder_rebootless() 139 TestApp apex = new TestApp("ShimApex", SHIM_APEX_PACKAGE_NAME, 2, in testRejectsApexWithPostInstallHook_rebootless() 151 TestApp apex = new TestApp("ShimApex", SHIM_APEX_PACKAGE_NAME, 2, in testRejectsApexWithPreInstallHook_rebootless() 163 TestApp apex = new TestApp("ShimApex", SHIM_APEX_PACKAGE_NAME, 2, in testRejectsApexWrongSHA_rebootless() 171 TestApp apexTestApp = new TestApp("ShimApex", SHIM_APEX_PACKAGE_NAME, 2, in stageApex()
|
/cts/common/device-side/bedstead/testapp/src/test/java/com/android/bedstead/testapp/ |
D | TestAppTest.java | 54 TestApp testApp = sDeviceState.testApps().any(); in reference_returnsNeneReference() 61 TestApp testApp = sDeviceState.testApps().any(); in install_noUserSpecified_installsInInstrumentedUser() 74 TestApp testApp = sDeviceState.testApps().any(); in install_userReference_installs() 87 TestApp testApp = sDeviceState.testApps().any(); in install_userReference_returnsReferenceToInstance() 101 TestApp testApp = sDeviceState.testApps().any(); in install_userHandle_installs() 114 TestApp testApp = sDeviceState.testApps().any(); in install_userHandle_returnsReferenceToInstance() 128 TestApp testApp = sDeviceState.testApps().any(); in install_nullUserReference_throwsException() 135 TestApp testApp = sDeviceState.testApps().any(); in install_nullUserHandle_throwsException() 142 TestApp testApp = sDeviceState.testApps().any(); in instance_userHandle_instanceIsNotInstalled_stillReturnsInstance() 152 TestApp testApp = sDeviceState.testApps().any(); in instance_userReference_instanceIsNotInstalled_stillReturnsInstance() [all …]
|
D | TestAppProviderTest.java | 383 TestApp firstResult = mTestAppProvider.query() in query_byFeature_returnsDifferentTestAppsForSameQuery() 386 TestApp secondResult = mTestAppProvider.query() in query_byFeature_returnsDifferentTestAppsForSameQuery() 395 TestApp testApp = mTestAppProvider.query() in query_testOnly_returnsMatching() 404 TestApp testApp = mTestAppProvider.query() in query_notTestOnly_returnsMatching() 413 TestApp testApp = mTestAppProvider.query() in query_minSdkVersion_returnsMatching() 422 TestApp testApp = mTestAppProvider.query() in query_targetSdkVersion_returnsMatching() 431 TestApp testApp = mTestAppProvider.query() in query_withPermission_returnsMatching() 440 TestApp testApp = mTestAppProvider.query() in query_withoutPermission_returnsMatching() 449 TestApp testApp = mTestAppProvider.query() in query_metadata_returnsMatching() 458 TestApp testApp = mTestAppProvider.query() in query_withExistingActivity_returnsMatching() [all …]
|
/cts/hostsidetests/scopedstorage/bypassdatabase/src/android/scopedstorage/cts/bypassdatabase/ |
D | BypassDatabaseOperationsTest.java | 46 import com.android.cts.install.lib.TestApp; 65 private static final TestApp APP_SYSTEM_GALLERY_DEFAULT = new TestApp("TestAppA", 70 private static final TestApp APP_SYSTEM_GALLERY_BYPASS_DB = new TestApp( 75 private static final TestApp APP_SYSTEM_GALLERY_30 = new TestApp("TestAppE30", 80 private static final TestApp APP_SYSTEM_GALLERY_30_BYPASS_DB = new TestApp( 86 private static final TestApp APP_FM_DEFAULT = new TestApp( 91 private static final TestApp APP_FM_BYPASS_DATABASE_OPS = new TestApp( 95 private static final TestApp APP_FM_TARGETS_30 = new TestApp("TestAppE30FileManager", 231 private void testAppDoesntBypassDatabaseOps(TestApp app) throws Exception { in testAppDoesntBypassDatabaseOps() 257 private void testAppBypassesDatabaseOps(TestApp app) throws Exception { in testAppBypassesDatabaseOps()
|
/cts/hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/ |
D | PackageNameVisibilityTest.java | 33 import com.android.cts.install.lib.TestApp; 58 private static final TestApp TEST_APP_WITH_APP_B_IN_QUERIES_TAG = new TestApp( 63 private static final TestApp TEST_APP_WITH_QUERY_ALL_PACKAGES_TAG = new TestApp( 67 private static final TestApp TEST_APP_A = new TestApp("TestAppA", 71 private static final TestApp TEST_APP_B = new TestApp("TestAppB", 75 private static final TestApp TEST_APP_TARGET_BELOW_34 = new TestApp("TestAppDLegacy", 79 private static final TestApp TEST_APP_WITH_ACCESS_MEDIA_OWNER_PACKAGE_NAME = new TestApp( 288 private static Uri createMediaAs(TestApp testApp) { in createMediaAs()
|
/cts/tests/tests/content/pm/SecureFrp/src/com/android/tests/securefrpinstall/ |
D | SecureFrpInstallTest.java | 31 import com.android.cts.install.lib.TestApp; 81 sPackageManager.getPackageInfo(TestApp.A, PackageManager.PackageInfoFlags.of(0)); in assertInstalled() 86 sPackageManager.getPackageInfo(TestApp.A, PackageManager.PackageInfoFlags.of(0)); in assertNotInstalled() 103 Uninstall.packages(TestApp.A); in setup() 118 Install.single(TestApp.A1).commit(); in testPackageInstallApi() 130 Install.single(TestApp.A1).commit(); in testPackageInstallApiAsShell()
|
/cts/libs/rollback/src/com/android/cts/rollback/lib/ |
D | Rollback.java | 22 import com.android.cts.install.lib.TestApp; 37 private Rollback(TestApp from) { in Rollback() 49 public static Rollback from(TestApp app) { in from() 65 public Rollback to(TestApp app) { in to()
|
/cts/common/device-side/bedstead/remotedpc/src/main/java/com/android/bedstead/remotedpc/ |
D | RemoteDevicePolicyManagerRoleHolder.java | 22 import com.android.bedstead.testapp.TestApp; 31 public static final TestApp sTestApp = sTestAppProvider.query() 35 public RemoteDevicePolicyManagerRoleHolder(TestApp testApp, UserReference user) { in RemoteDevicePolicyManagerRoleHolder()
|
D | RemoteDelegate.java | 24 import com.android.bedstead.testapp.TestApp; 33 public static final TestApp sTestApp = sTestAppProvider.query() 37 public RemoteDelegate(TestApp testApp, UserReference user) { in RemoteDelegate()
|
D | RemotePolicyManager.java | 24 import com.android.bedstead.testapp.TestApp; 30 RemotePolicyManager(TestApp testApp, UserReference user) { in RemotePolicyManager()
|
/cts/hostsidetests/rollback/app2/src/com/android/cts/rollback/host/app2/ |
D | HostTestHelper.java | 27 import com.android.cts.install.lib.TestApp; 65 RollbackInfo rollbackA = RollbackUtils.waitForAvailableRollback(TestApp.A); in testApkRollbackByAnotherInstaller_Phase2_SecondInstaller() 66 assertThat(rollbackA).packagesContainsExactly(Rollback.from(TestApp.A2).to(TestApp.A1)); in testApkRollbackByAnotherInstaller_Phase2_SecondInstaller()
|
/cts/tests/camera/src/android/hardware/camera2/cts/ |
D | PropertyTest.java | 36 import com.android.cts.install.lib.TestApp; 57 private static final TestApp PROPERTY_APP1 = 58 new TestApp("CameraCtsPropertyTestApp1", PROPERTY_APP1_PACKAGE_NAME, 30, 60 private static final TestApp PROPERTY_APP2 = 61 new TestApp("CameraCtsPropertyTestApp2", PROPERTY_APP2_PACKAGE_NAME, 30,
|
/cts/hostsidetests/scopedstorage/libs/ScopedStorageTestLib/src/android/scopedstorage/cts/lib/ |
D | TestUtils.java | 75 import com.android.cts.install.lib.TestApp; 279 public static ArrayList<String> listAs(TestApp testApp, String dirPath) throws Exception { in listAs() 287 public static boolean canReadAndWriteAs(TestApp testApp, String path) throws Exception { in canReadAndWriteAs() 296 TestApp testApp, String filePath) throws Exception { in readExifMetadataFromTestApp() 307 public static boolean createFileAs(TestApp testApp, String path) throws Exception { in createFileAs() 316 public static boolean createFileAs(TestApp testApp, String path, IBinder content) in createFileAs() 328 public static boolean createImageEntryAs(TestApp testApp, String path) throws Exception { in createImageEntryAs() 341 public static Uri createImageEntryForUriAs(TestApp testApp, String path) throws Exception { in createImageEntryForUriAs() 353 public static String[] queryForOwnerPackageNamesAs(TestApp testApp, Uri uri) throws Exception { in queryForOwnerPackageNamesAs() 365 public static int queryWithArgsAs(TestApp testApp, Uri uri, Bundle queryArgs) throws Exception { in queryWithArgsAs() [all …]
|