Home
last modified time | relevance | path

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

123

/frameworks/base/services/core/java/com/android/server/net/
DNetworkStatsObservers.java83 IBinder binder, int callingUid, @NetworkStatsAccess.Level int accessLevel) { in register() argument
85 RequestInfo requestInfo = buildRequestInfo(request, messenger, binder, callingUid, in register()
98 public void unregister(DataUsageRequest request, int callingUid) { in unregister() argument
99 getHandler().sendMessage(mHandler.obtainMessage(MSG_UNREGISTER, callingUid, 0 /* ignore */, in unregister()
173 private void handleUnregister(DataUsageRequest request, int callingUid) { in handleUnregister() argument
180 if (Process.SYSTEM_UID != callingUid && requestInfo.mCallingUid != callingUid) { in handleUnregister()
181 Slog.w(TAG, "Caller uid " + callingUid + " is not owner of " + request); in handleUnregister()
214 Messenger messenger, IBinder binder, int callingUid, in buildRequestInfo() argument
217 return new UserUsageRequestInfo(this, request, messenger, binder, callingUid, in buildRequestInfo()
222 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/core/java/android/net/
DTrafficStats.java528 final int callingUid = android.os.Process.myUid(); in getUidTxBytes() local
529 if (callingUid == android.os.Process.SYSTEM_UID || callingUid == uid) { in getUidTxBytes()
557 final int callingUid = android.os.Process.myUid(); in getUidRxBytes() local
558 if (callingUid == android.os.Process.SYSTEM_UID || callingUid == uid) { in getUidRxBytes()
586 final int callingUid = android.os.Process.myUid(); in getUidTxPackets() local
587 if (callingUid == android.os.Process.SYSTEM_UID || callingUid == uid) { in getUidTxPackets()
615 final int callingUid = android.os.Process.myUid(); in getUidRxPackets() local
616 if (callingUid == android.os.Process.SYSTEM_UID || callingUid == uid) { in getUidRxPackets()
/frameworks/base/services/core/java/com/android/server/tv/
DTvInputManagerService.java559 private SessionState getSessionStateLocked(IBinder sessionToken, int callingUid, int userId) { in getSessionStateLocked() argument
566 if (callingUid != Process.SYSTEM_UID && callingUid != sessionState.callingUid) { in getSessionStateLocked()
568 + " from uid " + callingUid); in getSessionStateLocked()
573 private ITvInputSession getSessionLocked(IBinder sessionToken, int callingUid, int userId) { in getSessionLocked() argument
574 return getSessionLocked(getSessionStateLocked(sessionToken, callingUid, userId)); in getSessionLocked()
586 private int resolveCallingUserId(int callingPid, int callingUid, int requestedUserId, in resolveCallingUserId() argument
588 return ActivityManager.handleIncomingUser(callingPid, callingUid, requestedUserId, false, in resolveCallingUserId()
702 private void releaseSessionLocked(IBinder sessionToken, int callingUid, int userId) { in releaseSessionLocked() argument
705 sessionState = getSessionStateLocked(sessionToken, callingUid, userId); in releaseSessionLocked()
709 setMainLocked(sessionToken, false, callingUid, userId); in releaseSessionLocked()
[all …]
/frameworks/base/services/core/java/com/android/server/notification/
DNotificationDelegate.java23 void onClearAll(int callingUid, int callingPid, int userId); in onClearAll() argument
24 void onNotificationClick(int callingUid, int callingPid, String key); in onNotificationClick() argument
25 void onNotificationActionClick(int callingUid, int callingPid, String key, int actionIndex); in onNotificationActionClick() argument
26 void onNotificationClear(int callingUid, int callingPid, in onNotificationClear() argument
28 void onNotificationError(int callingUid, int callingPid, in onNotificationError() argument
DNotificationManagerService.java515 public void onClearAll(int callingUid, int callingPid, int userId) {
517 cancelAllLocked(callingUid, callingPid, userId, REASON_DELEGATE_CANCEL_ALL, null,
523 public void onNotificationClick(int callingUid, int callingPid, String key) {
535 cancelNotification(callingUid, callingPid, sbn.getPackageName(), sbn.getTag(),
543 public void onNotificationActionClick(int callingUid, int callingPid, String key,
559 public void onNotificationClear(int callingUid, int callingPid,
561 cancelNotification(callingUid, callingPid, pkg, tag, id, 0,
590 … public void onNotificationError(int callingUid, int callingPid, String pkg, String tag, int id,
594 cancelNotification(callingUid, callingPid, pkg, tag, id, 0, 0, false, userId,
1607 final int callingUid = Binder.getCallingUid();
[all …]
/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/services/core/java/com/android/server/accounts/
DAccountManagerService.java778 int callingUid = Binder.getCallingUid(); in getPassword() local
786 if (!isAccountManagedByCaller(account.type, callingUid, userId)) { in getPassword()
789 callingUid, in getPassword()
872 final int callingUid = Binder.getCallingUid(); in getUserData() local
875 account, key, callingUid, Binder.getCallingPid()); in getUserData()
881 if (!isAccountManagedByCaller(account.type, callingUid, userId)) { in getUserData()
884 callingUid, in getUserData()
889 Log.w(TAG, "User " + userId + " data is locked. callingUid " + callingUid); in getUserData()
908 int callingUid = Binder.getCallingUid(); in getAuthenticatorTypes() local
912 + " caller's uid " + callingUid in getAuthenticatorTypes()
[all …]
/frameworks/base/services/core/java/com/android/server/job/controllers/
DJobStatus.java78 final int callingUid; field in JobStatus
126 return callingUid; in getServiceToken()
129 private JobStatus(JobInfo job, int callingUid, String sourcePackageName, in JobStatus() argument
133 this.callingUid = callingUid; in JobStatus()
145 this.sourceUid = callingUid; in JobStatus()
146 this.sourceUserId = UserHandle.getUserId(callingUid); in JobStatus()
208 public JobStatus(JobInfo job, int callingUid, String sourcePackageName, int sourceUserId, in JobStatus() argument
210 this(job, callingUid, sourcePackageName, sourceUserId, sourceTag, 0, in JobStatus()
230 public static JobStatus createFromJobInfo(JobInfo job, int callingUid, String sourcePackageName, in createFromJobInfo() argument
243 return new JobStatus(job, callingUid, sourcePackageName, sourceUserId, tag, 0, in createFromJobInfo()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DDevicePolicyManagerTest.java323 mMockContext.binder.callingUid = ANOTHER_ADMIN_UID; in testSetActiveAdmin_multiUsers()
327 mMockContext.binder.callingUid = DpmMockContext.CALLER_UID; in testSetActiveAdmin_multiUsers()
331 mMockContext.binder.callingUid = ANOTHER_ADMIN_UID; in testSetActiveAdmin_multiUsers()
411 mContext.binder.callingUid = 1234567; in testRemoveActiveAdmin_SecurityException()
426 mContext.binder.callingUid = DpmMockContext.CALLER_UID; in testRemoveActiveAdmin_userNotRunningOrLocked()
475 mContext.binder.callingUid = 1234567; in testRemoveActiveAdmin_fromDifferentUserWithINTERACT_ACROSS_USERS_FULL()
562 mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID; in setDeviceOwner()
584 mContext.binder.callingUid = DpmMockContext.CALLER_UID; in setDeviceOwner()
588 mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID; in setDeviceOwner()
606 final int origCallingUser = mContext.binder.callingUid; in checkGetDeviceOwnerInfoApi()
[all …]
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/
DVoiceInteractionManagerServiceImpl.java184 public int startVoiceActivityLocked(int callingPid, int callingUid, IBinder token, in startVoiceActivityLocked() argument
198 return mAm.startVoiceActivity(mComponent.getPackageName(), callingPid, callingUid, in startVoiceActivityLocked()
239 public void setDisabledShowContextLocked(int callingUid, int flags) { in setDisabledShowContextLocked() argument
241 if (callingUid != activeUid) { in setDisabledShowContextLocked()
242 throw new SecurityException("Calling uid " + callingUid in setDisabledShowContextLocked()
248 public int getDisabledShowContextLocked(int callingUid) { in getDisabledShowContextLocked() argument
250 if (callingUid != activeUid) { in getDisabledShowContextLocked()
251 throw new SecurityException("Calling uid " + callingUid in getDisabledShowContextLocked()
257 public int getUserDisabledShowContextLocked(int callingUid) { in getUserDisabledShowContextLocked() argument
259 if (callingUid != activeUid) { in getUserDisabledShowContextLocked()
[all …]
DVoiceInteractionManagerService.java617 final int callingUid = Binder.getCallingUid(); in startVoiceActivity() local
620 return mImpl.startVoiceActivityLocked(callingPid, callingUid, token, in startVoiceActivity()
683 final int callingUid = Binder.getCallingUid(); in setDisabledShowContext() local
686 mImpl.setDisabledShowContextLocked(callingUid, flags); in setDisabledShowContext()
700 final int callingUid = Binder.getCallingUid(); in getDisabledShowContext() local
703 return mImpl.getDisabledShowContextLocked(callingUid); in getDisabledShowContext()
718 final int callingUid = Binder.getCallingUid(); in getUserDisabledShowContext() local
721 return mImpl.getUserDisabledShowContextLocked(callingUid); in getUserDisabledShowContext()
738 final int callingUid = UserHandle.getCallingUserId(); in getKeyphraseSoundModel() local
741 return mDbHelper.getKeyphraseSoundModel(keyphraseId, callingUid, bcp47Locale); in getKeyphraseSoundModel()
[all …]
/frameworks/base/location/lib/java/com/android/location/provider/
DActivityRecognitionProviderClient.java42 int callingUid = Binder.getCallingUid();
43 if (callingUid != Process.SYSTEM_UID) {
44 Log.d(TAG, "Ignoring calls from non-system server. Uid: " + callingUid);
DActivityRecognitionProviderWatcher.java58 int callingUid = Binder.getCallingUid();
59 if (callingUid != Process.SYSTEM_UID) {
60 Log.d(TAG, "Ignoring calls from non-system server. Uid: " + callingUid);
/frameworks/ml/bordeaux/service/src/android/bordeaux/services/
DBordeauxSessionManager.java103 public SessionKey getSessionKey(String callingUid, Class learnerClass, String name) { in getSessionKey() argument
105 key.value = callingUid + "#" + "_" + name + "_" + learnerClass.getName(); in getSessionKey()
189 public void removeAllSessionsFromCaller(String callingUid) { in removeAllSessionsFromCaller() argument
193 if (session.getKey().startsWith(callingUid + "#")) { in removeAllSessionsFromCaller()
202 int nDeleted = mSessionStorage.removeSessions(callingUid + "#%"); in removeAllSessionsFromCaller()
/frameworks/support/compat/java/android/support/v4/app/
DNotificationCompatSideChannelService.java109 private void checkPermission(int callingUid, String packageName) { in checkPermission() argument
110 for (String validPackage : getPackageManager().getPackagesForUid(callingUid)) { in checkPermission()
115 throw new SecurityException("NotificationSideChannelService: Uid " + callingUid in checkPermission()
/frameworks/base/core/java/android/speech/
DRecognitionService.java98 int callingUid) { in dispatchStartListening() argument
112 mCurrentCallback = new Callback(listener, callingUid); in dispatchStartListening()
162 public StartListeningArgs(Intent intent, IRecognitionListener listener, int callingUid) { in StartListeningArgs() argument
165 this.mCallingUid = callingUid; in StartListeningArgs()
236 private Callback(IRecognitionListener listener, int callingUid) { in Callback() argument
238 mCallingUid = callingUid; in Callback()
/frameworks/av/services/audiopolicy/service/
DAudioPolicyInterfaceImpl.cpp167 const uid_t callingUid = IPCThreadState::self()->getCallingUid(); in getOutputForAttr() local
168 if (!isTrustedCallingUid(callingUid) || uid == (uid_t)-1) { in getOutputForAttr()
169 ALOGW_IF(uid != (uid_t)-1 && uid != callingUid, in getOutputForAttr()
170 "%s uid %d tried to pass itself off as %d", __FUNCTION__, callingUid, uid); in getOutputForAttr()
171 uid = callingUid; in getOutputForAttr()
288 const uid_t callingUid = IPCThreadState::self()->getCallingUid(); in getInputForAttr() local
289 if (!isTrustedCallingUid(callingUid)) { in getInputForAttr()
290 ALOGW_IF(uid != (uid_t)-1 && uid != callingUid, in getInputForAttr()
291 "%s uid %d tried to pass itself off as %d", __FUNCTION__, callingUid, uid); in getInputForAttr()
292 uid = callingUid; in getInputForAttr()
[all …]
/frameworks/base/services/core/java/com/android/server/am/
DBroadcastQueue.java504 r.callingPid, r.callingUid, -1, true); in deliverToRegisteredReceiverLocked()
509 + r.callingPid + ", uid=" + r.callingUid + ")" in deliverToRegisteredReceiverLocked()
516 && mService.mAppOpsService.noteOperation(opCode, r.callingUid, in deliverToRegisteredReceiverLocked()
521 + r.callingPid + ", uid=" + r.callingUid + ")" in deliverToRegisteredReceiverLocked()
542 + " (uid " + r.callingUid + ")"); in deliverToRegisteredReceiverLocked()
559 + " (uid " + r.callingUid + ")"); in deliverToRegisteredReceiverLocked()
575 + " (uid " + r.callingUid + ")"); in deliverToRegisteredReceiverLocked()
590 + " (uid " + r.callingUid + ")"); in deliverToRegisteredReceiverLocked()
606 if (!mService.mIntentFirewall.checkBroadcast(r.intent, r.callingUid, in deliverToRegisteredReceiverLocked()
701 receiverRecord.callingUid, receiverRecord.userId, null, null, 0, in requestStartTargetPermissionsReviewIfNeededLocked()
[all …]
DActivityStarter.java229 IBinder resultTo, String resultWho, int requestCode, int callingPid, int callingUid, in startActivityLocked() argument
241 callingUid = callerApp.info.uid; in startActivityLocked()
254 + "} from uid " + callingUid in startActivityLocked()
293 if (sourceRecord.launchedFromUid == callingUid) { in startActivityLocked()
373 … requestCode, callingPid, callingUid, callingPackage, ignoreTargetSecurity, callerApp, in startActivityLocked()
375 abort |= !mService.mIntentFirewall.checkStartActivity(intent, callingUid, in startActivityLocked()
391 mInterceptor.intercept(intent, rInfo, aInfo, resolvedType, inTask, callingPid, callingUid, in startActivityLocked()
399 callingUid = mInterceptor.mCallingUid; in startActivityLocked()
420 callingUid, userId, null, null, 0, new Intent[]{intent}, in startActivityLocked()
436 callingUid = realCallingUid; in startActivityLocked()
[all …]
/frameworks/base/services/core/java/com/android/server/os/
DSchedulingPolicyService.java67 final int callingUid = Binder.getCallingUid(); in isPermittedCallingUid() local
68 switch (callingUid) { in isPermittedCallingUid()
/frameworks/base/services/core/java/com/android/server/statusbar/
DStatusBarManagerService.java757 final int callingUid = Binder.getCallingUid(); in onNotificationClick() local
761 mNotificationDelegate.onNotificationClick(callingUid, callingPid, key); in onNotificationClick()
770 final int callingUid = Binder.getCallingUid(); in onNotificationActionClick() local
774 mNotificationDelegate.onNotificationActionClick(callingUid, callingPid, key, in onNotificationActionClick()
785 final int callingUid = Binder.getCallingUid(); in onNotificationError() local
790 mNotificationDelegate.onNotificationError(callingUid, callingPid, in onNotificationError()
800 final int callingUid = Binder.getCallingUid(); in onNotificationClear() local
804 mNotificationDelegate.onNotificationClear(callingUid, callingPid, pkg, tag, id, userId); in onNotificationClear()
840 final int callingUid = Binder.getCallingUid(); in onClearAllNotifications() local
844 mNotificationDelegate.onClearAll(callingUid, callingPid, userId); in onClearAllNotifications()
/frameworks/base/services/core/java/com/android/server/pm/
DPackageInstallerService.java579 final int callingUid = Binder.getCallingUid(); in createSessionInternal() local
580 mPm.enforceCrossUserPermission(callingUid, userId, true, true, "createSession"); in createSessionInternal()
586 if ((callingUid == Process.SHELL_UID) || (callingUid == Process.ROOT_UID)) { in createSessionInternal()
590 mAppOps.checkPackage(callingUid, installerPackageName); in createSessionInternal()
663 final int activeCount = getSessionCount(mSessions, callingUid); in createSessionInternal()
666 "Too many active sessions for UID " + callingUid); in createSessionInternal()
668 final int historicalCount = getSessionCount(mHistoricalSessions, callingUid); in createSessionInternal()
671 "Too many historical sessions for UID " + callingUid); in createSessionInternal()
690 mInstallThread.getLooper(), sessionId, userId, installerPackageName, callingUid, in createSessionInternal()
871 final int callingUid = Binder.getCallingUid(); in uninstall() local
[all …]
/frameworks/support/samples/Support4Demos/src/com/example/android/supportv4/media/
DPackageValidator.java94 public boolean isCallerAllowed(Context context, String callingPackage, int callingUid) { in isCallerAllowed() argument
96 if (Process.SYSTEM_UID == callingUid || Process.myUid() == callingUid) { in isCallerAllowed()
/frameworks/base/services/core/java/com/android/server/display/
DDisplayManagerService.java385 private DisplayInfo getDisplayInfoInternal(int displayId, int callingUid) { in getDisplayInfoInternal() argument
390 if (info.hasAccess(callingUid)) { in getDisplayInfoInternal()
398 private int[] getDisplayIdsInternal(int callingUid) { in getDisplayIdsInternal() argument
406 if (info.hasAccess(callingUid)) { in getDisplayIdsInternal()
561 IMediaProjection projection, int callingUid, String packageName, in createVirtualDisplayInternal() argument
571 callback, projection, callingUid, packageName, in createVirtualDisplayInternal()
1206 final int callingUid = Binder.getCallingUid(); in getDisplayInfo() local
1209 return getDisplayInfoInternal(displayId, callingUid); in getDisplayInfo()
1220 final int callingUid = Binder.getCallingUid(); in getDisplayIds() local
1223 return getDisplayIdsInternal(callingUid); in getDisplayIds()
[all …]

123