Home
last modified time | relevance | path

Searched refs:packageName (Results 1 – 25 of 75) sorted by relevance

123

/platform_testing/libraries/flicker/utils/src/android/tools/traces/component/
DComponentName.kt28 data class ComponentName(override val packageName: String, override val className: String) : constant in android.tools.traces.component.ComponentName
37 packageName.isNotEmpty() && className.isNotEmpty() -> { in toActivityName()
38 val sb = StringBuilder(packageName.length + className.length) in toActivityName()
39 appendShortString(sb, packageName, className) in toActivityName()
42 packageName.isNotEmpty() -> packageName in toActivityName()
59 packageName.isNotEmpty() && className.isNotEmpty() -> "$packageName/$className" in toWindowName()
60 packageName.isNotEmpty() -> packageName in toWindowName()
68 packageName.isNotEmpty() && className.isNotEmpty() -> in toShortWindowName()
69 "$packageName/${className.removePrefix(packageName)}" in toShortWindowName()
70 packageName.isNotEmpty() -> packageName in toShortWindowName()
[all …]
/platform_testing/libraries/flag-helpers/junit/src_util/android/platform/test/flag/util/
DFlag.java55 String packageName = null; in createFlag() local
72 packageName = fullFlagName.substring(0, index); in createFlag()
76 return new AutoValue_Flag(namespace, fullFlagName, packageName, simpleFlagName); in createFlag()
85 public abstract String packageName(); in packageName() method in Flag
102 String packageName = packageName(); in flagsClassPackageName() local
103 if (packageName == null) { in flagsClassPackageName()
109 String.format(FLAGS_CLASS_FORMAT, packageName), in flagsClassPackageName()
112 return packageName; in flagsClassPackageName()
114 return String.format("%s.%s", REPACKAGE_PREFIX, packageName); in flagsClassPackageName()
/platform_testing/libraries/compatibility-common-util/src/com/android/compatibility/common/util/
DBackupUtils.java81 public void backupNowAndAssertSuccess(String packageName) throws IOException { in backupNowAndAssertSuccess() argument
82 assertBackupIsSuccessful(packageName, backupNow(packageName)); in backupNowAndAssertSuccess()
86 public void backupNowAndAssertSuccessForUser(String packageName, int userId) in backupNowAndAssertSuccessForUser() argument
88 assertBackupIsSuccessful(packageName, backupNowForUser(packageName, userId)); in backupNowAndAssertSuccessForUser()
91 public void backupNowAndAssertBackupNotAllowed(String packageName) throws IOException { in backupNowAndAssertBackupNotAllowed() argument
92 assertBackupNotAllowed(packageName, getBackupNowOutput(packageName)); in backupNowAndAssertBackupNotAllowed()
96 public void backupNowSync(String packageName) throws IOException { in backupNowSync() argument
97 StreamUtil.drainAndClose(new InputStreamReader(backupNow(packageName))); in backupNowSync()
100 public String getBackupNowOutput(String packageName) throws IOException { in getBackupNowOutput() argument
101 return StreamUtil.readInputStream(backupNow(packageName)); in getBackupNowOutput()
[all …]
/platform_testing/libraries/notes-role-test-helper/src/android/platform/helpers/notesrole/
DNotesRoleUtil.kt72 fun forceStopPackage(packageName: String) { in forceStopPackage()
73 DeviceHelpers.shell("am force-stop $packageName") in forceStopPackage()
104 fun setRoleHolder(packageName: String, userHandle: UserHandle = context.user) { in setRoleHolder()
108 "Trying to set note role to $packageName. Current role holder: " + in setRoleHolder()
113 if (currentRoleHolderPackageName == packageName) { in setRoleHolder()
125 if (packageName.isEmpty()) { in setRoleHolder()
131 Log.d(TAG, "Start setting note holder to $packageName") in setRoleHolder()
135 packageName, in setRoleHolder()
140 Log.d(TAG, "Callback for setting note role to $packageName: $it") in setRoleHolder()
149 "Failed to set $packageName as default notes role holder" in setRoleHolder()
[all …]
/platform_testing/libraries/systemui-helper/src/android/platform/helpers/
DLaunchAppUtils.kt35 packageManager.getLaunchIntentForPackage(app.packageName)?.apply { in Context()
47 assertAppInForeground(app.packageName) in assertAppInForeground()
52 fun assertAppInForeground(packageName: String) { in assertAppInForeground()
53 check(device.wait(Until.hasObject(By.pkg(packageName).depth(0)), MAX_TIMEOUT.toMillis())) { in assertAppInForeground()
54 "$packageName not in the foreground after ${MAX_TIMEOUT.toSeconds()} seconds" in assertAppInForeground()
63 enum class App(internal val packageName: String) { constant in android.platform.helpers.App
DProcessUtil.kt9 class ProcessUtil(private val packageName: String) { in <lambda>() constant in android.platform.helpers.ProcessUtil
29 val pidofResult = shell("pidof $packageName").trim() in <lambda>()
/platform_testing/libraries/flicker/utils/src/android/tools/traces/inputmethod/
DEditorInfo.kt29 val packageName: String, constant in android.tools.traces.inputmethod.EditorInfo
34 return "${this::class.simpleName}: {$packageName, inputType: $inputType," + in toString()
45 if (packageName != other.packageName) return false in equals()
56 result = 31 * result + packageName.hashCode() in hashCode()
/platform_testing/libraries/launcher-helper/src/android/support/test/launcherhelper2/
DCommonLauncherHelper.java146 public long launchApp(ILauncherStrategy launcherStrategy, BySelector app, String packageName) { in launchApp() argument
147 return launchApp(launcherStrategy, app, packageName, MAX_SCROLL_ATTEMPTS); in launchApp()
163 String packageName, in launchApp() argument
167 if (isAppOpen(packageName)) { in launchApp()
200 return verifyAppStart(packageName, ready); in launchApp()
212 public long launchApp(LauncherInstrumentation launcher, String appName, String packageName) { in launchApp() argument
215 if (isAppOpen(packageName)) { in launchApp()
228 icon.launch(packageName); in launchApp()
232 private long verifyAppStart(String packageName, long appStartTime) { in verifyAppStart() argument
234 if (packageName != null) { in verifyAppStart()
[all …]
DTvLauncherStrategy.java404 public long launch(String appName, String packageName) { in launch() argument
405 Log.d(LOG_TAG, String.format("launching [name]%s [package]%s", appName, packageName)); in launch()
406 return launchApp(this, appName, packageName, isGame(packageName)); in launch()
569 protected UiObject2 selectAppInAllApps(BySelector appSelector, String packageName) {
587 Log.i(LOG_TAG, String.format("The app %s is selected", packageName));
614 "Failed to navigate to the app icon on screen: " + packageName);
625 protected UiObject2 selectAppInAllAppsZigZag(BySelector appSelector, String packageName) {
634 Log.i(LOG_TAG, String.format("The app %s is selected", packageName));
640 public UiObject2 selectAppInAllApps(String appName, String packageName) {
650 app = selectAppInAllApps(getAppInAppsViewSelector(appName), packageName);
[all …]
DLeanbackLauncherStrategy.java184 public long launch(String appName, String packageName) { in launch() argument
186 return launchApp(this, app, packageName, isGame(packageName)); in launch()
346 String packageName, in launchApp() argument
348 return launchApp(launcherStrategy, app, packageName, isGame, MAX_SCROLL_ATTEMPTS); in launchApp()
354 String packageName, in launchApp() argument
359 if (isAppOpen(packageName)) { in launchApp()
391 "Failed to find the app icon on screen: " + packageName); in launchApp()
424 "Failed to navigate to the app icon on screen: " + packageName); in launchApp()
436 if (!mDevice.wait(Until.hasObject(By.pkg(packageName).depth(0)), APP_LAUNCH_TIMEOUT)) { in launchApp()
441 if (packageName != null) { in launchApp()
[all …]
/platform_testing/libraries/launcher-helper/src/android/support/test/launcherhelper/
DCommonLauncherHelper.java141 String packageName) { in launchApp() argument
142 return launchApp(launcherStrategy, app, packageName, MAX_SCROLL_ATTEMPTS); in launchApp()
155 String packageName, int maxScrollAttempts) { in launchApp() argument
158 if (isAppOpen(packageName)) { in launchApp()
191 return verifyAppStart(packageName, ready); in launchApp()
203 public long launchApp(LauncherInstrumentation launcher, String appName, String packageName) { in launchApp() argument
206 if (isAppOpen(packageName)) { in launchApp()
219 icon.launch(packageName); in launchApp()
223 private long verifyAppStart(String packageName, long appStartTime) { in verifyAppStart() argument
225 if (packageName != null) { in verifyAppStart()
[all …]
DTvLauncherStrategy.java428 public long launch(String appName, String packageName) { in launch() argument
429 Log.d(LOG_TAG, String.format("launching [name]%s [package]%s", appName, packageName)); in launch()
430 return launchApp(this, appName, packageName, isGame(packageName)); in launch()
600 protected UiObject2 selectAppInAllApps(BySelector appSelector, String packageName) {
618 Log.i(LOG_TAG, String.format("The app %s is selected", packageName));
645 "Failed to navigate to the app icon on screen: " + packageName);
657 protected UiObject2 selectAppInAllAppsZigZag(BySelector appSelector, String packageName) {
666 Log.i(LOG_TAG, String.format("The app %s is selected", packageName));
674 public UiObject2 selectAppInAllApps(String appName, String packageName) {
682 app = selectAppInAllApps(getAppInAppsViewSelector(appName), packageName);
[all …]
DLeanbackLauncherStrategy.java213 public long launch(String appName, String packageName) { in launch() argument
215 return launchApp(this, app, packageName, isGame(packageName)); in launch()
389 String packageName, boolean isGame) { in launchApp() argument
390 return launchApp(launcherStrategy, app, packageName, isGame, MAX_SCROLL_ATTEMPTS); in launchApp()
394 String packageName, boolean isGame, int maxScrollAttempts) { in launchApp() argument
397 if (isAppOpen(packageName)) { in launchApp()
429 + packageName); in launchApp()
462 "Failed to navigate to the app icon on screen: " + packageName); in launchApp()
474 if (!mDevice.wait(Until.hasObject(By.pkg(packageName).depth(0)), APP_LAUNCH_TIMEOUT)) { in launchApp()
479 if (packageName != null) { in launchApp()
[all …]
/platform_testing/libraries/system-helpers/package-helper/src/android/system/helpers/
DPackageHelper.java52 public void cleanPackage(String packageName) { in cleanPackage() argument
53 cmdHelper.executeShellCommand(String.format("pm clear %s", packageName)); in cleanPackage()
62 public Boolean isPackageInstalled(String packageName) { in isPackageInstalled() argument
64 mPackageManager.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES); in isPackageInstalled()
/platform_testing/libraries/system-helpers/permission-helper/src/android/system/helpers/
DPermissionHelper.java139 public List<String> getPermissionByPackage(String packageName, Boolean permitted) { in getPermissionByPackage() argument
145 packageInfo = mContext.getPackageManager().getPackageInfo(packageName, in getPermissionByPackage()
148 throw new RuntimeException(String.format("%s package isn't found", packageName)); in getPermissionByPackage()
171 public void verifyExtraDangerousPermissionNotGranted(String packageName, in verifyExtraDangerousPermissionNotGranted() argument
175 List<String> allPermissionsForPackageList = getPermissionByPackage(packageName, in verifyExtraDangerousPermissionNotGranted()
183 packageName), in verifyExtraDangerousPermissionNotGranted()
193 public void verifyNotPermittedDangerousPermissionDenied(String packageName, in verifyNotPermittedDangerousPermissionDenied() argument
197 List<String> allPermissionsForPackageList = getPermissionByPackage(packageName, in verifyNotPermittedDangerousPermissionDenied()
203 packageName), in verifyNotPermittedDangerousPermissionDenied()
211 public void verifyNormalPermissionsAutoGranted(String packageName) { in verifyNormalPermissionsAutoGranted() argument
[all …]
/platform_testing/libraries/flicker/appHelpers/src/android/tools/device/apphelpers/
DStandardAppHelper.kt49 packageName: String,
51 ) : this(instr, appName, ComponentNameMatcher(packageName, ".$activity"))
63 override val packageName = componentMatcher.packageName constant in android.tools.device.apphelpers.StandardAppHelper
65 val packageNameMatcher = ComponentNameMatcher(componentMatcher.packageName, "")
72 val expected = expectedPackageName.ifEmpty { packageName } in getAppSelector()
77 open(packageName) in open()
90 intent.component = ComponentName(packageName, className)
98 activityManager?.forceStopPackage(packageName) in exit()
186 pkgManager.getPackageInfo(packageName, PackageManager.PackageInfoFlags.of(0)) in isAvailable()
DClockAppHelper.kt41 pkgManager.getLaunchIntentForPackage(packageName)
53 getResolveInfo(pkgManager).activityInfo.packageName,
DCameraAppHelper.kt41 pkgManager.getLaunchIntentForPackage(packageName)
53 getResolveInfo(pkgManager).activityInfo.packageName,
DMessagingAppHelper.kt43 pkgManager.getLaunchIntentForPackage(packageName) ?: error("Unable to find intent for SMS")
57 return ComponentNameMatcher(resolveInfo.activityInfo.packageName, className = "") in getMessagesComponent()
/platform_testing/libraries/flicker/src/android/tools/flicker/assertors/assertions/
DFocusChanges.kt40 fromComponent.packageName in doEvaluate()
46 .packageName in doEvaluate()
51 toComponent.packageName in doEvaluate()
57 .packageName in doEvaluate()
/platform_testing/libraries/health/rules/tests/src/android/platform/test/rule/
DDex2oatPressureRuleTest.java98 String packageName = "success.20"; in testInvokesCompilation() local
99 stubInstrumentationArgs(Dex2oatPressureRule.PACKAGES_OPTION, packageName, in testInvokesCompilation()
101 stubInstalledPackages(Arrays.asList(packageName)); in testInvokesCompilation()
104 verify(rule, times(1)).runCompileCommand(packageName, Dex2oatPressureRule.SPEED_FILTER); in testInvokesCompilation()
200 String packageName = "success.150"; in testWaitsUntilDex2oatIsRunningBeforeTest() local
201 stubInstrumentationArgs(Dex2oatPressureRule.PACKAGES_OPTION, packageName, in testWaitsUntilDex2oatIsRunningBeforeTest()
203 stubInstalledPackages(Arrays.asList(packageName)); in testWaitsUntilDex2oatIsRunningBeforeTest()
222 String packageName = "success.150"; in testCancelsAndThrowsIfDex2oatIsNotRunningAfterTimeout() local
223 stubInstrumentationArgs(Dex2oatPressureRule.PACKAGES_OPTION, packageName, in testCancelsAndThrowsIfDex2oatIsNotRunningAfterTimeout()
225 stubInstalledPackages(Arrays.asList(packageName)); in testCancelsAndThrowsIfDex2oatIsNotRunningAfterTimeout()
[all …]
/platform_testing/libraries/flag-helpers/junit/test/src/android/platform/test/flag/util/
DFlagTest.java38 assertNull(flag.packageName()); in createFlag_legacyFlag()
57 assertEquals("android.platform.test.flag.junit", flag.packageName()); in createFlag_aconfigFlagWithoutRepackaging()
69 assertEquals("android.myflag", flag.packageName()); in createFlag_aconfigFlagWithRepackaging()
/platform_testing/libraries/aupt-lib/src/android/support/test/aupt/
DAuptTestCase.java171 public String getPackageVersion(String packageName) throws NameNotFoundException { in getPackageVersion() argument
172 if (null == packageName || packageName.isEmpty()) { in getPackageVersion()
176 PackageInfo pInfo = pm.getPackageInfo(packageName, 0); in getPackageVersion()
180 String.format("Version isn't found for package = %s", packageName)); in getPackageVersion()
/platform_testing/libraries/collectors-helper/statsd/src/com/android/helpers/
DCpuUsageHelper.java91 String packageName = mStatsdHelper.getPackageName(uId); in getMetrics() local
99 uId, packageName, userTimeMillis, sysTimeMillis)); in getMetrics()
114 (packageName == null) ? String.valueOf(uId) : packageName, in getMetrics()
117 (packageName == null) ? String.valueOf(uId) : packageName, in getMetrics()
/platform_testing/utils/permissions/src/com/android/permissionutils/
DGrantPermissionUtil.java42 pm.grantRuntimePermission(pkgInfo.packageName, permission, myUserHandle()); in grantAllPermissions()
52 Log.e(LOG_TAG, String.format("Missing permissions for %s", pkgInfo.packageName)); in dumpMissingPermissions()
85 int flag = pm.checkPermission(permission, info.packageName); in getMissingPermissions()

123