Home
last modified time | relevance | path

Searched refs:pkgName (Results 1 – 25 of 66) sorted by relevance

123

/cts/hostsidetests/statsdatom/src/android/cts/statsdatom/lib/
DConfigUtils.java65 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 …]
DDeviceUtils.java83 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/
DCompatChangeGatingTestCase.java123 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/
DBaseBlobStoreHostTest.java149 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/
DCVE_2022_20234.java55 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()
DCVE_2023_20927.java65 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()
DCVE_2021_39738.java53 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/
DPackageManagerMultiUserTestBase.java68 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/
DHostsideStatsdAtomTests.java128 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/
DManifestGenerator.java43 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/
DKeySetHostTest.java156 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()
DAppSecurityTests.java319 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/
DBaseMediaHostSideTest.java74 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/
DCtsAngleDeveloperOptionHostTest.java46 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()
DCtsAngleCommon.java155 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/
DPackageManagerStatsTestsBase.java81 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/
DDeviceTest.java76 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/
DServiceCreator.java48 final String pkgName = context.getPackageName();
58 intent.setComponent(new ComponentName(pkgName, pkgName+serviceName));
/cts/tests/tests/security/src/android/security/cts/CVE_2024_23713/
DCVE_2024_23713.java98 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/
DCVE_2023_20953.java62 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/
DAppExitHostTest.java146 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/
DBug_261036568.java78 private boolean runDeviceTestsWithArgs(String pkgName, String testClassName, in runDeviceTestsWithArgs() argument
86 pkgName, in runDeviceTestsWithArgs()
/cts/hostsidetests/shortcuts/hostside/src/android/content/pm/cts/shortcuthost/
DBaseShortcutManagerHostTest.java120 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/
DPackageManagerMultiUserTest.java53 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/
DDeviceTest.java45 String pkgName = settingsComponent != null ? settingsComponent.getPackageName() in getSettingsPkgName() local
47 return pkgName; in getSettingsPkgName()

123