Home
last modified time | relevance | path

Searched refs:callingUid (Results 1 – 25 of 189) sorted by relevance

12345678

/frameworks/base/core/java/com/android/internal/util/
DProviderAccessStats.java49 private void incrementStats(int callingUid, SparseLongArray stats) { in incrementStats() argument
51 stats.put(callingUid, stats.get(callingUid) + 1); in incrementStats()
52 mAllCallingUids.put(callingUid, true); in incrementStats()
62 private void incrementStats(int callingUid, boolean inBatch, in incrementStats() argument
64 incrementStats(callingUid, inBatch ? statsInBatch : statsNonBatch); in incrementStats()
67 public final void incrementInsertStats(int callingUid, boolean inBatch) { in incrementInsertStats() argument
68 incrementStats(callingUid, inBatch, mInsertStats, mInsertInBatchStats); in incrementInsertStats()
71 public final void incrementUpdateStats(int callingUid, boolean inBatch) { in incrementUpdateStats() argument
72 incrementStats(callingUid, inBatch, mUpdateStats, mUpdateInBatchStats); in incrementUpdateStats()
75 public final void incrementDeleteStats(int callingUid, boolean inBatch) { in incrementDeleteStats() argument
[all …]
/frameworks/base/services/core/java/com/android/server/pm/permission/
DPermissionManagerServiceInternal.java74 int callingUid, int userId, @Nullable PermissionCallback callback); in grantRuntimePermission() argument
76 @NonNull PackageParser.Package pkg, int callingUid, in grantRuntimePermissionsGrantedToDisabledPackage() argument
80 @NonNull String[] grantedPermissions, int callingUid, in grantRequestedRuntimePermissions() argument
87 @NonNull List<String> permissions, int callingUid, in setWhitelistedRestrictedPermissions() argument
126 int callingUid, @Nullable PermissionCallback callback); in addDynamicPermission() argument
127 public abstract void removeDynamicPermission(@NonNull String permName, int callingUid, in removeDynamicPermission() argument
133 @NonNull String packageName, int callingUid, int userId); in getPermissionFlags() argument
138 @NonNull String groupName, int flags, int callingUid); in getPermissionGroupInfo() argument
143 int callingUid); in getAllPermissionGroups() argument
148 @NonNull String packageName, @PermissionInfoFlags int flags, int callingUid); in getPermissionInfo() argument
[all …]
DPermissionManagerService.java296 private int checkPermission(String permName, String pkgName, int callingUid, int userId) { in checkPermission() argument
303 if (mPackageManagerInt.filterAppAccess(pkg, callingUid, userId)) { in checkPermission()
330 int callingUid) { in checkUidPermission() argument
331 final int callingUserId = UserHandle.getUserId(callingUid); in checkUidPermission()
333 mPackageManagerInt.getInstantAppPackageName(callingUid) != null; in checkUidPermission()
346 } else if (mPackageManagerInt.filterAppAccess(pkg, callingUid, callingUserId)) { in checkUidPermission()
495 int callingUid) { in getPermissionGroupInfo() argument
496 if (mPackageManagerInt.getInstantAppPackageName(callingUid) != null) { in getPermissionGroupInfo()
505 private List<PermissionGroupInfo> getAllPermissionGroups(int flags, int callingUid) { in getAllPermissionGroups() argument
506 if (mPackageManagerInt.getInstantAppPackageName(callingUid) != null) { in getAllPermissionGroups()
[all …]
/frameworks/base/services/core/java/com/android/server/uri/
DUriGrantsManagerInternal.java35 void grantUriPermission(int callingUid, String targetPkg, GrantUri grantUri, in grantUriPermission() argument
37 void revokeUriPermission(String targetPackage, int callingUid, in revokeUriPermission() argument
40 int checkGrantUriPermission(int callingUid, String targetPkg, GrantUri grantUri, in checkGrantUriPermission() argument
43 int callingUid, String targetPkg, Uri uri, int modeFlags, int userId); in checkGrantUriPermission() argument
44 NeededUriGrants checkGrantUriPermissionFromIntent(int callingUid, in checkGrantUriPermissionFromIntent() argument
50 void grantUriPermissionFromIntent(int callingUid, in grantUriPermissionFromIntent() argument
52 void grantUriPermissionFromIntent(int callingUid, in grantUriPermissionFromIntent() argument
77 int callingUid, ProviderInfo cpi, int userId, boolean checkUser); in checkAuthorityGrants() argument
DUriGrantsManagerService.java219 final int callingUid = Binder.getCallingUid(); in getUriPermissions() local
220 final int callingUserId = UserHandle.getUserId(callingUid); in getUriPermissions()
225 if (packageUid != callingUid) { in getUriPermissions()
227 "Package " + packageName + " does not belong to calling UID " + callingUid); in getUriPermissions()
237 callingUid); in getUriPermissions()
470 boolean checkAuthorityGrants(int callingUid, ProviderInfo cpi, int userId, boolean checkUser) { in checkAuthorityGrants() argument
471 final ArrayMap<GrantUri, UriPermission> perms = mGrantedUriPermissions.get(callingUid); in checkAuthorityGrants()
535 NeededUriGrants checkGrantUriPermissionFromIntent(int callingUid, in checkGrantUriPermissionFromIntent() argument
558 contentUserHint = UserHandle.getUserId(callingUid); in checkGrantUriPermissionFromIntent()
578 targetUid = checkGrantUriPermission(callingUid, targetPkg, grantUri, mode, targetUid); in checkGrantUriPermissionFromIntent()
[all …]
/frameworks/base/services/usage/java/com/android/server/usage/
DUsageStatsService.java349 private boolean shouldObfuscateInstantAppsForCaller(int callingUid, int userId) { in shouldObfuscateInstantAppsForCaller() argument
350 return !mPackageManagerInternal.canAccessInstantApps(callingUid, userId); in shouldObfuscateInstantAppsForCaller()
921 final int callingUid = Binder.getCallingUid(); in hasPermission() local
922 if (callingUid == Process.SYSTEM_UID) { in hasPermission()
926 callingUid, callingPackage); in hasPermission()
937 final int callingUid = Binder.getCallingUid(); in hasObserverPermission() local
939 if (callingUid == Process.SYSTEM_UID in hasObserverPermission()
941 && dpmInternal.isActiveAdminWithPolicy(callingUid, in hasObserverPermission()
951 final int callingUid = Binder.getCallingUid(); in hasPermissions() local
952 if (callingUid == Process.SYSTEM_UID) { in hasPermissions()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DDevicePolicyManagerTest.java184 mServiceContext.binder.callingUid = DpmMockContext.CALLER_UID; in setUp()
208 mAdmin1Context.binder.callingUid = DpmMockContext.CALLER_UID; in setUp()
272 mServiceContext.binder.callingUid = in setAsProfileOwner()
483 mMockContext.binder.callingUid = ANOTHER_ADMIN_UID; in testSetActiveAdmin_multiUsers()
487 mMockContext.binder.callingUid = DpmMockContext.CALLER_UID; in testSetActiveAdmin_multiUsers()
491 mMockContext.binder.callingUid = ANOTHER_ADMIN_UID; in testSetActiveAdmin_multiUsers()
562 mContext.binder.callingUid = 1234567; in testRemoveActiveAdmin_SecurityException()
574 mContext.binder.callingUid = DpmMockContext.CALLER_UID; in testRemoveActiveAdmin_userNotRunningOrLocked()
623 mContext.binder.callingUid = 1234567; in testRemoveActiveAdmin_fromDifferentUserWithINTERACT_ACROSS_USERS_FULL()
751 mContext.binder.callingUid = 123456; in testForceRemoveActiveAdmin()
[all …]
/frameworks/base/services/core/java/com/android/server/net/
DNetworkStatsObservers.java79 IBinder binder, int callingUid, @NetworkStatsAccess.Level int accessLevel) { in register() argument
81 RequestInfo requestInfo = buildRequestInfo(request, messenger, binder, callingUid, in register()
94 public void unregister(DataUsageRequest request, int callingUid) { in unregister() argument
95 getHandler().sendMessage(mHandler.obtainMessage(MSG_UNREGISTER, callingUid, 0 /* ignore */, in unregister()
169 private void handleUnregister(DataUsageRequest request, int callingUid) { in handleUnregister() argument
176 if (Process.SYSTEM_UID != callingUid && requestInfo.mCallingUid != callingUid) { in handleUnregister()
177 Slog.w(TAG, "Caller uid " + callingUid + " is not owner of " + request); in handleUnregister()
210 Messenger messenger, IBinder binder, int callingUid, in buildRequestInfo() argument
213 return new UserUsageRequestInfo(this, request, messenger, binder, callingUid, in buildRequestInfo()
218 return new NetworkUsageRequestInfo(this, request, messenger, binder, callingUid, in buildRequestInfo()
[all …]
DNetworkStatsAccess.java106 Context context, int callingUid, String callingPackage) { in checkAccessLevel() argument
114 boolean isDeviceOwner = dpmi != null && dpmi.isActiveAdminWithPolicy(callingUid, in checkAccessLevel()
117 || UserHandle.getAppId(callingUid) == android.os.Process.SYSTEM_UID) { in checkAccessLevel()
123 boolean hasAppOpsPermission = hasAppOpsPermission(context, callingUid, callingPackage); in checkAccessLevel()
129 boolean isProfileOwner = dpmi != null && dpmi.isActiveAdminWithPolicy(callingUid, in checkAccessLevel()
172 Context context, int callingUid, String callingPackage) { in hasAppOpsPermission() argument
178 callingUid, callingPackage); in hasAppOpsPermission()
/frameworks/base/services/core/java/com/android/server/tv/
DTvInputManagerService.java525 private SessionState getSessionStateLocked(IBinder sessionToken, int callingUid, int userId) { in getSessionStateLocked() argument
532 if (callingUid != Process.SYSTEM_UID && callingUid != sessionState.callingUid) { in getSessionStateLocked()
534 + " from uid " + callingUid); in getSessionStateLocked()
539 private ITvInputSession getSessionLocked(IBinder sessionToken, int callingUid, int userId) { in getSessionLocked() argument
540 return getSessionLocked(getSessionStateLocked(sessionToken, callingUid, userId)); in getSessionLocked()
552 private int resolveCallingUserId(int callingPid, int callingUid, int requestedUserId, in resolveCallingUserId() argument
554 return ActivityManager.handleIncomingUser(callingPid, callingUid, requestedUserId, false, in resolveCallingUserId()
670 private void releaseSessionLocked(IBinder sessionToken, int callingUid, int userId) { in releaseSessionLocked() argument
673 sessionState = getSessionStateLocked(sessionToken, callingUid, userId); in releaseSessionLocked()
677 setMainLocked(sessionToken, false, callingUid, userId); in releaseSessionLocked()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/
DScanRequestProxy.java359 int callingUid, String packageName) { in getOrCreateScanRequestTimestampsForForegroundApp() argument
360 Pair<Integer, String> uidAndPackageNamePair = Pair.create(callingUid, packageName); in getOrCreateScanRequestTimestampsForForegroundApp()
377 int callingUid, String packageName) { in shouldScanRequestBeThrottledForForegroundApp() argument
379 getOrCreateScanRequestTimestampsForForegroundApp(callingUid, packageName); in shouldScanRequestBeThrottledForForegroundApp()
409 private boolean isRequestFromBackground(int callingUid, String packageName) { in isRequestFromBackground() argument
410 mAppOps.checkPackage(callingUid, packageName); in isRequestFromBackground()
424 private boolean shouldScanRequestBeThrottledForApp(int callingUid, String packageName) { in shouldScanRequestBeThrottledForApp() argument
426 if (isRequestFromBackground(callingUid, packageName)) { in shouldScanRequestBeThrottledForApp()
430 Log.v(TAG, "Background scan app request [" + callingUid + ", " in shouldScanRequestBeThrottledForApp()
436 isThrottled = shouldScanRequestBeThrottledForForegroundApp(callingUid, packageName); in shouldScanRequestBeThrottledForApp()
[all …]
/frameworks/base/services/core/java/com/android/server/accounts/
DAccountManagerService.java460 int callingUid = Binder.getCallingUid(); in addAccountExplicitlyWithVisibility() local
463 Log.v(TAG, "addAccountExplicitly: " + account + ", caller's uid " + callingUid in addAccountExplicitlyWithVisibility()
467 if (!isAccountManagedByCaller(account.type, callingUid, userId)) { in addAccountExplicitlyWithVisibility()
469 callingUid, account.type); in addAccountExplicitlyWithVisibility()
482 return addAccountInternal(accounts, account, password, extras, callingUid, in addAccountExplicitlyWithVisibility()
492 int callingUid = Binder.getCallingUid(); in getAccountsAndVisibilityForPackage() local
494 boolean isSystemUid = UserHandle.isSameApp(callingUid, Process.SYSTEM_UID); in getAccountsAndVisibilityForPackage()
495 List<String> managedTypes = getTypesForCaller(callingUid, userId, isSystemUid); in getAccountsAndVisibilityForPackage()
501 + callingUid + " with packageName=" + packageName); in getAccountsAndVisibilityForPackage()
511 return getAccountsAndVisibilityForPackage(packageName, managedTypes, callingUid, in getAccountsAndVisibilityForPackage()
[all …]
/frameworks/base/telephony/java/android/telephony/
DLocationAccessPolicy.java62 public final int callingUid; field in LocationAccessPolicy.LocationPermissionQuery
69 private LocationPermissionQuery(String callingPackage, int callingUid, int callingPid, in LocationPermissionQuery() argument
73 this.callingUid = callingUid; in LocationPermissionQuery()
101 public Builder setCallingUid(int callingUid) { in setCallingUid() argument
102 mCallingUid = callingUid; in setCallingUid()
192 query.callingUid, permissionToCheck); in checkAppLocationPermissionHelper()
198 query.callingUid, query.callingPackage); in checkAppLocationPermissionHelper()
242 if (query.callingUid == Process.PHONE_UID || query.callingUid == Process.SYSTEM_UID in checkLocationPermission()
243 || query.callingUid == Process.ROOT_UID) { in checkLocationPermission()
249 if (!checkSystemLocationAccess(context, query.callingUid, query.callingPid)) { in checkLocationPermission()
/frameworks/base/services/restrictions/java/com/android/server/restrictions/
DRestrictionsManagerService.java97 int callingUid = Binder.getCallingUid(); in requestPermission() local
98 int userHandle = UserHandle.getUserId(callingUid); in requestPermission()
110 enforceCallerMatchesPackage(callingUid, packageName, "Package name does not" + in requestPermission()
163 int callingUid = Binder.getCallingUid(); in notifyPermissionResponse() local
164 int userHandle = UserHandle.getUserId(callingUid); in notifyPermissionResponse()
172 enforceCallerMatchesPackage(callingUid, permProvider.getPackageName(), in notifyPermissionResponse()
187 private void enforceCallerMatchesPackage(int callingUid, String packageName, in enforceCallerMatchesPackage() argument
190 String[] pkgs = AppGlobals.getPackageManager().getPackagesForUid(callingUid); in enforceCallerMatchesPackage()
193 throw new SecurityException(message + callingUid); in enforceCallerMatchesPackage()
/frameworks/base/core/java/com/android/internal/os/
DBinderCallsStats.java170 final int callingUid = mTrackDirectCallingUid in processCallEnded() local
188 callingUid, s.binderClass, s.transactionCode, in processCallEnded()
214 callingUid, s.binderClass, s.transactionCode, in processCallEnded()
293 exported.callingUid = stat.callingUid; in getExportedCallStats()
358 callStat.callingUid = uid; in createDebugEntry()
418 .append(packageMap.mapUid(e.callingUid)) in dumpLocked()
575 public int callingUid; field in BinderCallsStats.ExportedCallStat
598 public final int callingUid; field in BinderCallsStats.CallStat
624 CallStat(int callingUid, Class<? extends Binder> binderClass, int transactionCode, in CallStat() argument
626 this.callingUid = callingUid; in CallStat()
[all …]
/frameworks/base/services/core/java/com/android/server/wm/
DSafeActivityOptions.java190 ActivityOptions options, int callingPid, int callingUid) { in checkPermissions() argument
194 && !supervisor.mRecentTasks.isCallerRecents(callingUid)) { in checkPermissions()
196 START_TASKS_FROM_RECENTS, callingPid, callingUid); in checkPermissions()
200 + ", uid=" + callingUid + ") with launchTaskId=" in checkPermissions()
210 && !supervisor.isCallerAllowedToLaunchOnDisplay(callingPid, callingUid, in checkPermissions()
214 + ", uid=" + callingUid + ") with launchDisplayId=" in checkPermissions()
223 UserHandle.getUserId(callingUid), aInfo.packageName)) { in checkPermissions()
226 + ", uid=" + callingUid + ") with lockTaskMode=true"; in checkPermissions()
234 CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS, callingPid, callingUid) in checkPermissions()
238 + ", uid=" + callingUid + ") with remoteAnimationAdapter"; in checkPermissions()
DKeyguardDisableHandler.java72 void disableKeyguard(IBinder token, String tag, int callingUid, int userId) { in disableKeyguard() argument
73 UserTokenWatcher watcherForCaller = watcherForCallingUid(token, callingUid); in disableKeyguard()
77 void reenableKeyguard(IBinder token, int callingUid, int userId) { in reenableKeyguard() argument
78 UserTokenWatcher watcherForCaller = watcherForCallingUid(token, callingUid); in reenableKeyguard()
82 private UserTokenWatcher watcherForCallingUid(IBinder token, int callingUid) { in watcherForCallingUid() argument
83 if (Process.isApplicationUid(callingUid)) { in watcherForCallingUid()
85 } else if (callingUid == Process.SYSTEM_UID && token instanceof LockTaskToken) { in watcherForCallingUid()
DAppTaskImpl.java44 public AppTaskImpl(ActivityTaskManagerService service, int taskId, int callingUid) { in AppTaskImpl() argument
47 mCallingUid = callingUid; in AppTaskImpl()
99 final int callingUid = Binder.getCallingUid(); in moveToFront() local
100 if (!mService.isSameApp(callingUid, callingPackage)) { in moveToFront()
109 if (!mService.checkAppSwitchAllowedLocked(callingPid, callingUid, -1, -1, in moveToFront()
119 if (starter.shouldAbortBackgroundActivityStart(callingUid, callingPid, in moveToFront()
126 callingUid, mTaskId, null); in moveToFront()
/frameworks/base/services/core/java/com/android/server/notification/
DNotificationDelegate.java26 void onClearAll(int callingUid, int callingPid, int userId); in onClearAll() argument
27 void onNotificationClick(int callingUid, int callingPid, String key, in onNotificationClick() argument
29 void onNotificationActionClick(int callingUid, int callingPid, String key, int actionIndex, in onNotificationActionClick() argument
31 void onNotificationClear(int callingUid, int callingPid, in onNotificationClear() argument
36 void onNotificationError(int callingUid, int callingPid, in onNotificationError() argument
/frameworks/base/core/java/android/net/
DTrafficStats.java765 final int callingUid = android.os.Process.myUid(); in getUidTxBytes() local
766 if (callingUid == android.os.Process.SYSTEM_UID || callingUid == uid) { in getUidTxBytes()
798 final int callingUid = android.os.Process.myUid(); in getUidRxBytes() local
799 if (callingUid == android.os.Process.SYSTEM_UID || callingUid == uid) { in getUidRxBytes()
831 final int callingUid = android.os.Process.myUid(); in getUidTxPackets() local
832 if (callingUid == android.os.Process.SYSTEM_UID || callingUid == uid) { in getUidTxPackets()
864 final int callingUid = android.os.Process.myUid(); in getUidRxPackets() local
865 if (callingUid == android.os.Process.SYSTEM_UID || callingUid == uid) { in getUidRxPackets()
/frameworks/base/services/core/java/com/android/server/content/
DContentService.java400 final int callingUid = Binder.getCallingUid(); in notifyChange() local
404 userHandle = handleIncomingUser(uri, callingPid, callingUid, in notifyChange()
417 Log.w(TAG, "Ignoring notify for " + uri + " from " + callingUid + ": " + msg); in notifyChange()
461 callingUid, in notifyChange()
462 uri.getAuthority(), getSyncExemptionForCaller(callingUid), in notifyChange()
463 callingUid, callingPid, callingPackage); in notifyChange()
519 final int callingUid = Binder.getCallingUid(); in requestSync() local
522 validateExtras(callingUid, extras); in requestSync()
523 final int syncExemption = getSyncExemptionAndCleanUpExtrasForCaller(callingUid, extras); in requestSync()
531 syncManager.scheduleSync(account, userId, callingUid, authority, extras, in requestSync()
[all …]
/frameworks/base/services/robotests/src/com/android/server/testing/shadows/
DShadowKeyValueBackupJob.java30 private static int callingUid; field in ShadowKeyValueBackupJob
33 return callingUid; in getCallingUid()
39 callingUid = Binder.getCallingUid(); in schedule()
/frameworks/base/cmds/incidentd/src/
DIncidentService.cpp65 uid_t callingUid = IPCThreadState::self()->getCallingUid(); in checkIncidentPermissions() local
67 if (callingUid == AID_ROOT || callingUid == AID_SHELL) { in checkIncidentPermissions()
82 callingPid, callingUid); in checkIncidentPermissions()
89 callingPid, callingUid); in checkIncidentPermissions()
98 if (callingUid != AID_SHELL && callingUid != AID_ROOT) { in checkIncidentPermissions()
100 callingPid, callingUid); in checkIncidentPermissions()
107 if (callingUid != AID_SHELL && callingUid != AID_ROOT && callingUid != AID_STATSD && in checkIncidentPermissions()
108 callingUid != AID_SYSTEM) { in checkIncidentPermissions()
110 callingPid, callingUid); in checkIncidentPermissions()
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/
DVoiceInteractionManagerServiceImpl.java219 public int startVoiceActivityLocked(int callingPid, int callingUid, IBinder token, in startVoiceActivityLocked() argument
233 return mAtm.startVoiceActivity(mComponent.getPackageName(), callingPid, callingUid, in startVoiceActivityLocked()
241 public int startAssistantActivityLocked(int callingPid, int callingUid, IBinder token, in startAssistantActivityLocked() argument
256 return mAtm.startAssistantActivity(mComponent.getPackageName(), callingPid, callingUid, in startAssistantActivityLocked()
346 public void setDisabledShowContextLocked(int callingUid, int flags) { in setDisabledShowContextLocked() argument
348 if (callingUid != activeUid) { in setDisabledShowContextLocked()
349 throw new SecurityException("Calling uid " + callingUid in setDisabledShowContextLocked()
355 public int getDisabledShowContextLocked(int callingUid) { in getDisabledShowContextLocked() argument
357 if (callingUid != activeUid) { in getDisabledShowContextLocked()
358 throw new SecurityException("Calling uid " + callingUid in getDisabledShowContextLocked()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/
DPackageInstallerService.java473 final int callingUid = Binder.getCallingUid(); in createSessionInternal() local
475 callingUid, userId, true, true, "createSession"); in createSessionInternal()
481 if ((callingUid == Process.SHELL_UID) || (callingUid == Process.ROOT_UID)) { in createSessionInternal()
489 mAppOps.checkPackage(callingUid, installerPackageName); in createSessionInternal()
497 && !mPm.isCallerVerifier(callingUid)) { in createSessionInternal()
502 if (Build.IS_DEBUGGABLE || isDowngradeAllowedForCaller(callingUid)) { in createSessionInternal()
509 if (callingUid != Process.SYSTEM_UID) { in createSessionInternal()
588 final int activeCount = getSessionCount(mSessions, callingUid); in createSessionInternal()
591 "Too many active sessions for UID " + callingUid); in createSessionInternal()
593 final int historicalCount = mHistoricalSessionsByInstaller.get(callingUid); in createSessionInternal()
[all …]

12345678