Home
last modified time | relevance | path

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

12345678910>>...30

/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DAmUtils.java29 public static void runMakeUidIdle(String packageName) { in runMakeUidIdle() argument
30 SystemUtil.runShellCommandForNoOutput("am make-uid-idle " + packageName); in runMakeUidIdle()
34 public static void runKill(String packageName) throws Exception { in runKill() argument
35 runKill(packageName, false /* wait */); in runKill()
38 public static void runKill(String packageName, boolean wait) throws Exception { in runKill() argument
39 SystemUtil.runShellCommandForNoOutput("am kill --user cur " + packageName); in runKill()
45 TestUtils.waitUntil("package process was not killed:" + packageName, in runKill()
46 () -> !isProcessRunning(packageName)); in runKill()
49 private static boolean isProcessRunning(String packageName) { in isProcessRunning() argument
53 if (packages[i].equals(packageName)) { in isProcessRunning()
[all …]
DPermissionUtils.java69 public static boolean isPermissionAndAppOpGranted(@NonNull String packageName, in isPermissionAndAppOpGranted() argument
71 if (!isPermissionGranted(packageName, permission)) { in isPermissionAndAppOpGranted()
74 return getAppOp(packageName, permission) != MODE_IGNORED; in isPermissionAndAppOpGranted()
86 public static void grantPermissionAndAppOp(@NonNull String packageName, in grantPermissionAndAppOp() argument
88 sUiAutomation.grantRuntimePermission(packageName, permission); in grantPermissionAndAppOp()
90 setAppOpByPermission(packageName, permission, MODE_ALLOWED); in grantPermissionAndAppOp()
102 public static void revokePermissionAndAppOp(@NonNull String packageName, in revokePermissionAndAppOp() argument
104 sUiAutomation.revokeRuntimePermission(packageName, permission); in revokePermissionAndAppOp()
106 setAppOpByPermission(packageName, permission, MODE_IGNORED); in revokePermissionAndAppOp()
116 public static List<String> getPermissions(@NonNull String packageName) in getPermissions() argument
[all …]
DAppOpsUtils.java51 public static String reset(String packageName) throws IOException { in reset() argument
52 return runCommand(appops("reset") + packageName); in reset()
58 public static String setOpMode(String packageName, String opStr, int mode) in setOpMode() argument
77 String command = appops("set") + packageName + " " + opStr + " " + modeStr; in setOpMode()
93 public static int getOpMode(String packageName, String opStr) in getOpMode() argument
95 String opState = getOpState(packageName, opStr); in getOpMode()
116 public static boolean allowedOperationLogged(String packageName, String opStr) in allowedOperationLogged() argument
118 return getOpState(packageName, opStr).contains(" time="); in allowedOperationLogged()
128 public static boolean rejectedOperationLogged(String packageName, String opStr) in rejectedOperationLogged() argument
130 return getOpState(packageName, opStr).contains(" rejectTime="); in rejectedOperationLogged()
[all …]
DPackageUtil.java47 public static boolean exists(String packageName) { in exists() argument
49 return (getPackageManager().getApplicationInfo(packageName, in exists()
57 public static boolean exists(String packageName, String sha) { in exists() argument
60 packageName, PackageManager.GET_META_DATA) == null) { in exists()
63 return sha.equals(computePackageSignatureDigest(packageName)); in exists()
70 public static boolean isSystemApp(String packageName) { in isSystemApp() argument
72 ApplicationInfo ai = getPackageManager().getApplicationInfo(packageName, in isSystemApp()
84 public static boolean isPrivilegedSystemApp(String packageName) { in isPrivilegedSystemApp() argument
86 ApplicationInfo ai = getPackageManager().getApplicationInfo(packageName, in isPrivilegedSystemApp()
95 public static String getVersionString(String packageName) { in getVersionString() argument
[all …]
/cts/tests/tests/appop/appopsTestUtilLib/src/android/app/appops/cts/
DAppOpsUtils.kt46 fun reset(packageName: String): String { in reset()
47 return runCommand("appops reset $packageName") in reset()
53 fun setOpMode(packageName: String, opStr: String, mode: Int): String { in setOpMode()
61 val command = "appops set $packageName $opStr $modeStr" in setOpMode()
68 fun getOpMode(packageName: String, opStr: String): Int { in getOpMode()
69 val opState = getOpState(packageName, opStr) in getOpMode()
86 fun allowedOperationLogged(packageName: String, opStr: String): Boolean { in allowedOperationLogged()
87 return getOpState(packageName, opStr).contains(" time=") in allowedOperationLogged()
97 fun rejectedOperationLogged(packageName: String, opStr: String): Boolean { in rejectedOperationLogged()
98 return getOpState(packageName, opStr).contains(" rejectTime=") in rejectedOperationLogged()
[all …]
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DApplicationHiddenTest.java109 sDeviceState.dpc().componentName(), SYSTEM_PACKAGE.packageName(), in isApplicationHidden_systemApp_isHidden_returnsTrue()
113 sDeviceState.dpc().componentName(), SYSTEM_PACKAGE.packageName())).isTrue(); in isApplicationHidden_systemApp_isHidden_returnsTrue()
116 sDeviceState.dpc().componentName(), SYSTEM_PACKAGE.packageName(), in isApplicationHidden_systemApp_isHidden_returnsTrue()
125 sDeviceState.dpc().componentName(), SYSTEM_PACKAGE.packageName(), in isApplicationHidden_systemApp_isNotHidden_returnsFalse()
129 sDeviceState.dpc().componentName(), SYSTEM_PACKAGE.packageName())).isFalse(); in isApplicationHidden_systemApp_isNotHidden_returnsFalse()
132 sDeviceState.dpc().componentName(), SYSTEM_PACKAGE.packageName(), in isApplicationHidden_systemApp_isNotHidden_returnsFalse()
143 sDeviceState.testApp().packageName())); in isApplicationHidden_notSystemApp_throwsException()
152 sDeviceState.testApp().packageName())); in isApplicationHidden_notPermitted_throwsException()
160 sDeviceState.dpc().componentName(), sDeviceState.testApp().packageName(), in isApplicationHidden_notSystemApp_isHidden_returnsTrue()
165 sDeviceState.testApp().packageName())).isTrue(); in isApplicationHidden_notSystemApp_isHidden_returnsTrue()
[all …]
DApplicationRestrictionsTest.java88 sDeviceState.dpc().componentName(), sTestApp.packageName()); in setApplicationRestrictions_applicationRestrictionsAreSet()
95 sDeviceState.dpc().componentName(), sTestApp.packageName(), in setApplicationRestrictions_applicationRestrictionsAreSet()
100 testApp.userManager().getApplicationRestrictions(sTestApp.packageName())); in setApplicationRestrictions_applicationRestrictionsAreSet()
104 sTestApp.packageName(), originalApplicationRestrictions); in setApplicationRestrictions_applicationRestrictionsAreSet()
115 sDeviceState.dpc().componentName(), sTestApp.packageName()); in setApplicationRestrictions_applicationRestrictionsAlreadySet_setsNewRestrictions()
122 sDeviceState.dpc().componentName(), sTestApp.packageName(), in setApplicationRestrictions_applicationRestrictionsAlreadySet_setsNewRestrictions()
126 sDeviceState.dpc().componentName(), sTestApp.packageName(), in setApplicationRestrictions_applicationRestrictionsAlreadySet_setsNewRestrictions()
131 testApp.userManager().getApplicationRestrictions(sTestApp.packageName())); in setApplicationRestrictions_applicationRestrictionsAlreadySet_setsNewRestrictions()
135 sTestApp.packageName(), originalApplicationRestrictions); in setApplicationRestrictions_applicationRestrictionsAlreadySet_setsNewRestrictions()
149 sDeviceState.dpc().componentName(), sTestApp.packageName()); in getApplicationRestrictions_applicationRestrictionsAreSet_returnsApplicationRestrictions()
[all …]
DDelegationScopesTest.java89 testApp.packageName(), in getDelegatedScopes_returnsFromSetDelegatedScopes()
94 testApp.packageName())) in getDelegatedScopes_returnsFromSetDelegatedScopes()
108 testApp.packageName(), in getDelegatedScopes_fromApp_returnsFromSetDelegatedScopes()
112 null, testApp.packageName())) in getDelegatedScopes_fromApp_returnsFromSetDelegatedScopes()
126 testApp.packageName(), in getDelegatedScopes_fromApp_passComponentName_throwsException()
131 sDeviceState.dpc().componentName(), testApp.packageName())); in getDelegatedScopes_fromApp_passComponentName_throwsException()
145 testApp.packageName(), in getDelegatedScopes_fromApp_differentPackage_throwsException()
149 testApp2.packageName(), in getDelegatedScopes_fromApp_differentPackage_throwsException()
154 null, testApp2.packageName())); in getDelegatedScopes_fromApp_differentPackage_throwsException()
168 testApp.packageName(), in setDelegatedScopes_invalidAdmin_throwsSecurityException()
[all …]
/cts/tests/tests/media/audio/modules/audiorecordpermissiontests/src/android/media/audio/cts/audiorecordpermissiontests/
DAudioRecordPermissionTests.java181 private void startActivity(String packageName) throws Exception { in startActivity() argument
182 final var future = getFutureForIntent(mContext, packageName + ACTION_ACTIVITY_STARTED); in startActivity()
185 .setClassName(packageName, packageName + ".SimpleActivity") in startActivity()
189 mStartedActivityPackage = packageName; in startActivity()
192 private void stopActivity(String packageName) throws Exception { in stopActivity() argument
193 final var future = getFutureForIntent(mContext, packageName + ACTION_ACTIVITY_FINISHED); in stopActivity()
195 new Intent(packageName + ACTION_ACTIVITY_DO_FINISH).setPackage(packageName)); in stopActivity()
200 private void startForegroundServiceRecording(String packageName) throws Exception { in startForegroundServiceRecording() argument
201 final var future = getFutureForIntent(mContext, packageName + ACTION_BEGAN_RECEIVE_AUDIO); in startForegroundServiceRecording()
203 "start-foreground-service", packageName, ACTION_START_RECORD, " --ez " in startForegroundServiceRecording()
[all …]
/cts/tests/tests/companion/uiautomation/src/android/companion/cts/uiautomation/
DAssociationRevokedTest.kt68 it.belongsToPackage(userId, packageName) in <lambda>()
79 packageName, "Not a holder of $DEVICE_PROFILE_WATCH") in <lambda>()
87 packageName, "Not a holder of $DEVICE_PROFILE_WATCH") in <lambda>()
90 assertAppStillRunning(packageName) in <lambda>()
106 it.belongsToPackage(userId, packageName) in <lambda>()
117 packageName, "Not a holder of $DEVICE_PROFILE_WATCH") in <lambda>()
125 packageName, "Not a holder of $DEVICE_PROFILE_WATCH") in <lambda>()
127 forceKillApp(packageName) in <lambda>()
132 getRoleHolders(DEVICE_PROFILE_WATCH).contains(packageName) in <lambda>()
136 private fun forceKillApp(packageName: String) = in forceKillApp()
[all …]
/cts/tools/cts-api-coverage/src/com/android/cts/ctsprofiles/
DUtils.java30 String packageName = ""; in getPackageClass() local
32 packageName = classSignature.substring(0, splitPos); in getPackageClass()
34 return Pair.create(packageName, className.replaceAll("\\$", ".")); in getPackageClass()
43 String packageName = ""; in getPackageClassFromASM() local
45 packageName = packageClass.substring(0, splitPos); in getPackageClassFromASM()
49 packageName.replaceAll("/", "."), in getPackageClassFromASM()
55 public static String getClassSignature(String packageName, String className) { in getClassSignature() argument
56 if (packageName.isEmpty()) { in getClassSignature()
59 return String.format("%s.%s", packageName, className); in getClassSignature()
72 String packageName, String className, String methodName, List<String> paramTypes) { in getMethodSignatureWithClass() argument
[all …]
/cts/tests/tests/companion/common/src/android/companion/cts/common/
DAppHelper.kt26 val packageName: String, constant in android.companion.cts.common.AppHelper
30 runShellCommand("cmd companiondevice associate $userId $packageName $macAddress $role") in associate()
33 runShellCommand("cmd companiondevice disassociate $userId $packageName $macAddress") in associate()
36 runShellCommand("cmd companiondevice disassociate-all $userId $packageName") in associate()
39 runShellCommand("pm list packages --user $userId $packageName").isNotBlank() in associate()
44 fun uninstall() = runShellCommand("pm uninstall --user $userId $packageName") in uninstall()
46 fun clearData() = runShellCommand("pm clear --user $userId $packageName") in uninstall()
49 runShellCommand("cmd role get-role-holders --user $userId $role").contains(packageName) in uninstall()
52 runShellCommand("cmd role add-role-holder --user $userId $role $packageName") in uninstall()
55 runShellCommand("cmd role remove-role-holder --user $userId $role $packageName") in uninstall()
/cts/tests/AlarmManager/util/src/android/alarmmanager/util/
DUtils.java35 private static boolean isChangeEnabled(long changeId, String packageName, UserHandle user) { in isChangeEnabled() argument
38 () -> CompatChanges.isChangeEnabled(changeId, packageName, user), in isChangeEnabled()
46 public static void enableChange(long changeId, String packageName, int userId) { in enableChange() argument
47 if (!isChangeEnabled(changeId, packageName, UserHandle.of(userId))) { in enableChange()
49 + packageName, output -> output.contains("Enabled")); in enableChange()
60 public static void resetChange(long changeId, String packageName) { in resetChange() argument
61 SystemUtil.runShellCommand("am compat reset --no-kill " + changeId + " " + packageName); in resetChange()
64 public static int getPackageUid(String packageName) { in getPackageUid() argument
66 return sContext.getPackageManager().getPackageUid(packageName, 0); in getPackageUid()
/cts/libs/rollback/src/com/android/cts/rollback/lib/
DRollbackUtils.java93 public static RollbackInfo getAvailableRollback(String packageName) { in getAvailableRollback() argument
95 return getUniqueRollbackInfoForPackage(rm.getAvailableRollbacks(), packageName); in getAvailableRollback()
103 public static RollbackInfo getCommittedRollback(String packageName) { in getCommittedRollback() argument
105 return getUniqueRollbackInfoForPackage(rm.getRecentlyCommittedRollbacks(), packageName); in getCommittedRollback()
155 String packageName) { in getUniqueRollbackInfoForPackage() argument
159 if (packageName.equals(info.getPackageName())) { in getUniqueRollbackInfoForPackage()
174 public static RollbackInfo waitForAvailableRollback(String packageName) in waitForAvailableRollback() argument
176 return retry(() -> getAvailableRollback(packageName), in waitForAvailableRollback()
186 public static void waitForUnavailableRollback(String packageName) throws InterruptedException { in waitForUnavailableRollback() argument
187 retry(() -> getAvailableRollback(packageName), Objects::isNull, in waitForUnavailableRollback()
[all …]
/cts/tests/tests/telecom/src/android/telecom/cts/
DCtsRoleManagerAdapter.java61 public void setDialerRoleHolder(String packageName) in setDialerRoleHolder() argument
63 setRoleHolder(RoleManager.ROLE_DIALER, packageName); in setDialerRoleHolder()
66 public void setRoleHolder(String role, String packageName) throws Exception { in setRoleHolder() argument
68 addRoleHolder(role, packageName); in setRoleHolder()
83 public void removeDialerRoleHolder(String packageName) throws Exception { in removeDialerRoleHolder() argument
84 removeRoleHolder(RoleManager.ROLE_DIALER, packageName); in removeDialerRoleHolder()
87 public void removeRoleHolder(String role, String packageName) throws Exception { in removeRoleHolder() argument
89 removeRoleHolderInternal(role, packageName); in removeRoleHolder()
106 private void addRoleHolder(String roleName, String packageName) throws InterruptedException { in addRoleHolder() argument
111 mRoleManager.addRoleHolderAsUser(roleName, packageName, in addRoleHolder()
[all …]
/cts/tests/tests/packageinstaller/packagescheme/src/android/packageinstaller/packagescheme/cts/withoutvisibility/
DWithoutVisibilityPackageSchemeTest.kt23 val packageName: String = mContext.packageName constant in android.packageinstaller.packagescheme.cts.withoutvisibility.WithoutVisibilityPackageSchemeTest
27 runTest(packageName = packageName, packageHasVisibility = false, needTargetApp = true) in whenTargetAppIsInstalled_TestCantFindIt()
32 runTest(packageName = packageName, packageHasVisibility = false, needTargetApp = false) in whenTargetAppIsNotInstalled_TestCantFindIt()
/cts/tests/tests/packageinstaller/packagescheme/src/android/packageinstaller/packagescheme/cts/withvisibility/
DWithVisibilityPackageSchemeTest.kt23 val packageName: String = mContext.packageName constant in android.packageinstaller.packagescheme.cts.withvisibility.WithVisibilityPackageSchemeTest
27 runTest(packageName = packageName, packageHasVisibility = true, needTargetApp = true) in whenTargetAppIsInstalled_TestCanFindIt()
32 runTest(packageName = packageName, packageHasVisibility = true, needTargetApp = false) in whenTargetAppIsNotInstalled_TestCantFindIt()
/cts/hostsidetests/packagemanager/domainverification/lib/constants/java/src/com/android/cts/packagemanager/verify/domain/java/
DDomainUtils.kt44 fun resetAppLinks(packageName: String) = "pm reset-app-links $packageName"
46 fun setAppLinks(packageName: String, state: String, vararg domains: String) =
47 "pm set-app-links --package $packageName $state " +
50 fun setAppLinksAllowed(packageName: String, userId: Int, enabled: Boolean) =
51 "pm set-app-links-allowed --package $packageName --user $userId $enabled"
54 packageName: String,
58 ) = "pm set-app-links-user-selection --package $packageName --user $userId $enabled " +
/cts/tests/appsearch/src/com/android/cts/appsearch/external/app/
DDocumentIdUtilCtsTest.java30 final String packageName = "pkg"; in testQualifiedIdCreation() local
35 packageName, "data#base", "name#space", "id#entifier"); in testQualifiedIdCreation()
45 packageName, "data\\#base", "name\\#space", "id\\#entifier"); in testQualifiedIdCreation()
53 packageName, "data\\base", "name\\space", "id\\entifier"); in testQualifiedIdCreation()
58 packageName, "data\\\\base", "name\\\\space", "id\\\\entifier"); in testQualifiedIdCreation()
64 packageName, "data\\\\\\base", "name\\\\\\space", "id\\\\\\entifier"); in testQualifiedIdCreation()
71 final String packageName = "pkg"; in testQualifiedIdFromDocument() local
75 String qualifiedId = DocumentIdUtil.createQualifiedId(packageName, databaseName, document); in testQualifiedIdFromDocument()
/cts/common/device-side/bedstead/testapp/src/library/main/java/com/android/bedstead/testapp/
DTestAppEvents.kt132 ActivityCreatedEvent.queryPackage(mTestApp.packageName()).onUser(mTestApp.user())
135 ActivityDestroyedEvent.queryPackage(mTestApp.packageName()).onUser(mTestApp.user())
138 ActivityPausedEvent.queryPackage(mTestApp.packageName()).onUser(mTestApp.user())
141 ActivityRestartedEvent.queryPackage(mTestApp.packageName()).onUser(mTestApp.user())
144 ActivityResumedEvent.queryPackage(mTestApp.packageName()).onUser(mTestApp.user())
147 ActivityStartedEvent.queryPackage(mTestApp.packageName()).onUser(mTestApp.user())
150 ActivityStoppedEvent.queryPackage(mTestApp.packageName()).onUser(mTestApp.user())
153 BroadcastReceivedEvent.queryPackage(mTestApp.packageName()).onUser(mTestApp.user())
156 DeviceAdminBugreportFailedEvent.queryPackage(mTestApp.packageName()).onUser(mTestApp.user())
159 DeviceAdminBugreportSharedEvent.queryPackage(mTestApp.packageName()).onUser(mTestApp.user())
[all …]
/cts/tests/tests/companion/core/src/android/companion/cts/core/
DAssociationsCleanUpTest.kt52 testApp.packageName to MAC_ADDRESS_A, in <lambda>()
53 testApp.packageName to MAC_ADDRESS_B, in <lambda>()
54 targetApp.packageName to MAC_ADDRESS_C in <lambda>()
65 targetApp.packageName to MAC_ADDRESS_C in <lambda>()
78 testApp.packageName to MAC_ADDRESS_A, in <lambda>()
79 testApp.packageName to MAC_ADDRESS_B, in <lambda>()
80 targetApp.packageName to MAC_ADDRESS_C in <lambda>()
91 targetApp.packageName to MAC_ADDRESS_C in <lambda>()
97 cdm.getAssociationForPackage(app.userId, app.packageName).isEmpty() in <lambda>()
107 packageName: String in CompanionDeviceManager()
[all …]
DRetrieveAssociationsTest.kt57 packageName to MAC_ADDRESS_A in <lambda>()
72 packageName to MAC_ADDRESS_A in <lambda>()
79 packageName to MAC_ADDRESS_A, in <lambda>()
80 packageName to MAC_ADDRESS_B in <lambda>()
87 packageName to MAC_ADDRESS_A, in <lambda>()
88 packageName to MAC_ADDRESS_B, in <lambda>()
89 packageName to MAC_ADDRESS_C in <lambda>()
96 packageName to MAC_ADDRESS_B, in <lambda>()
97 packageName to MAC_ADDRESS_C in <lambda>()
104 packageName to MAC_ADDRESS_C in <lambda>()
[all …]
/cts/tests/security/src/android/keystore/cts/
DAttestationPackageInfo.java28 private final String packageName; field in AttestationPackageInfo
31 public AttestationPackageInfo(String packageName, long version) { in AttestationPackageInfo() argument
32 this.packageName = packageName; in AttestationPackageInfo()
45 packageName = Asn1Utils.getStringFromAsn1OctetStreamAssumingUTF8( in AttestationPackageInfo()
56 return packageName; in getPackageName()
71 int res = packageName.compareTo(other.packageName); in compareTo()
/cts/tests/framework/base/windowmanager/backgroundactivity/TestApp/src/android/server/wm/backgroundactivity/appa/
DComponents.java33 public static Components get(String packageName) { in get() argument
35 return sPackageNameToComponents.computeIfAbsent(packageName, Components::new); in get()
44 public ForegroundActivityAction(String packageName) { in ForegroundActivityAction() argument
45 LAUNCH_BACKGROUND_ACTIVITIES = packageName + ".ACTION_LAUNCH_BACKGROUND_ACTIVITIES"; in ForegroundActivityAction()
46 FINISH_ACTIVITY = packageName + ".ACTION_FINISH_ACTIVITY"; in ForegroundActivityAction()
55 public ForegroundEmbeddedActivityAction(String packageName) { in ForegroundEmbeddedActivityAction() argument
56 LAUNCH_EMBEDDED_ACTIVITY = packageName + ".ACTION_LAUNCH_EMBEDDED_ACTIVITY"; in ForegroundEmbeddedActivityAction()
57 FINISH_ACTIVITY = packageName + ".ACTION_FINISH_ACTIVITY"; in ForegroundEmbeddedActivityAction()
65 public LaunchIntoPipActivityAction(String packageName) { in LaunchIntoPipActivityAction() argument
66 LAUNCH_INTO_PIP = packageName + ".ACTION_LAUNCH_INTO_PIP"; in LaunchIntoPipActivityAction()
[all …]
/cts/hostsidetests/packagemanager/domainverification/lib/constants/android/src/com/android/cts/packagemanager/verify/domain/android/
DSharedVerifications.kt61 val packageName = DECLARING_PKG_NAME_1 in verifyDomains() constant
65 manager.getDomainVerificationUserState(packageName)!!.also { in verifyDomains()
66 Truth.assertThat(it.packageName).isEqualTo(packageName) in verifyDomains()
81 DomainUtils.setAppLinks(packageName, "STATE_APPROVED", DOMAIN_1, DOMAIN_2) in verifyDomains()
84 manager.getDomainVerificationUserState(packageName)!!.also { in verifyDomains()
85 Truth.assertThat(it.packageName).isEqualTo(packageName) in verifyDomains()
99 DomainUtils.setAppLinksUserSelection(packageName, userId, true, DOMAIN_1, DOMAIN_2) in verifyDomains()
102 manager.getDomainVerificationUserState(packageName)!!.also { in verifyDomains()
103 Truth.assertThat(it.packageName).isEqualTo(packageName) in verifyDomains()
116 ShellUtils.runShellCommand(DomainUtils.setAppLinksAllowed(packageName, userId, false)) in verifyDomains()
[all …]

12345678910>>...30