/cts/hostsidetests/statsdatom/src/android/cts/statsdatom/lib/ |
D | ConfigUtils.java | 65 public static StatsdConfig.Builder createConfigBuilder(String pkgName) { in createConfigBuilder() argument 77 .addAllowedLogSource(pkgName) in createConfigBuilder() 95 boolean uidInAttributionChain, String pkgName) { in addEventMetricForUidAtom() argument 96 FieldValueMatcher.Builder fvm = createUidFvm(uidInAttributionChain, pkgName); in addEventMetricForUidAtom() 152 boolean uidInAttributionChain, String pkgName) { in addGaugeMetricForUidAtom() argument 153 addGaugeMetricInternal(config, atomId, /*filterByUid=*/true, uidInAttributionChain, pkgName, in addGaugeMetricForUidAtom() 164 int atomId, boolean uidInAttributionChain, String pkgName, in addGaugeMetricForUidAtomWithDimensions() argument 166 addGaugeMetricInternal(config, atomId, /*filterByUid=*/true, uidInAttributionChain, pkgName, in addGaugeMetricForUidAtomWithDimensions() 196 boolean filterByUid, boolean uidInAttributionChain, @Nullable String pkgName, in addGaugeMetricInternal() argument 204 if (filterByUid && pkgName != null) { in addGaugeMetricInternal() [all …]
|
D | DeviceUtils.java | 83 public static @Nonnull TestRunResult runDeviceTests(ITestDevice device, String pkgName, in runDeviceTests() argument 86 return internalRunDeviceTests(device, pkgName, testClassName, testMethodName, null); in runDeviceTests() 101 public static @Nonnull TestRunResult runDeviceTests(ITestDevice device, String pkgName, in runDeviceTests() argument 105 return internalRunDeviceTests(device, pkgName, testClassName, testMethodName, listener); in runDeviceTests() 108 private static @Nonnull TestRunResult internalRunDeviceTests(ITestDevice device, String pkgName, in internalRunDeviceTests() argument 113 testClassName = pkgName + testClassName; in internalRunDeviceTests() 117 pkgName, TEST_RUNNER, device.getIDevice()); in internalRunDeviceTests() 177 public static void installTestApp(ITestDevice device, String apkName, String pkgName, in installTestApp() argument 184 allowBackgroundServices(device, pkgName); in installTestApp() 190 private static void allowBackgroundServices(ITestDevice device, String pkgName) in allowBackgroundServices() argument [all …]
|
/cts/hostsidetests/appcompat/host/lib/src/android/compat/cts/ |
D | CompatChangeGatingTestCase.java | 123 protected void runDeviceCompatTest(@Nonnull String pkgName, @Nonnull String testClassName, in runDeviceCompatTest() argument 127 runDeviceCompatTestReported(pkgName, testClassName, testMethodName, enabledChanges, in runDeviceCompatTest() 144 … protected void runDeviceCompatTestReported(@Nonnull String pkgName, @Nonnull String testClassName, in runDeviceCompatTestReported() argument 151 setCompatConfig(enabledChanges, disabledChanges, pkgName); in runDeviceCompatTestReported() 154 createAndUploadStatsdConfig(configId, pkgName); in runDeviceCompatTestReported() 159 testClassName = pkgName + testClassName; in runDeviceCompatTestReported() 161 RemoteAndroidTestRunner testRunner = new RemoteAndroidTestRunner(pkgName, TEST_RUNNER, in runDeviceCompatTestReported() 190 resetCompatConfig(pkgName, enabledChanges, disabledChanges); in runDeviceCompatTestReported() 192 validatePostRunStatsdReport(configId, pkgName, reportedEnabledChanges, in runDeviceCompatTestReported() 231 protected void createAndUploadStatsdConfig(long configId, String pkgName) in createAndUploadStatsdConfig() argument [all …]
|
/cts/hostsidetests/blobstore/src/com/android/cts/host/blob/ |
D | BaseBlobStoreHostTest.java | 149 protected int getAppUid(String pkgName) throws Exception { in getAppUid() argument 152 "cmd package list packages -U --user " + currentUser + " " + pkgName); in getAppUid() 153 final Pattern pattern = Pattern.compile("package:" + pkgName + " uid:(\\d+)"); in getAppUid() 155 assertWithMessage("Pkg not found: " + pkgName).that(matcher.find()).isTrue(); in getAppUid() 160 protected void addAssistRoleHolder(String pkgName, int userId) throws Exception { in addAssistRoleHolder() argument 162 + "--user %d android.app.role.ASSISTANT %s", userId, pkgName); in addAssistRoleHolder() 167 if (Arrays.stream(getAssistRoleHolders(userId)).anyMatch(pkgName::equals)) { in addAssistRoleHolder() 182 protected void removeAssistRoleHolder(String pkgName, int userId) throws Exception { in removeAssistRoleHolder() argument 184 + "--user %d android.app.role.ASSISTANT %s", userId, pkgName); in removeAssistRoleHolder() 188 protected void revokePermission(String pkgName, String permissionName, int userId) in revokePermission() argument [all …]
|
/cts/tests/tests/security/src/android/security/cts/ |
D | CVE_2022_20234.java | 55 final String pkgName = "com.android.car.settings"; in testPocCVE_2022_20234() local 56 ComponentName component = new ComponentName(pkgName, pkgName + activityName); in testPocCVE_2022_20234() 60 + pkgName in testPocCVE_2022_20234()
|
D | CVE_2023_20927.java | 65 final String pkgName = "com.android.car"; in testPocCVE_2023_20927() local 66 PackageInfo info = pm.getPackageInfo(pkgName, PackageManager.GET_PERMISSIONS); in testPocCVE_2023_20927() 68 "Package info for " + pkgName + " not fetched properly!! ", in testPocCVE_2023_20927() 69 info.packageName.equals(pkgName) && info.coreApp); in testPocCVE_2023_20927()
|
D | CVE_2021_39738.java | 53 final String pkgName = "com.android.car.settings"; in testPocCVE_2021_39738() local 55 new ComponentName(pkgName, pkgName + ".bluetooth.BluetoothPairingDialog"); in testPocCVE_2021_39738()
|
/cts/hostsidetests/packagemanager/multiuser/src/com/android/tests/packagemanager/multiuser/host/ |
D | PackageManagerMultiUserTestBase.java | 68 String pkgName, @Nullable String testClassName, in runDeviceTestAsUser() argument 72 testClassName = pkgName + testClassName; in runDeviceTestAsUser() 78 pkgName, in runDeviceTestAsUser() local 131 protected void installExistingPackageForUser(String pkgName, int userId) throws Exception { in installExistingPackageForUser() argument 132 String command = "pm install-existing --user " + userId + " " + pkgName; in installExistingPackageForUser() 138 protected boolean isPackageInstalledForUser(String pkgName, int userId) throws Exception { in isPackageInstalledForUser() argument 139 return getDevice().isPackageInstalled(pkgName, String.valueOf(userId)); in isPackageInstalledForUser()
|
/cts/hostsidetests/appcompat/hiddenapi/src/android/compat/hiddenapi/cts/ |
D | HostsideStatsdAtomTests.java | 128 public static void runActivity(ITestDevice device, String pkgName, String activity, in runActivity() argument 130 runActivity(device, pkgName, activity, actionKey, actionValue, in runActivity() 143 public static void runActivity(ITestDevice device, String pkgName, String activity, in runActivity() argument 146 try (AutoCloseable a = withActivity(device, pkgName, activity, actionKey, actionValue)) { in runActivity() argument 162 public static AutoCloseable withActivity(ITestDevice device, String pkgName, String activity, in withActivity() argument 171 String cmd = "am start -n " + pkgName + "/." + activity; in withActivity() 178 device.executeShellCommand("am force-stop " + pkgName); in withActivity()
|
/cts/tools/manifest-generator/src/com/android/compatibility/common/generator/ |
D | ManifestGenerator.java | 43 String pkgName = null; in main() local 55 pkgName = args[++i]; in main() 75 if (pkgName == null) { in main() 90 pkgName, in main() 113 String pkgName, in generate() argument 129 serializer.attribute(ns, "package", pkgName); in generate() 161 serializer.attribute(ns, "android:targetPackage", pkgName); in generate()
|
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ |
D | KeySetHostTest.java | 156 private boolean runDeviceTests(String pkgName) throws DeviceNotAvailableException { in runDeviceTests() argument 157 return runDeviceTests(pkgName, null, null); in runDeviceTests() 167 private boolean runDeviceTests(String pkgName, String testClassName, String testMethodName) in runDeviceTests() argument 169 TestRunResult runResult = doRunTests(pkgName, testClassName, testMethodName); in runDeviceTests() 180 private TestRunResult doRunTests(String pkgName, String testClassName, in doRunTests() argument 183 RemoteAndroidTestRunner testRunner = new RemoteAndroidTestRunner(pkgName, in doRunTests() 201 private String testPackageUpgrade(String pkgName, String firstApk, in testPackageUpgrade() argument 207 mDevice.uninstallPackage(pkgName); in testPackageUpgrade() 212 assertNull(String.format("failed to install %s, Reason: %s", pkgName, in testPackageUpgrade() 219 mDevice.uninstallPackage(pkgName); in testPackageUpgrade()
|
D | AppSecurityTests.java | 319 private void runCrossPackageInstallerDeviceTest(String pkgName, String testMethodName) in runCrossPackageInstallerDeviceTest() argument 323 runDeviceTests(getDevice(), null, pkgName, pkgName + ".ModifyInstallerCrossPackageTest", in runCrossPackageInstallerDeviceTest() local 374 private void enableAlertWindowAppOp(String pkgName) throws Exception { in enableAlertWindowAppOp() argument 376 "appops set " + pkgName + " android:system_alert_window allow"); in enableAlertWindowAppOp() 380 "appops get " + pkgName + " android:system_alert_window"); in enableAlertWindowAppOp()
|
/cts/hostsidetests/media/src/android/media/cts/ |
D | BaseMediaHostSideTest.java | 74 String pkgName, @Nullable String testClassName, @Nullable String testMethodName) in runDeviceTests() argument 76 RemoteAndroidTestRunner testRunner = getTestRunner(pkgName, testClassName, testMethodName); in runDeviceTests() 113 String pkgName, String testClassName, String testMethodName) { in getTestRunner() argument 115 testClassName = pkgName + testClassName; in getTestRunner() 119 new RemoteAndroidTestRunner(pkgName, RUNNER, getDevice().getIDevice()); in getTestRunner()
|
/cts/hostsidetests/angle/src/android/angle/cts/ |
D | CtsAngleDeveloperOptionHostTest.java | 46 private void setAndValidateAngleDevOptionPkgDriver(String pkgName, String driverValue) in setAndValidateAngleDevOptionPkgDriver() argument 49 pkgName + "', driverValue = '" + driverValue + "'"); in setAndValidateAngleDevOptionPkgDriver() 51 setGlobalSetting(getDevice(), SETTINGS_GLOBAL_DRIVER_PKGS, pkgName); in setAndValidateAngleDevOptionPkgDriver() local 58 pkgName, devOption); in setAndValidateAngleDevOptionPkgDriver() 67 private void setAndValidatePkgDriver(String pkgName, OpenGlDriverChoice driver) in setAndValidatePkgDriver() argument 69 stopPackage(getDevice(), pkgName); in setAndValidatePkgDriver() local 71 setAndValidateAngleDevOptionPkgDriver(pkgName, sDriverGlobalSettingMap.get(driver)); in setAndValidatePkgDriver() 76 runDeviceTests(pkgName, pkgName + "." + ANGLE_DRIVER_TEST_CLASS, in setAndValidatePkgDriver()
|
D | CtsAngleCommon.java | 155 static void startActivity(ITestDevice device, String pkgName, String className) in startActivity() argument 158 "am start -W -a android.intent.action.MAIN -n %s/.%s", pkgName, className); in startActivity() 162 static void stopPackage(ITestDevice device, String pkgName) throws Exception { in stopPackage() argument 163 device.executeShellCommand("am force-stop " + pkgName); in stopPackage()
|
/cts/hostsidetests/packagemanager/stats/src/com/android/cts/packagemanager/stats/host/ |
D | PackageManagerStatsTestsBase.java | 81 public static int getAppUid(ITestDevice device, String pkgName) throws Exception { in getAppUid() argument 85 + pkgName); in getAppUid() 86 final Pattern pattern = Pattern.compile("package:" + pkgName + " uid:(\\d+)"); in getAppUid() 91 throw new IllegalStateException("Package " + pkgName + " is not installed for user " in getAppUid()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2023-40092/src/android/security/cts/CVE_2023_40092/ |
D | DeviceTest.java | 76 String pkgName = context.getPackageName(); in testPocCVE_2023_40092() local 81 .setActivity(new ComponentName(pkgName, pkgName + ".PocActivity")) in testPocCVE_2023_40092()
|
/cts/tests/tests/externalservice/service/src/android/externalservice/service/ |
D | ServiceCreator.java | 48 final String pkgName = context.getPackageName(); 58 intent.setComponent(new ComponentName(pkgName, pkgName+serviceName));
|
/cts/tests/tests/security/src/android/security/cts/CVE_2024_23713/ |
D | CVE_2024_23713.java | 98 String pkgName = context.getPackageName(); in testPocCVE_2024_23713() local 101 pkgName, in testPocCVE_2024_23713() 102 pkgName + ".CVE_2024_23713.PocNotificationListenerService"); in testPocCVE_2024_23713()
|
/cts/tests/tests/security/src/android/security/cts/CVE_2023_20953/ |
D | CVE_2023_20953.java | 62 final String pkgName = context.getPackageName(); in testCliboardIfUserSetupNotComplete() local 64 intent.setClassName(pkgName, pkgName + ".CVE_2023_20953.PocActivity"); in testCliboardIfUserSetupNotComplete()
|
/cts/hostsidetests/statsdatom/src/android/cts/statsdatom/appexit/ |
D | AppExitHostTest.java | 146 private int getAppUid(String pkgName) throws Exception { in getAppUid() argument 149 "cmd package list packages -U --user " + currentUser + " " + pkgName); in getAppUid() 150 final Pattern pattern = Pattern.compile("package:" + pkgName + " uid:(\\d+)"); in getAppUid() 152 assertWithMessage("Pkg not found: " + pkgName).that(matcher.find()).isTrue(); in getAppUid()
|
/cts/hostsidetests/securitybulletin/src/android/security/cts/ |
D | Bug_261036568.java | 78 private boolean runDeviceTestsWithArgs(String pkgName, String testClassName, in runDeviceTestsWithArgs() argument 86 pkgName, in runDeviceTestsWithArgs()
|
/cts/hostsidetests/shortcuts/hostside/src/android/content/pm/cts/shortcuthost/ |
D | BaseShortcutManagerHostTest.java | 120 String pkgName, @Nullable String testClassName, int userId) in runDeviceTestsAsUser() argument 122 runDeviceTestsAsUser(pkgName, testClassName, null /*testMethodName*/, userId); in runDeviceTestsAsUser() 127 String pkgName, @Nullable String testClassName, String testMethodName, int userId) in runDeviceTestsAsUser() argument 130 final DeviceTestRunOptions opts = new DeviceTestRunOptions(pkgName); in runDeviceTestsAsUser() 133 testClassName = pkgName + testClassName; in runDeviceTestsAsUser()
|
/cts/hostsidetests/packagemanager/multiuser/app/src/com/android/tests/packagemanager/multiuser/app/ |
D | PackageManagerMultiUserTest.java | 53 String pkgName = InstrumentationRegistry.getArguments().getString(ARG_PACKAGE_NAME); in testUninstallExistingPackage() local 59 packageInstaller.uninstallExistingPackage(pkgName, sender.getIntentSender()); in testUninstallExistingPackage()
|
/cts/hostsidetests/securitybulletin/test-apps/CVE_2023_20904/src/android/security/cts/CVE_2023_20904/ |
D | DeviceTest.java | 45 String pkgName = settingsComponent != null ? settingsComponent.getPackageName() in getSettingsPkgName() local 47 return pkgName; in getSettingsPkgName()
|