/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | SELinuxMMACTest.java | 58 var packageState = new PackageStateBuilder(Build.VERSION_CODES.P).build(); in getSeInfoOptInToLatest() local 60 argThat(argument -> argument.packageName.equals(packageState.getPackageName())))) in getSeInfoOptInToLatest() 62 assertThat(SELinuxMMAC.getSeInfo(packageState, packageState.getAndroidPackage(), null, in getSeInfoOptInToLatest() 69 var packageState = new PackageStateBuilder(Build.VERSION_CODES.P).build(); in getSeInfoOptInToR() local 71 argThat(argument -> argument.packageName.equals(packageState.getPackageName())))) in getSeInfoOptInToR() 73 assertThat(SELinuxMMAC.getSeInfo(packageState, packageState.getAndroidPackage(), null, in getSeInfoOptInToR() 80 var packageState = new PackageStateBuilder(Build.VERSION_CODES.P).build(); in getSeInfoNoOptIn() local 82 argThat(argument -> argument.packageName.equals(packageState.getPackageName())))) in getSeInfoNoOptIn() 84 assertThat(SELinuxMMAC.getSeInfo(packageState, packageState.getAndroidPackage(), null, in getSeInfoNoOptIn() 91 var packageState = new PackageStateBuilder(LATEST_OPT_IN_VERSION).build(); in getSeInfoNoOptInButAlreadyLatest() local [all …]
|
/frameworks/base/services/permission/java/com/android/server/permission/access/permission/ |
D | AppIdPermissionUpgrade.kt | 37 packageState: PackageState, in <lambda>() 41 val packageName = packageState.packageName in <lambda>() 48 allowlistRestrictedPermissions(packageState, userId) in <lambda>() 49 upgradeBackgroundLocationPermission(packageState, userId) in <lambda>() 57 upgradeAccessMediaLocationPermission(packageState, userId) in <lambda>() 66 upgradeAuralVisualMediaPermissions(packageState, userId) in <lambda>() 67 upgradeBodySensorPermissions(packageState, userId) in <lambda>() 76 upgradeUserSelectedVisualMediaPermission(packageState, userId) in <lambda>() 83 packageState: PackageState, in <lambda>() 86 packageState.androidPackage!!.requestedPermissions.forEach { permissionName -> in <lambda>() [all …]
|
D | AppIdPermissionPolicy.kt | 80 newState.externalState.packageStates.forEach { (_, packageState) -> in <lambda>() method 81 if (packageState.isApex) { in <lambda>() 84 evaluateAllPermissionStatesForPackageAndUser(packageState, userId, null) in <lambda>() 108 val packageState = in <lambda>() constant 110 adoptPermissions(packageState, changedPermissionNames) in <lambda>() 111 addPermissionGroups(packageState) in <lambda>() 112 addPermissions(packageState, changedPermissionNames) in <lambda>() 113 trimPermissions(packageState.packageName, changedPermissionNames) in <lambda>() 114 trimPermissionStates(packageState.appId) in <lambda>() 115 revokePermissionsOnPackageUpdate(packageState.appId) in <lambda>() [all …]
|
D | PermissionService.kt | 479 val packageState = in <lambda>() constant 481 if (packageState == null) { in <lambda>() 492 isPermissionGranted(packageState, userId, permissionName, deviceId) in <lambda>() 533 val packageState = in <lambda>() constant 539 service.getState { isPermissionGranted(packageState, userId, permissionName, deviceId) } in <lambda>() 554 packageState: PackageState, in <lambda>() 559 val appId = packageState.appId in <lambda>() 562 val isInstantApp = packageState.getUserStateOrDefault(userId).isInstantApp in <lambda>() 611 val packageState = in <lambda>() constant 613 if (packageState == null) { in <lambda>() [all …]
|
D | DevicePermissionPolicy.kt | 98 val packageState = in <lambda>() constant 100 trimPermissionStates(packageState.appId) in <lambda>() 104 override fun MutateStateScope.onPackageAdded(packageState: PackageState) { in <lambda>() 105 trimPermissionStates(packageState.appId) in <lambda>() 129 val packageState = newState.externalState.packageStates[packageName] ?: return in <lambda>() constant 130 val androidPackage = packageState.androidPackage ?: return in <lambda>() 131 val appId = packageState.appId in <lambda>() 178 val packageState = state.externalState.packageStates[packageName]!! in <lambda>() constant 179 packageState.androidPackage != null && predicate(packageState) in <lambda>() 190 val packageState = state.externalState.packageStates[packageName]!! in <lambda>() constant [all …]
|
/frameworks/base/services/core/java/com/android/server/pm/pkg/ |
D | PackageStateUtils.java | 30 public static boolean isMatch(PackageState packageState, long flags) { in isMatch() argument 32 return packageState.isSystem(); in isMatch() 56 public static boolean isEnabledAndMatches(@Nullable PackageStateInternal packageState, in isEnabledAndMatches() argument 58 if (packageState == null) return false; in isEnabledAndMatches() 60 final PackageUserStateInternal userState = packageState.getUserStateOrDefault(userId); in isEnabledAndMatches() 64 public static boolean isEnabledAndMatches(@Nullable PackageStateInternal packageState, in isEnabledAndMatches() argument 66 if (packageState == null) { in isEnabledAndMatches() 70 final AndroidPackage pkg = packageState.getPkg(); in isEnabledAndMatches() 74 final PackageUserStateInternal userState = packageState.getUserStateOrDefault(userId); in isEnabledAndMatches() 75 return PackageUserStateUtils.isMatch(userState, packageState.isSystem(), in isEnabledAndMatches()
|
/frameworks/base/services/permission/java/com/android/server/permission/access/ |
D | AccessPolicy.kt | 80 packageStates.forEach { (_, packageState) -> in <lambda>() method 81 if (packageState.isApex) { in <lambda>() 85 .mutateOrPut(packageState.appId) { MutableIndexedListSet() } in <lambda>() 86 .add(packageState.packageName) in <lambda>() 108 newState.externalState.packageStates.forEach { (_, packageState) -> in <lambda>() method 109 if (packageState.isApex) { in <lambda>() 112 upgradePackageVersion(packageState, userId) in <lambda>() 134 packageStates.forEach { (packageName, packageState) -> in <lambda>() method 135 if (packageState.isApex) { in <lambda>() 138 if (packageState.volumeUuid == volumeUuid) { in <lambda>() [all …]
|
/frameworks/libs/modules-utils/java/com/android/modules/utils/pm/ |
D | PackageStateModulesUtils.java | 38 public static boolean isDexoptable(@NonNull PackageState packageState) { in isDexoptable() argument 39 if (packageState.isApex() || "android".equals(packageState.getPackageName())) { in isDexoptable() 43 var pkg = packageState.getAndroidPackage(); in isDexoptable() 48 if ((packageState.getAppId() <= 0) && !isSdkLibrary(pkg)) { in isDexoptable() 73 @NonNull PackageState packageState, boolean codeOnly) { in isLoadableInOtherProcesses() 74 var pkg = packageState.getAndroidPackage(); in isLoadableInOtherProcesses()
|
/frameworks/base/services/permission/java/com/android/server/permission/access/appop/ |
D | AppIdAppOpUpgrade.kt | 25 packageState: PackageState, in MutateStateScope() 32 getAppOpMode(packageState.appId, userId, AppOpsManager.OPSTR_RUN_IN_BACKGROUND) in MutateStateScope() 34 packageState.appId, in MutateStateScope() 43 if (permissionName in packageState.androidPackage!!.requestedPermissions) { in MutateStateScope() 47 packageState.appId, in MutateStateScope() 55 packageState.appId, in MutateStateScope()
|
D | PackageAppOpUpgrade.kt | 25 packageState: PackageState, in MutateStateScope() 33 packageState.packageName, in MutateStateScope() 38 packageState.packageName, in MutateStateScope()
|
/frameworks/base/services/core/java/com/android/server/pm/dex/ |
D | ArtUtils.java | 42 AndroidPackage pkg, PackageState packageState) { in createArtPackageInfo() argument 45 Arrays.asList(getAppDexInstructionSets(packageState.getPrimaryCpuAbi(), in createArtPackageInfo() 46 packageState.getSecondaryCpuAbi())), in createArtPackageInfo() 48 getOatDir(pkg, packageState)); in createArtPackageInfo() 51 private static String getOatDir(AndroidPackage pkg, @NonNull PackageState packageState) { in getOatDir() argument 52 if (!AndroidPackageUtils.canHaveOatDir(packageState, pkg)) { in getOatDir()
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | SuspendPackageHelper.java | 133 final PackageStateInternal packageState = snapshot.getPackageStateInternal(packageName); in setPackagesSuspended() local 134 if (packageState == null in setPackagesSuspended() 135 || !packageState.getUserStateOrDefault(targetUserId).isInstalled() in setPackagesSuspended() 136 || snapshot.shouldFilterApplication(packageState, callingUid, targetUserId)) { in setPackagesSuspended() 148 packageState.getUserStateOrDefault(targetUserId).getSuspendParams(); in setPackagesSuspended() 157 UserHandle.getUid(targetUserId, packageState.getAppId())); in setPackagesSuspended() 169 notifyUids.add(UserHandle.getUid(targetUserId, packageState.getAppId())); in setPackagesSuspended() 174 changedUids.add(UserHandle.getUid(targetUserId, packageState.getAppId())); in setPackagesSuspended() 240 final PackageStateInternal packageState = in getUnsuspendablePackagesForUser() local 243 if (packageState == null) { in getUnsuspendablePackagesForUser() [all …]
|
D | UserSystemPackageInstaller.java | 224 pmInt.forEachPackageState(packageState -> { in installWhitelistedSystemPackages() 225 if (packageState.getPkg() == null || !packageState.isSystem()) { in installWhitelistedSystemPackages() 229 || userAllowlist.contains(packageState.getPackageName())) in installWhitelistedSystemPackages() 230 && !packageState.getTransientState().isHiddenUntilInstalled(); in installWhitelistedSystemPackages() 231 if (packageState.getUserStateOrDefault(userId).isInstalled() != install in installWhitelistedSystemPackages() 232 && shouldChangeInstallationState(packageState, install, userId, in installWhitelistedSystemPackages() 234 changesToCommit.add(userId, packageState.getPackageName(), install); in installWhitelistedSystemPackages() 273 private static boolean shouldChangeInstallationState(PackageStateInternal packageState, in shouldChangeInstallationState() argument 281 return packageState.getUserStateOrDefault(userId).getUninstallReason() in shouldChangeInstallationState() 286 || (isUpgrade && !preOtaPkgs.contains(packageState.getPackageName())); in shouldChangeInstallationState() [all …]
|
D | IncrementalProgressListener.java | 36 PackageStateInternal packageState = mPm.snapshotComputer() in onPackageLoadingProgressChanged() local 38 if (packageState == null) { in onPackageLoadingProgressChanged() 42 boolean wasLoading = packageState.isLoading(); in onPackageLoadingProgressChanged() 54 .unregisterLoadingProgressCallbacks(packageState.getPathString()); in onPackageLoadingProgressChanged()
|
D | DistractingPackageHelper.java | 91 final PackageStateInternal packageState = in setDistractingPackageRestrictionsAsUser() local 94 if (packageState == null) { in setDistractingPackageRestrictionsAsUser() 105 final int oldDistractionFlags = packageState.getUserStateOrDefault(userId) in setDistractingPackageRestrictionsAsUser() 109 changedUids.add(UserHandle.getUid(userId, packageState.getAppId())); in setDistractingPackageRestrictionsAsUser() 154 final PackageStateInternal packageState = in getDistractingPackageRestrictionsAsUser() local 157 if (packageState == null) { in getDistractingPackageRestrictionsAsUser() 161 res[i] = packageState.getUserStateOrDefault(userId).getDistractionFlags(); in getDistractingPackageRestrictionsAsUser()
|
D | PackageManagerInternalBase.java | 293 final PackageStateInternal packageState = getPackageStateInternal(packageName); in getDistractingPackageRestrictions() local 294 return (packageState == null) ? RESTRICTION_NONE in getDistractingPackageRestrictions() 295 : packageState.getUserStateOrDefault(userId).getDistractionFlags(); in getDistractingPackageRestrictions() 389 final PackageStateInternal packageState = getPackageStateInternal(packageName); in isPackageEphemeral() local 390 return packageState != null in isPackageEphemeral() 391 && packageState.getUserStateOrDefault(userId).isInstantApp(); in isPackageEphemeral() 397 final PackageStateInternal packageState = getPackageStateInternal(packageName); in wasPackageEverLaunched() local 398 if (packageState == null) { in wasPackageEverLaunched() 401 return !packageState.getUserStateOrDefault(userId).isNotLaunched(); in wasPackageEverLaunched() 516 final PackageStateInternal packageState = getPackageStateInternal(packageName); in getPackageTargetSdkVersion() local [all …]
|
D | MovePackageHelper.java | 87 final PackageStateInternal packageState = snapshot.getPackageStateForInstalledAndFiltered( in movePackageInternal() local 89 if (packageState == null || packageState.getPkg() == null) { in movePackageInternal() 92 final int[] installedUserIds = PackageStateUtils.queryInstalledUsers(packageState, in movePackageInternal() 102 if (snapshot.shouldFilterApplicationIncludingUninstalled(packageState, callingUid, in movePackageInternal() 107 final AndroidPackage pkg = packageState.getPkg(); in movePackageInternal() 108 if (packageState.isSystem()) { in movePackageInternal() 127 final String currentVolumeUuid = packageState.getVolumeUuid(); in movePackageInternal() 145 final InstallSource installSource = packageState.getInstallSource(); in movePackageInternal() 146 final String packageAbiOverride = packageState.getCpuAbiOverride(); in movePackageInternal() 148 final String seinfo = packageState.getSeInfo(); in movePackageInternal()
|
D | PackageManagerService.java | 1760 final PackageStateInternal packageState = in main() 1762 if (packageState == null) { in main() 1766 AndroidPackage pkg = packageState.getPkg(); in main() 1768 packageState.getSharedUserAppId()); in main() 1769 String oldSeInfo = packageState.getSeInfo(); in main() 1775 final String newSeInfo = SELinuxMMAC.getSeInfo(packageState, pkg, sharedUser, in main() 2450 forEachPackageState(computer, packageState -> { in PackageManagerService() 2451 var pkg = packageState.getAndroidPackage(); in PackageManagerService() 2452 if (pkg == null || packageState.isSystem()) { in PackageManagerService() 2456 if (!packageState.getUserStateOrDefault(userId).isInstantApp() in PackageManagerService() [all …]
|
/frameworks/base/services/tests/PermissionServiceMockingTests/src/com/android/server/permission/test/ |
D | BasePermissionPolicyTest.kt | 262 packageState: PackageState, in <lambda>() 267 packageStates.toMutableMap().apply { put(packageState.packageName, packageState) } in <lambda>() 269 mutateAppIdPackageNames().mutateOrPut(packageState.appId) { MutableIndexedListSet() } in <lambda>() 270 .add(packageState.packageName) in <lambda>() 275 packageState: PackageState, in <lambda>() 280 packageStates.toMutableMap().apply { remove(packageState.packageName) } in <lambda>() 282 mutateAppIdPackageNames().mutateOrPut(packageState.appId) { MutableIndexedListSet() } in <lambda>() 283 .remove(packageState.packageName) in <lambda>() 288 packageState: PackageState, in <lambda>() 291 (disabledSystemPackageStates as ArrayMap)[packageState.packageName] = packageState in <lambda>()
|
D | DevicePermissionPolicyTest.kt | 40 val packageState = mockPackageState( in testOnAppIdRemoved_clearPermissionFlags() constant 44 addPackageState(packageState) in testOnAppIdRemoved_clearPermissionFlags() 140 val packageState = mockPackageState( in testOnStorageVolumeMounted_trimsPermissionsNotRequestAnymore() constant 146 addPackageState(packageState) in testOnStorageVolumeMounted_trimsPermissionsNotRequestAnymore() 181 val packageState = mockPackageState( in testResetRuntimePermissions_trimsPermissionStates() constant 185 addPackageState(packageState) in testResetRuntimePermissions_trimsPermissionStates() 204 val packageState = mockPackageState( in testResetRuntimePermissions_keepsPermissionStates() constant 215 addPackageState(packageState) in testResetRuntimePermissions_keepsPermissionStates()
|
/frameworks/base/services/core/java/com/android/server/pm/resolution/ |
D | ComponentResolver.java | 502 var packageState = computer.getPackageStateInternal(packageName); in adjustPriority() local 504 final boolean privilegedApp = packageState.isPrivileged(); in adjustPriority() 914 final PackageStateInternal packageState = computer.getPackageStateInternal( in applyMimeGroups() local 917 Collection<String> mimeTypes = packageState == null in applyMimeGroups() 918 ? Collections.emptyList() : packageState.getMimeGroups() in applyMimeGroups() 940 final PackageStateInternal packageState = computer.getPackageStateInternal( in isFilterStopped() local 942 if (packageState == null || packageState.getPkg() == null) { in isFilterStopped() 946 if (packageState.isSystem()) { in isFilterStopped() 949 return packageState.isScannedAsStoppedSystemApp() && in isFilterStopped() 950 packageState.getUserStateOrDefault(userId).isStopped(); in isFilterStopped() [all …]
|
/frameworks/base/services/core/java/com/android/server/pm/parsing/pkg/ |
D | AndroidPackageUtils.java | 166 public static boolean canHaveOatDir(@NonNull PackageState packageState, in canHaveOatDir() argument 171 if (packageState.isSystem() && !packageState.isUpdatedSystemApp()) { in canHaveOatDir() 241 @NonNull PackageStateInternal packageState) { in getHiddenApiEnforcementPolicy() argument 247 } else if (packageState.isSystem()) { in getHiddenApiEnforcementPolicy() 272 public static boolean isMatchForSystemOnly(@NonNull PackageState packageState, long flags) { in isMatchForSystemOnly() argument 274 return packageState.isSystem(); in isMatchForSystemOnly()
|
/frameworks/base/services/core/java/com/android/server/pm/pkg/mutate/ |
D | PackageStateMutator.java | 63 final PackageSetting packageState = mActiveStateFunction.apply(packageName); in forPackageNullable() local 64 setState(packageState); in forPackageNullable() 65 if (packageState == null) { in forPackageNullable() 69 return setState(packageState); in forPackageNullable() 79 final PackageSetting packageState = mDisabledStateFunction.apply(packageName); in forDisabledSystemPackageNullable() local 80 if (packageState == null) { in forDisabledSystemPackageNullable() 84 return setState(packageState); in forDisabledSystemPackageNullable()
|
/frameworks/base/services/core/java/com/android/server/ |
D | BinaryTransparencyService.java | 205 PackageState packageState, int mbaStatus) { in collectAppInfo() argument 208 Slog.d(TAG, "Computing content digest for " + packageState.getPackageName() + " at " in collectAppInfo() 209 + packageState.getPath()); in collectAppInfo() 215 String packageName = packageState.getPackageName(); in collectAppInfo() 216 long versionCode = packageState.getVersionCode(); in collectAppInfo() 218 computePackageSignerSha256Digests(packageState.getSigningInfo()); in collectAppInfo() 220 AndroidPackage pkg = packageState.getAndroidPackage(); in collectAppInfo() 245 packageState.getPackageName()); in collectAppInfo() 372 PackageState packageState = mPackageManagerInternal.getPackageStateInternal( in collectAllApexInfo() local 374 if (packageState == null) { in collectAllApexInfo() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/dreams/homecontrols/ |
D | HomeControlsDreamStartable.kt | 54 val packageState = in <lambda>() constant 62 packageState, in <lambda>()
|