/aosp12/packages/modules/Wifi/service/java/com/android/server/wifi/util/ |
H A D | WifiPermissionsUtil.java | 95 if (!checkCallersLocationPermission(pkgName, featureId, in enforceLocationPermission() 256 checkPackage(uid, pkgName); in enforceCanAccessScanResults() 295 if (!isScanAllowedbyApps(pkgName, featureId, uid)) { in enforceCanAccessScanResults() 327 public void enforceCanAccessScanResultsForWifiScanner(String pkgName, in enforceCanAccessScanResultsForWifiScanner() argument 330 checkPackage(uid, pkgName); in enforceCanAccessScanResultsForWifiScanner() 348 if (!isScanAllowedbyApps(pkgName, featureId, uid)) { in enforceCanAccessScanResultsForWifiScanner() 368 checkPackage(uid, pkgName); in checkCanAccessWifiDirect() 387 if (!checkCallersLocationPermission(pkgName, featureId, uid, in checkCanAccessWifiDirect() 404 if (pkgName == null) { in checkPackage() 407 mAppOps.checkPackage(uid, pkgName); in checkPackage() [all …]
|
/aosp12/frameworks/base/services/tests/PackageManagerServiceTests/unit/src/com/android/server/pm/test/verify/domain/ |
H A D | DomainVerificationPackageTest.kt | 426 val pkgName = PKG_ONE regex 468 map.remove(pkgName) 487 val pkgName = PKG_ONE regex 510 map.remove(pkgName) 529 val pkgName = PKG_ONE regex 559 map.remove(pkgName) 603 map.remove(pkgName) 655 map.remove(pkgName) 815 pkgName -> pkgSettings.find { pkgName == it.getName() } 819 makeService { pkgName -> pkgSettings.find { pkgName == it.getName() } } [all …]
|
/aosp12/frameworks/libs/net/common/framework/com/android/net/module/util/ |
H A D | LocationPermissionChecker.java | 90 public boolean checkLocationPermission(String pkgName, @Nullable String featureId, in checkLocationPermission() argument 113 String pkgName, @Nullable String featureId, int uid, @Nullable String message) { in checkLocationPermissionWithDetailInfo() argument 114 final int result = checkLocationPermissionInternal(pkgName, featureId, uid, message); in checkLocationPermissionWithDetailInfo() 151 private int checkLocationPermissionInternal(String pkgName, @Nullable String featureId, in checkLocationPermissionInternal() argument 153 checkPackage(uid, pkgName); in checkLocationPermissionInternal() 169 if (!checkCallersLocationPermission(pkgName, featureId, uid, in checkLocationPermissionInternal() 206 AppOpsManager.OPSTR_FINE_LOCATION, pkgName, featureId, uid, message); in checkCallersLocationPermission() 252 return mAppOpsManager.noteOp(op, uid, pkgName, featureId, message) in noteAppOpAllowed() 256 private void checkPackage(int uid, String pkgName) in checkPackage() argument 258 if (pkgName == null) { in checkPackage() [all …]
|
/aosp12/frameworks/base/core/java/android/ddm/ |
H A D | DdmHandleAppName.java | 85 public static void setAppName(String appName, String pkgName, int userId) { in setAppName() argument 86 if (appName == null || appName.isEmpty() || pkgName == null || pkgName.isEmpty()) return; in setAppName() 88 sNames = new Names(appName, pkgName); in setAppName() 91 sendAPNM(appName, pkgName, userId); in setAppName() 102 private static void sendAPNM(String appName, String pkgName, int userId) { in sendAPNM() argument 111 + pkgName.length() * 2 /* pkgName */); in sendAPNM() 116 out.putInt(pkgName.length()); in sendAPNM() 117 putString(out, pkgName); in sendAPNM() 133 private Names(String appName, String pkgName) { in Names() argument 135 mPkgName = pkgName; in Names()
|
/aosp12/packages/providers/TvProvider/tests/src/com/android/providers/tv/ |
H A D | Utils.java | 53 this(-1, pkgName); in BaseProgram() 83 Program(String pkgName) { in Program() argument 84 super(-1, pkgName); in Program() 88 super(id, pkgName); in Program() 104 super(-1, pkgName); in PreviewProgram() 108 super(id, pkgName); in PreviewProgram() 129 super(id, pkgName); in RecordedProgram() 153 super(-1, pkgName); in WatchedProgram() 157 super(id, pkgName); in WatchedProgram() 173 super(-1, pkgName); in WatchNextProgram() [all …]
|
/aosp12/frameworks/base/services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/ |
H A D | HostUtils.kt | 92 fun getDataDir(device: ITestDevice, pkgName: String) = 93 device.executeShellCommand("dumpsys package $pkgName") 127 pkgName: String, 129 ) = device.executeShellCommand("pm dump $pkgName") 139 fun getCodePaths(device: ITestDevice, pkgName: String) = 140 device.executeShellCommand("pm dump $pkgName") 147 private fun userIdLineSequence(device: ITestDevice, pkgName: String) = 148 packageSection(device, pkgName) 151 fun getUserIdToPkgEnabledState(device: ITestDevice, pkgName: String) = 152 userIdLineSequence(device, pkgName).associate { [all …]
|
H A D | SdCardEjectionTests.kt | 186 private fun movePackage(pkgName: String, volume: Volume) { 188 val codePath = HostUtils.getCodePaths(device, pkgName).first() 191 "pm move-package $pkgName ${volume.fsUuid}").trim()) 195 private fun unmount(volume: Volume, pkgName: String) { 209 HostUtils.packageSection(device, pkgName, sectionName = "Compiler stats") 210 .any { it.contains("Unable to find package: $pkgName") } 215 private fun remount(volume: Volume, hostApkFile: File, pkgName: String) { 238 val codePath = HostUtils.getCodePaths(device, pkgName).first() 251 HostUtils.packageSection(device, pkgName, sectionName = "Compiler stats") 252 .none { it.contains("Unable to find package: $pkgName") }
|
/aosp12/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
H A D | CarrierPrivilegesTracker.java | 271 String pkgName = (String) msg.obj; in handleMessage() local 272 handlePackageAddedOrReplaced(pkgName); in handleMessage() 276 String pkgName = (String) msg.obj; in handleMessage() local 277 handlePackageRemoved(pkgName); in handleMessage() 383 + " pkg=" + Rlog.pii(TAG, pkgName) in handlePackageAddedOrReplaced() 408 mCachedUids.remove(pkgName); in handlePackageRemoved() 502 if (rule.matches(cert, pkgName)) { in isPackagePrivileged() 507 if (rule.matches(cert, pkgName)) { in isPackagePrivileged() 516 if (mCachedUids.containsKey(pkgName)) { in getUidsForPackage() 517 return mCachedUids.get(pkgName); in getUidsForPackage() [all …]
|
/aosp12/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/ |
H A D | RecentAppsPreferenceController.java | 157 final String pkgName = stat.getPackageName(); in displayRecentApps() local 159 mApplicationsState.getEntry(pkgName, mUserId); in displayRecentApps() 165 Preference pref = appPreferences.remove(pkgName); in displayRecentApps() 170 pref.setKey(pkgName); in displayRecentApps() 224 final String pkgName = pkgStats.getPackageName(); in getDisplayableRecentAppList() local 225 final UsageStats existingStats = map.get(pkgName); in getDisplayableRecentAppList() 227 map.put(pkgName, pkgStats); in getDisplayableRecentAppList() 255 final String pkgName = stat.getPackageName(); in shouldIncludePkgInRecents() local 261 if (SKIP_SYSTEM_PACKAGES.contains(pkgName)) { in shouldIncludePkgInRecents() 262 Log.d(TAG, "System package, skipping " + pkgName); in shouldIncludePkgInRecents() [all …]
|
/aosp12/packages/apps/Settings/src/com/android/settings/notification/history/ |
H A D | NotificationHistoryPackage.java | 30 String pkgName; field in NotificationHistoryPackage 36 public NotificationHistoryPackage(String pkgName, int uid) { in NotificationHistoryPackage() argument 37 this.pkgName = pkgName; in NotificationHistoryPackage() 56 Objects.equals(pkgName, that.pkgName) && in equals() 64 return Objects.hash(pkgName, uid, notifications, label, icon); in hashCode()
|
/aosp12/packages/apps/Settings/src/com/android/settings/applications/ |
H A D | RecentAppStatsMixin.java | 131 final String pkgName = pkgStats.getPackageName(); in loadDisplayableRecentApps() local 132 final UsageStats existingStats = map.get(pkgName); in loadDisplayableRecentApps() 134 map.put(pkgName, pkgStats); in loadDisplayableRecentApps() 161 final String pkgName = stat.getPackageName(); in shouldIncludePkgInRecents() local 164 + pkgName); in shouldIncludePkgInRecents() 168 if (SKIP_SYSTEM_PACKAGES.contains(pkgName)) { in shouldIncludePkgInRecents() 169 Log.d(TAG, "System package, skipping " + pkgName); in shouldIncludePkgInRecents() 172 if (AppUtils.isHiddenSystemModule(mContext, pkgName)) { in shouldIncludePkgInRecents() 176 .setPackage(pkgName); in shouldIncludePkgInRecents() 181 mApplicationsState.getEntry(pkgName, mUserId); in shouldIncludePkgInRecents() [all …]
|
/aosp12/packages/apps/Car/Settings/src/com/android/car/settings/applications/ |
H A D | RecentAppsItemManager.java | 129 String pkgName = pkgStats.getPackageName(); in loadDisplayableRecentApps() local 130 UsageStats existingStats = map.get(pkgName); in loadDisplayableRecentApps() 132 map.put(pkgName, pkgStats); in loadDisplayableRecentApps() 159 String pkgName = stat.getPackageName(); in shouldIncludePkgInRecents() local 162 + pkgName); in shouldIncludePkgInRecents() 166 if (mIgnoredPackages.contains(pkgName)) { in shouldIncludePkgInRecents() 167 LOG.d("System package, skipping " + pkgName); in shouldIncludePkgInRecents() 171 if (AppUtils.isHiddenSystemModule(mContext, pkgName)) { in shouldIncludePkgInRecents() 176 .setPackage(pkgName); in shouldIncludePkgInRecents() 181 mApplicationsState.getEntry(pkgName, mUserId); in shouldIncludePkgInRecents() [all …]
|
/aosp12/frameworks/base/apex/jobscheduler/service/java/com/android/server/job/ |
H A D | JobSchedulerShellCommand.java | 105 pw.print(pkgName); in printError() 115 pw.print(pkgName); in printError() 125 pw.print(pkgName); in printError() 172 final String pkgName = getNextArgRequired(); in runJob() local 178 if (printError(ret, pkgName, userId, jobId)) { in runJob() 218 final String pkgName = getNextArg(); in timeout() local 254 final String pkgName = getNextArg(); in cancelJob() local 342 final String pkgName = getNextArgRequired(); in getJobState() local 349 printError(ret, pkgName, userId, jobId); in getJobState() 386 final String pkgName = getNextArgRequired(); in resetExecutionQuota() local [all …]
|
/aosp12/frameworks/base/services/core/java/com/android/server/pm/ |
H A D | UserSystemPackageInstaller.java | 333 for (String pkgName : allWhitelistedPackages) { in getPackagesWhitelistWarnings() 364 final String pkgName = pkg.getManifestPackageName(); in getPackagesWhitelistErrors() 365 if (!allWhitelistedPackages.contains(pkgName) in getPackagesWhitelistErrors() 539 || userWhitelist.contains(pkgName); in shouldInstallPackage() 554 installablePkgs.add(pkgName); in getWhitelistedPackagesForUserType() 602 final String pkgName = whitelist.keyAt(i).intern(); in determineWhitelistedPackagesForUserTypes() local 605 result.put(pkgName, typesBitSet); in determineWhitelistedPackagesForUserTypes() 612 final String pkgName = blacklist.keyAt(i).intern(); in determineWhitelistedPackagesForUserTypes() local 614 final Long typesBitSet = result.get(pkgName); in determineWhitelistedPackagesForUserTypes() 619 result.put(pkgName, 0L); in determineWhitelistedPackagesForUserTypes() [all …]
|
/aosp12/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/ |
H A D | InstallCarrierAppUtils.java | 52 static void showNotification(Context context, String pkgName) { in showNotification() argument 56 String appName = getAppNameFromPackageName(context, pkgName); in showNotification() 71 getPlayStoreIntent(pkgName), PendingIntent.FLAG_UPDATE_CURRENT in showNotification() 88 pkgName, in showNotification() 108 static void hideNotification(Context context, String pkgName) { in hideNotification() argument 109 getNotificationManager(context).cancel(pkgName, ACTIVATE_CELL_SERVICE_NOTIFICATION_ID); in hideNotification() 112 static Intent getPlayStoreIntent(String pkgName) { in getPlayStoreIntent() argument 115 storeIntent.setData(Uri.parse("market://details?id=" + pkgName)); in getPlayStoreIntent() 122 String pkgName, long delayMillis) { in showNotificationIfNotInstalledDelayed() argument 127 ShowInstallAppNotificationReceiver.get(context, pkgName), in showNotificationIfNotInstalledDelayed()
|
H A D | ShowInstallAppNotificationReceiver.java | 31 public static Intent get(Context context, String pkgName) { in get() argument 33 intent.putExtra(EXTRA_PACKAGE_NAME, pkgName); in get() 39 String pkgName = intent.getStringExtra(EXTRA_PACKAGE_NAME); in onReceive() local 41 if (!UiccProfile.isPackageBundled(context, pkgName)) { in onReceive() 42 InstallCarrierAppUtils.showNotification(context, pkgName); in onReceive()
|
/aosp12/frameworks/base/core/java/com/android/internal/os/ |
H A D | AppIdToPackageMap.java | 66 String pkgName = mAppIdToPackageMap.get(appId); in mapAppId() local 67 return pkgName == null ? String.valueOf(appId) : pkgName; in mapAppId() 73 final String pkgName = mAppIdToPackageMap.get(appId); in mapUid() local 75 return pkgName == null ? uidStr : pkgName + '/' + uidStr; in mapUid()
|
/aosp12/frameworks/base/services/tests/PackageManagerComponentOverrideTests/src/com/android/server/pm/test/override/ |
H A D | PackageManagerComponentLabelIconOverrideTest.kt | 137 val pkgName: String, 143 : this(pkgName, appType, Result.Exception(exception)) 263 assertThat(mockPendingBroadcasts.get(userId, params.pkgName)) 274 PackageImpl.forTesting(pkgName) 281 private fun makePkgSetting(pkgName: String) = spy( 283 pkgName, null, File("/test"), 292 mockPkg = makePkg(params.pkgName) 293 mockPkgSetting = makePkgSetting(params.pkgName) 319 if (mockedPkgSettings.containsKey(params.pkgName)) { 321 mockedPkgSettings.put(params.pkgName, mockPkgSetting) [all …]
|
/aosp12/frameworks/base/services/core/java/com/android/server/pm/verify/domain/ |
H A D | DomainVerificationSettings.java | 115 String pkgName = pkgState.getPackageName(); in readSettings() local 116 DomainVerificationPkgState existingState = liveState.get(pkgName); in readSettings() 124 mPendingPkgStates.put(pkgName, pkgState); in readSettings() 159 String pkgName = newState.getPackageName(); in restoreSettings() local 160 DomainVerificationPkgState existingState = liveState.get(pkgName); in restoreSettings() 162 existingState = mPendingPkgStates.get(pkgName); in restoreSettings() 165 existingState = mRestoredPkgStates.get(pkgName); in restoreSettings() 191 mRestoredPkgStates.put(pkgName, newState); in restoreSettings() 310 public DomainVerificationPkgState removePendingState(@NonNull String pkgName) { in removePendingState() argument 312 return mPendingPkgStates.remove(pkgName); in removePendingState() [all …]
|
/aosp12/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/hibernation/ |
H A D | HibernationController.kt | 80 for ((pkgName, _) in hibernatedApps) { 81 if (globallyHibernatedApps.contains(pkgName) || 82 hibernationManager.isHibernatingGlobally(pkgName)) { 87 val lastUsedGlobally = usageStatsManager.getLastTimeAnyComponentUsed(pkgName) 92 hibernationManager.setHibernatingGlobally(pkgName, true) 93 globallyHibernatedApps.add(pkgName)
|
/aosp12/packages/apps/SettingsIntelligence/src/com/android/settings/intelligence/search/query/ |
H A D | CursorToSearchResultConverter.java | 124 final String pkgName = cursor.getString(cursor.getColumnIndexOrThrow( in buildSingleSearchResultFromCursor() local 142 final Drawable icon = getIconForPackage(contextMap, pkgName, iconResStr); in buildSingleSearchResultFromCursor() 155 private Drawable getIconForPackage(Map<String, Context> contextMap, String pkgName, in getIconForPackage() argument 157 if (TextUtils.isEmpty(pkgName)) { in getIconForPackage() 164 Context packageContext = contextMap.get(pkgName); in getIconForPackage() 170 themedAppContext.createPackageContext(pkgName, 0), in getIconForPackage() 172 contextMap.put(pkgName, packageContext); in getIconForPackage() 174 Log.e(TAG, "Cannot create Context for package: " + pkgName); in getIconForPackage() 183 Log.w(TAG, "Cannot get icon, pkg/id :" + pkgName + "/" + iconId); in getIconForPackage()
|
/aosp12/frameworks/base/core/tests/coretests/src/android/content/pm/ |
H A D | PackageManagerTests.java | 148 String pkgName; field in PackageManagerTests.InstallReceiver 151 this.pkgName = pkgName; in InstallReceiver() 756 String pkgName; field in PackageManagerTests.ReplaceReceiver 772 this.pkgName = pkgName; in ReplaceReceiver() 786 if (pkgName == null || !pkgName.equals(installedPkg)) { in notifyNow() 900 String pkgName; field in PackageManagerTests.DeleteReceiver 903 this.pkgName = pkgName; in DeleteReceiver() 1016 if (pkgName == null) { in cleanUpInstall() 1120 String pkgName; field in PackageManagerTests.MoveReceiver 1131 this.pkgName = pkgName; in MoveReceiver() [all …]
|
/aosp12/packages/apps/TvSettings/Settings/src/com/android/tv/settings/ |
H A D | MainFragment.java | 287 String pkgName = info.activityInfo.packageName; in updateSoundSettings() local 288 Drawable icon = getDrawableResource(pkgName, "sound_icon"); in updateSoundSettings() 292 String title = getStringResource(pkgName, "sound_pref_title"); in updateSoundSettings() 296 String summary = getStringResource(pkgName, "sound_pref_summary"); in updateSoundSettings() 310 private String getStringResource(String pkgName, String resourceName) { in getStringResource() argument 312 Context targetContext = getContext().createPackageContext(pkgName, 0); in getStringResource() 314 pkgName + ":string/" + resourceName, null, null); in getStringResource() 331 private Drawable getDrawableResource(String pkgName, String resourceName) { in getDrawableResource() argument 333 Context targetContext = getContext().createPackageContext(pkgName, 0); in getDrawableResource() 335 pkgName + ":drawable/" + resourceName, null, null); in getDrawableResource() [all …]
|
/aosp12/packages/apps/Settings/src/com/android/settings/applications/intentpicker/ |
H A D | IntentPickerUtils.java | 58 DomainVerificationManager manager, String pkgName) { in getDomainVerificationUserState() argument 61 manager.getDomainVerificationUserState(pkgName); in getDomainVerificationUserState() 77 public static List<String> getLinksList(DomainVerificationManager manager, String pkgName, in getLinksList() argument 80 pkgName); in getLinksList()
|
/aosp12/frameworks/base/services/core/java/com/android/server/om/ |
H A D | OverlayManagerServiceImpl.java | 247 Set<PackageAndUser> onPackageAdded(@NonNull final String pkgName, in onPackageAdded() argument 251 updatedTargets.add(new PackageAndUser(pkgName, userId)); in onPackageAdded() 257 Set<PackageAndUser> onPackageChanged(@NonNull final String pkgName, in onPackageChanged() argument 259 return reconcileSettingsForPackage(pkgName, userId, 0 /* flags */); in onPackageChanged() 269 Set<PackageAndUser> onPackageReplaced(@NonNull final String pkgName, final int userId) in onPackageReplaced() argument 271 return reconcileSettingsForPackage(pkgName, userId, 0 /* flags */); in onPackageReplaced() 277 Slog.d(TAG, "onPackageRemoved pkgName=" + pkgName + " userId=" + userId); in onPackageRemoved() 284 removeOverlaysForUser(oi -> pkgName.equals(oi.packageName), userId)); in onPackageRemoved() 380 updateOverlaysForTarget(pkgName, userId, flags)); in reconcileSettingsForPackage() 383 final AndroidPackage pkg = mPackageManager.getPackageForUser(pkgName, userId); in reconcileSettingsForPackage() [all …]
|