Home
last modified time | relevance | path

Searched refs:getCallingUid (Results 1 – 25 of 384) sorted by relevance

12345678910>>...16

/frameworks/base/core/tests/coretests/src/android/content/
DPermissionCheckerTest.java55 Binder.getCallingUid(), mContext.getPackageName(), AppOpsManager.MODE_DEFAULT); in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionGranted_returnsGranted()
59 Binder.getCallingUid(), mContext.getPackageName())) in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionGranted_returnsGranted()
67 Binder.getCallingUid(), mContext.getPackageName(), AppOpsManager.MODE_DEFAULT); in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionNotGranted_returnsHardDenied()
71 Binder.getCallingUid(), mContext.getPackageName())) in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionNotGranted_returnsHardDenied()
79 Binder.getCallingUid(), mContext.getPackageName(), AppOpsManager.MODE_ALLOWED); in testCheckPermissionForPreflight_appOpPermission_modeAllowed_returnsGranted()
83 Binder.getCallingUid(), mContext.getPackageName())) in testCheckPermissionForPreflight_appOpPermission_modeAllowed_returnsGranted()
91 Binder.getCallingUid(), mContext.getPackageName(), AppOpsManager.MODE_ALLOWED); in testCheckPermissionForPreflight_appOpPermission_packageNameIsNull_returnsGranted()
95 Binder.getCallingUid(), /* packageName= */ null)) in testCheckPermissionForPreflight_appOpPermission_packageNameIsNull_returnsGranted()
103 Binder.getCallingUid(), mContext.getPackageName(), AppOpsManager.MODE_IGNORED); in testCheckPermissionForPreflight_appOpPermission_modeIgnored_returnsHardDenied()
107 Binder.getCallingUid(), mContext.getPackageName())) in testCheckPermissionForPreflight_appOpPermission_modeIgnored_returnsHardDenied()
[all …]
/frameworks/native/libs/gui/
DBufferQueueThreadState.cpp27 uid_t BufferQueueThreadState::getCallingUid() { in getCallingUid() function in android::BufferQueueThreadState
30 return hardware::IPCThreadState::self()->getCallingUid(); in getCallingUid()
32 return IPCThreadState::self()->getCallingUid(); in getCallingUid()
34 return hardware::IPCThreadState::self()->getCallingUid(); in getCallingUid()
/frameworks/base/core/java/android/hardware/location/
DGeofenceHardwareService.java101 checkPermission(Binder.getCallingPid(), Binder.getCallingUid(), monitoringType);
110 checkPermission(Binder.getCallingPid(), Binder.getCallingUid(), monitoringType);
119 checkPermission(Binder.getCallingPid(), Binder.getCallingUid(), monitoringType);
128 checkPermission(Binder.getCallingPid(), Binder.getCallingUid(), monitoringType);
138 checkPermission(Binder.getCallingPid(), Binder.getCallingUid(), monitoringType);
149 checkPermission(Binder.getCallingPid(), Binder.getCallingUid(), monitoringType);
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DRecoverableKeyStoreManagerTest.java211 int uid = Binder.getCallingUid(); in importKey_storesTheKey()
244 int uid = Binder.getCallingUid(); in importKeyWithMetadata_nullMetadata_storesTheKey()
257 int uid = Binder.getCallingUid(); in importKeyWithMetadata_nonNullMetadata_storesTheKey()
293 int uid = Binder.getCallingUid(); in generateKeyWithMetadata_nullMetadata_storesTheKey()
304 int uid = Binder.getCallingUid(); in generateKeyWithMetadata_nonNullMetadata_storesTheKey()
315 int uid = Binder.getCallingUid(); in removeKey_removesAKey()
325 int uid = Binder.getCallingUid(); in removeKey_updatesShouldCreateSnapshot()
338 int uid = Binder.getCallingUid(); in removeKey_failureDoesNotUpdateShouldCreateSnapshot()
349 int uid = Binder.getCallingUid(); in initRecoveryService_succeedsWithCertFile()
370 int uid = Binder.getCallingUid(); in initRecoveryService_updatesShouldCreatesnapshotOnCertUpdate()
[all …]
/frameworks/av/services/camera/libcameraservice/utils/
DCameraThreadState.cpp25 int CameraThreadState::getCallingUid() { in getCallingUid() function in android::CameraThreadState
27 return hardware::IPCThreadState::self()->getCallingUid(); in getCallingUid()
29 return IPCThreadState::self()->getCallingUid(); in getCallingUid()
/frameworks/base/services/companion/java/com/android/server/companion/
DPermissionsUtils.java29 import static android.os.Binder.getCallingUid;
119 if (getCallingUid() == SYSTEM_UID) return; in enforceCallerIsSystemOrCanInteractWithUserId()
125 final int callingUid = getCallingUid(); in checkCallerIsSystemOr()
136 final int callingUid = getCallingUid(); in enforceCallerIsSystemOr()
152 if (getCallingUid() == SYSTEM_UID) return true; in checkCallerCanManageCompanionDevice()
159 if (getCallingUid() == SYSTEM_UID) return; in enforceCallerCanManageCompanionDevice()
169 throw new SecurityException("Caller (uid=" + getCallingUid() + ") does not have " in enforceCallerCanManageAssociationsForPackage()
/frameworks/base/services/core/java/com/android/server/
DMmsServiceBroker.java322 final String[] packages = getPackageManager().getPackagesForUid(Binder.getCallingUid()); in getCallingPackageName()
340 if (getAppOpsManager().noteOp(AppOpsManager.OP_SEND_SMS, Binder.getCallingUid(), in sendMessage()
360 if (getAppOpsManager().noteOp(AppOpsManager.OP_RECEIVE_MMS, Binder.getCallingUid(), in downloadMessage()
377 if (getAppOpsManager().noteOp(AppOpsManager.OP_WRITE_SMS, Binder.getCallingUid(), in importTextMessage()
391 if (getAppOpsManager().noteOp(AppOpsManager.OP_WRITE_SMS, Binder.getCallingUid(), in importMultimediaMessage()
404 if (getAppOpsManager().noteOp(AppOpsManager.OP_WRITE_SMS, Binder.getCallingUid(), in deleteStoredMessage()
414 if (getAppOpsManager().noteOp(AppOpsManager.OP_WRITE_SMS, Binder.getCallingUid(), in deleteStoredConversation()
424 if (getAppOpsManager().noteOp(AppOpsManager.OP_WRITE_SMS, Binder.getCallingUid(), in updateStoredMessageStatus()
435 if (getAppOpsManager().noteOp(AppOpsManager.OP_WRITE_SMS, Binder.getCallingUid(), in archiveStoredConversation()
446 if (getAppOpsManager().noteOp(AppOpsManager.OP_WRITE_SMS, Binder.getCallingUid(), in addTextMessageDraft()
[all …]
DVpnManagerService.java114 public int getCallingUid() { in getCallingUid() method in VpnManagerService.Dependencies
115 return Binder.getCallingUid(); in getCallingUid()
253 int user = UserHandle.getUserId(mDeps.getCallingUid()); in establishVpn()
262 int user = UserHandle.getUserId(mDeps.getCallingUid()); in addVpnAddress()
271 int user = UserHandle.getUserId(mDeps.getCallingUid()); in removeVpnAddress()
280 int user = UserHandle.getUserId(mDeps.getCallingUid()); in setUnderlyingNetworksForVpn()
302 final int user = UserHandle.getUserId(mDeps.getCallingUid()); in provisionVpnProfile()
320 final int user = UserHandle.getUserId(mDeps.getCallingUid()); in deleteVpnProfile()
358 final int callingUid = Binder.getCallingUid(); in startVpnProfile()
377 final int callingUid = Binder.getCallingUid(); in stopVpnProfile()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/
DBinderCallsStatsServiceTest.java40 protected int getCallingUid() { in weTrustOurselves()
52 protected int getCallingUid() { in workSourceSetIfCallerHasPermission()
65 protected int getCallingUid() { in workSourceResolvedToCallingUid()
/frameworks/base/services/core/java/com/android/server/wm/
DAppTaskImpl.java53 if (mCallingUid != Binder.getCallingUid() && Process.SYSTEM_UID != Binder.getCallingUid() in checkCallerOrSystemOrRoot()
54 && Process.ROOT_UID != Binder.getCallingUid()) { in checkCallerOrSystemOrRoot()
56 + " does not match caller of getAppTasks(): " + Binder.getCallingUid()); in checkCallerOrSystemOrRoot()
113 final int callingUid = Binder.getCallingUid(); in moveToFront()
/frameworks/base/services/core/java/com/android/server/location/
DLocationPermissions.java89 enforceLocationPermission(Binder.getCallingUid(), in enforceCallingOrSelfLocationPermission()
90 getPermissionLevel(context, Binder.getCallingUid(), Binder.getCallingPid()), in enforceCallingOrSelfLocationPermission()
128 enforceBypassPermission(context, Binder.getCallingUid(), Binder.getCallingPid()); in enforceCallingOrSelfBypassPermission()
177 return getPermissionLevel(context, Binder.getCallingUid(), Binder.getCallingPid()); in getCallingOrSelfPermissionLevel()
/frameworks/base/services/core/java/com/android/server/pm/
DPreferredActivityHelper.java85 UserHandle.getAppId(Binder.getCallingUid()) >= Process.FIRST_APPLICATION_UID); in findPreferredActivityNotLocked()
157 final String[] callingPackages = snapshot.getPackagesForUid(Binder.getCallingUid()); in updateDefaultHomeNotLocked()
183 int callingUid = Binder.getCallingUid();
241 final int callingUid = Binder.getCallingUid();
252 + Binder.getCallingUid());
308 final int callingUid = Binder.getCallingUid();
348 if (snapshot.getInstantAppPackageName(Binder.getCallingUid()) != null) {
387 int callingUid = Binder.getCallingUid();
419 int callingUid = Binder.getCallingUid();
477 if (Binder.getCallingUid() != Process.SYSTEM_UID) {
[all …]
DIPackageManagerBase.java214 return snapshot().canRequestPackageInstalls(packageName, Binder.getCallingUid(), userId, in canRequestPackageInstalls()
387 return snapshot().getComponentEnabledSetting(component, Binder.getCallingUid(), userId); in getComponentEnabledSetting()
442 if (snapshot.getInstantAppPackageName(Binder.getCallingUid()) != null) { in getHomeActivities()
481 final int callingUid = Binder.getCallingUid(); in getInstalledApplications()
510 if (snapshot.getInstantAppPackageName(Binder.getCallingUid()) != null) { in getInstantAppInstallerComponent()
521 if (snapshot.getInstantAppPackageName(Binder.getCallingUid()) != null) { in getInstantAppResolverComponent()
602 versionedPackage.getLongVersionCode(), flags, Binder.getCallingUid(), userId); in getPackageInfoVersioned()
614 if (snapshot.getInstantAppPackageName(Binder.getCallingUid()) != null) { in getPackageInstaller()
653 final int callingUid = Binder.getCallingUid(); in getPackagesForUid()
681 if (snapshot.getInstantAppPackageName(Binder.getCallingUid()) != null) { in getPersistentApplications()
[all …]
/frameworks/base/services/core/java/com/android/server/pm/permission/
DLegacyPermissionManagerService.java196 int callingUid = mInjector.getCallingUid(); in verifyCallerCanCheckAccess()
265 final int callingUid = Binder.getCallingUid(); in grantDefaultPermissionsToActiveLuiApp()
274 final int callingUid = Binder.getCallingUid(); in revokeDefaultPermissionsFromLuiApps()
283 final int callingUid = Binder.getCallingUid(); in grantDefaultPermissionsToEnabledImsServices()
293 final int callingUid = Binder.getCallingUid(); in grantDefaultPermissionsToEnabledTelephonyDataServices()
303 final int callingUid = Binder.getCallingUid(); in revokeDefaultPermissionsFromDisabledTelephonyDataServices()
313 final int callingUid = Binder.getCallingUid(); in grantDefaultPermissionsToEnabledCarrierApps()
327 final int callingUid = Binder.getCallingUid(); in resetRuntimePermissions()
445 public int getCallingUid() { in getCallingUid() method in LegacyPermissionManagerService.Injector
446 return Binder.getCallingUid(); in getCallingUid()
/frameworks/av/services/medialog/
DMediaLogService.cpp57 if (!isAudioServerOrMediaServerUid(IPCThreadState::self()->getCallingUid()) || shared == 0 || in registerWriter()
71 if (!isAudioServerOrMediaServerUid(IPCThreadState::self()->getCallingUid()) || shared == 0) { in unregisterWriter()
100 if (!(isAudioServerOrMediaServerUid(IPCThreadState::self()->getCallingUid()) in dump()
104 IPCThreadState::self()->getCallingUid()); in dump()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
DRecoverableKeyStoreManager.java190 int uid = Binder.getCallingUid(); in initRecoveryService()
341 int uid = Binder.getCallingUid(); in getKeyChainSnapshot()
352 int uid = Binder.getCallingUid(); in setSnapshotCreatedPendingIntent()
363 int uid = Binder.getCallingUid(); in setServerParams()
397 long updatedRows = mDatabase.setRecoveryStatus(Binder.getCallingUid(), alias, status); in setRecoveryStatus()
415 return mDatabase.getStatusForAllKeys(Binder.getCallingUid()); in getRecoveryStatus()
429 int uid = Binder.getCallingUid(); in setRecoverySecretTypes()
466 Binder.getCallingUid()); in getRecoverySecretTypes()
492 int uid = Binder.getCallingUid(); in startRecoverySession()
608 int uid = Binder.getCallingUid(); in recoverKeyChainSnapshot()
[all …]
/frameworks/base/services/wallpapereffectsgeneration/java/com/android/server/wallpapereffectsgeneration/
DWallpaperEffectsGenerationManagerService.java156 final int userId = am.handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), in runForUser()
161 + ", uid=" + Binder.getCallingUid()); in runForUser()
171 || mActivityTaskManagerInternal.isCallerRecents(Binder.getCallingUid()))) { in runForUser()
173 + Binder.getCallingPid() + ", uid=" + Binder.getCallingUid(); in runForUser()
178 final int origCallingUid = Binder.getCallingUid(); in runForUser()
/frameworks/base/core/tests/coretests/src/android/os/
DBinderWorkSourceService.java29 return Binder.getCallingUid();
45 Binder.setWorkSourceProvider((x) -> Binder.getCallingUid());
/frameworks/base/services/core/java/com/android/server/webkit/
DWebViewUpdateService.java169 if (Binder.getCallingUid() != Process.SHARED_RELRO_UID && in notifyRelroCreationCompleted()
170 Binder.getCallingUid() != Process.SYSTEM_UID) { in notifyRelroCreationCompleted()
200 webViewProviderResponse.packageInfo.packageName, Binder.getCallingUid()); in waitForAndGetProvider()
229 + ", uid=" + Binder.getCallingUid() in changeProviderAndSetting()
265 grantVisibilityToCaller(currentWebViewPackage.packageName, Binder.getCallingUid()); in getCurrentWebViewPackage()
282 + ", uid=" + Binder.getCallingUid() in enableMultiProcess()
/frameworks/base/services/robotests/src/com/android/server/testing/shadows/
DShadowKeyValueBackupJob.java32 public static int getCallingUid() { in getCallingUid() method in ShadowKeyValueBackupJob
39 callingUid = Binder.getCallingUid(); in schedule()
DShadowBinder.java39 originalCallingUid = getCallingUid(); in clearCallingIdentity()
62 return UserHandle.of(UserHandle.getUserId(getCallingUid())); in getCallingUserHandle()
/frameworks/base/services/core/java/com/android/server/os/
DSchedulingPolicyService.java97 if (Binder.getCallingUid() == Process.AUDIOSERVER_UID && !isForApp in requestPriority()
101 if (Binder.getCallingUid() != Process.BLUETOOTH_UID) { in requestPriority()
126 Binder.getCallingUid() != Process.MEDIA_UID) { in requestCpusetBoost()
218 switch (Binder.getCallingUid()) { in isPermitted()
/frameworks/base/services/tests/servicestests/src/com/android/server/statusbar/
DStatusBarManagerServiceTest.java171 .thenReturn(Binder.getCallingUid() + 1); in testRequestActive_changeEnabled_differentPackage_fail()
211 .thenReturn(Binder.getCallingUid() + 1); in testRequestActive_changeDisabled_differentPackage_pass()
244 eq(Binder.getCallingUid()), in testHandleIncomingUserCalled()
257 .thenReturn(Binder.getCallingUid()); in testCheckUid_pass()
273 int otherUserUid = UserHandle.getUid(17, UserHandle.getAppId(Binder.getCallingUid())); in testCheckUid_pass_differentUser()
292 .thenReturn(Binder.getCallingUid() + 1); in testCheckUid_fail()
363 Binder.getCallingUid(), user)).thenReturn( in testValidComponent_fail_notEnabled()
385 Binder.getCallingUid(), user)).thenReturn( in testValidComponent_fail_noPermission()
409 Binder.getCallingUid(), user)).thenReturn( in testValidComponent_fail_notExported()
433 Binder.getCallingUid(), user)).thenReturn( in testValidComponent_pass()
[all …]
/frameworks/base/services/core/java/com/android/server/tv/interactive/
DTvInteractiveAppManagerService.java647 Binder.getCallingUid(), userId, "getTvInteractiveAppServiceList"); in getTvInteractiveAppServiceList()
670 Binder.getCallingUid(), userId, "registerAppLinkInfo: " + appLinkInfo); in registerAppLinkInfo()
706 Binder.getCallingUid(), userId, "unregisterAppLinkInfo: " + appLinkInfo); in unregisterAppLinkInfo()
742 Binder.getCallingUid(), userId, "sendAppLinkCommand"); in sendAppLinkCommand()
779 final int callingUid = Binder.getCallingUid(); in createSession()
846 final int callingUid = Binder.getCallingUid(); in releaseSession()
865 final int callingUid = Binder.getCallingUid(); in notifyTuned()
892 final int callingUid = Binder.getCallingUid(); in notifyTrackSelected()
919 final int callingUid = Binder.getCallingUid(); in notifyTracksChanged()
941 final int callingUid = Binder.getCallingUid(); in notifyVideoAvailable()
[all …]
/frameworks/base/services/searchui/java/com/android/server/searchui/
DSearchUiManagerService.java146 final int userId = am.handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), in runForUserLocked()
151 + ", uid=" + Binder.getCallingUid()); in runForUserLocked()
154 || mActivityTaskManagerInternal.isCallerRecents(Binder.getCallingUid()))) { in runForUserLocked()
157 + ", uid=" + Binder.getCallingUid(); in runForUserLocked()

12345678910>>...16