/frameworks/base/services/tests/mockingservicestests/src/com/android/server/appop/ |
D | AppOpsServiceTest.java | 20 import static android.app.AppOpsManager.MODE_ALLOWED; 173 mAppOpsService.setMode(OP_READ_SMS, mMyUid, sMyPackageName, MODE_ALLOWED); in testNoteOperationAndGetOpsForPackage() 179 assertContainsOp(loggedOps, OP_READ_SMS, mTestStartMillis, -1, MODE_ALLOWED); in testNoteOperationAndGetOpsForPackage() 184 assertContainsOp(loggedOps, OP_READ_SMS, mTestStartMillis, -1, MODE_ALLOWED); in testNoteOperationAndGetOpsForPackage() 196 mAppOpsService.setMode(OP_COARSE_LOCATION, mMyUid, sMyPackageName, MODE_ALLOWED); in testNoteOperationAndGetOpsForPackage_controlledByDifferentOp() 199 .isEqualTo(MODE_ALLOWED); in testNoteOperationAndGetOpsForPackage_controlledByDifferentOp() 202 MODE_ALLOWED /* default for WIFI_SCAN; this is not changed or used in this test */); in testNoteOperationAndGetOpsForPackage_controlledByDifferentOp() local 210 MODE_ALLOWED /* default for WIFI_SCAN; this is not changed or used in this test */); in testNoteOperationAndGetOpsForPackage_controlledByDifferentOp() local 216 mAppOpsService.setMode(OP_READ_SMS, mMyUid, sMyPackageName, MODE_ALLOWED); in testStatePersistence() 228 assertContainsOp(loggedOps, OP_READ_SMS, mTestStartMillis, -1, MODE_ALLOWED); in testStatePersistence() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/ |
D | WifiPermissionsUtilTest.java | 189 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testCanReadPeersMacAddressCurrentUserAndAllPermissions() 212 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testCanReadPeersMacAddressCurrentProfileAndAllPermissions() 256 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testenforceCanAccessScanResults_UserOrProfileNotCurrent() 278 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testCannotAccessScanResults_NoInteractAcrossUsersFullPermission() 301 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testLegacyForegroundAppWithOtherPermissionsDenied() 328 mAllowCoarseLocationApps = AppOpsManager.MODE_ALLOWED; in testLegacyAppHasLocationAndAllPermissions() 329 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testLegacyAppHasLocationAndAllPermissions() 375 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testCannotAccessScanResults_LocationModeDisabled() 409 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testEnforceCannotAccessScanResults_LocationModeDisabledHasChangeWifiState() 444 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testEnforceCannotAccessScanResults_LocationModeDisabledHasAccessWifiState() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/appops/ |
D | AppOpsControllerTest.java | 101 AppOpsManager.MODE_ALLOWED); in addCallback_includedCode() 155 TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.MODE_ALLOWED); in getActiveItems_differentDetails() 166 TEST_UID, TEST_PACKAGE_NAME, AppOpsManager.MODE_ALLOWED); in getActiveItemsForUser() 177 AppOpsManager.MODE_ALLOWED); in opNotedScheduledForRemoval() 189 AppOpsManager.MODE_ALLOWED); in noItemsAfterStopListening() 203 AppOpsManager.MODE_ALLOWED); in noDoubleUpdateOnOpNoted() 205 AppOpsManager.MODE_ALLOWED); in noDoubleUpdateOnOpNoted() 219 AppOpsManager.MODE_ALLOWED); in onDoubleOPNoted_scheduleTwiceForRemoval() 221 AppOpsManager.MODE_ALLOWED); in onDoubleOPNoted_scheduleTwiceForRemoval() 244 AppOpsManager.MODE_ALLOWED); in testActiveOpNotRemovedAfterNoted() [all …]
|
/frameworks/base/core/java/android/app/ |
D | AppOpsManager.java | 158 MODE_ALLOWED, 170 public static final int MODE_ALLOWED = 0; field in AppOpsManager 1815 AppOpsManager.MODE_ALLOWED, // COARSE_LOCATION 1816 AppOpsManager.MODE_ALLOWED, // FINE_LOCATION 1817 AppOpsManager.MODE_ALLOWED, // GPS 1818 AppOpsManager.MODE_ALLOWED, // VIBRATE 1819 AppOpsManager.MODE_ALLOWED, // READ_CONTACTS 1820 AppOpsManager.MODE_ALLOWED, // WRITE_CONTACTS 1821 AppOpsManager.MODE_ALLOWED, // READ_CALL_LOG 1822 AppOpsManager.MODE_ALLOWED, // WRITE_CALL_LOG [all …]
|
/frameworks/base/core/java/android/content/ |
D | ContentProvider.java | 20 import static android.app.AppOpsManager.MODE_ALLOWED; 231 if (enforceReadPermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in query() 298 if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in insert() 322 if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in bulkInsert() 357 != AppOpsManager.MODE_ALLOWED) { in applyBatch() 363 != AppOpsManager.MODE_ALLOWED) { in applyBatch() 394 if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in delete() 414 if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in update() 531 if (enforceReadPermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in canonicalize() 551 if (enforceReadPermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in uncanonicalize() [all …]
|
D | PermissionChecker.java | 399 != AppOpsManager.MODE_ALLOWED) { in checkPermissionCommon() 404 if (mode != AppOpsManager.MODE_ALLOWED && mode != AppOpsManager.MODE_FOREGROUND) { in checkPermissionCommon()
|
/frameworks/base/services/core/java/com/android/server/ |
D | MmsServiceBroker.java | 337 callingPkg) != AppOpsManager.MODE_ALLOWED) { in sendMessage() 357 callingPkg) != AppOpsManager.MODE_ALLOWED) { in downloadMessage() 374 callingPkg) != AppOpsManager.MODE_ALLOWED) { in importTextMessage() 388 callingPkg) != AppOpsManager.MODE_ALLOWED) { in importMultimediaMessage() 401 callingPkg) != AppOpsManager.MODE_ALLOWED) { in deleteStoredMessage() 411 callingPkg) != AppOpsManager.MODE_ALLOWED) { in deleteStoredConversation() 421 callingPkg) != AppOpsManager.MODE_ALLOWED) { in updateStoredMessageStatus() 432 callingPkg) != AppOpsManager.MODE_ALLOWED) { in archiveStoredConversation() 443 callingPkg) != AppOpsManager.MODE_ALLOWED) { in addTextMessageDraft() 455 callingPkg) != AppOpsManager.MODE_ALLOWED) { in addMultimediaMessageDraft() [all …]
|
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/ |
D | LocationPermissionCheckerTest.java | 179 mAllowCoarseLocationApps = AppOpsManager.MODE_ALLOWED; 180 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; 197 mAllowFineLocationApps = AppOpsManager.MODE_ALLOWED; 198 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; 212 mAllowFineLocationApps = AppOpsManager.MODE_ALLOWED; 213 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; 254 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED;
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | PhoneSubInfoControllerTest.java | 150 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOsMgr).noteOp( in testGetDeviceIdWithOutPermission() 230 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOsMgr).noteOp( in testGetNaiWithOutPermission() 310 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOsMgr).noteOp( in testGetImeiWithOutPermission() 373 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOsMgr).noteOp( in testGetDeviceSvnWithOutPermission() 449 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOsMgr).noteOp( in testGetSubscriberIdWithOutPermission() 530 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOsMgr).noteOp( in testGetIccSerialNumberWithOutPermission() 593 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOsMgr).noteOp( in testGetLine1NumberWithOutPermissionTargetPreR() 616 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOsMgr).noteOp( in testGetLine1NumberWithOutPermissionTargetPreR() 632 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOsMgr).noteOp( in testGetLine1NumberWithOutPermissionTargetPreR() 671 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOsMgr).noteOp( in testGetLine1NumberWithOutPermissionTargetR() [all …]
|
D | TelephonyPermissionsTest.java | 154 .thenReturn(AppOpsManager.MODE_ALLOWED); in testCheckReadPhoneState_hasPermissionAndAppOp() 196 .thenReturn(AppOpsManager.MODE_ALLOWED); in testCheckReadPhoneStateOnAnyActiveSub_hasPermissionAndAppOp() 236 .thenReturn(AppOpsManager.MODE_ALLOWED); in testCheckReadPhoneNumber_defaultSmsApp() 256 .thenReturn(AppOpsManager.MODE_ALLOWED); in testCheckReadPhoneNumber_hasReadSms() 267 .thenReturn(AppOpsManager.MODE_ALLOWED); in testCheckReadPhoneNumber_hasReadPhoneNumbers() 307 PACKAGE)).thenReturn(AppOpsManager.MODE_ALLOWED); in testCheckReadDeviceIdentifiers_hasAppOp() 390 PACKAGE)).thenReturn(AppOpsManager.MODE_ALLOWED); in testCheckReadDeviceIdentifiers_hasAppOpNullSubscription()
|
/frameworks/base/telephony/common/com/android/internal/telephony/ |
D | TelephonyPermissions.java | 161 == AppOpsManager.MODE_ALLOWED; in checkReadPhoneState() 214 AppOpsManager.MODE_ALLOWED; in checkReadPhoneStateOnAnyActiveSub() 338 callingPackage) == AppOpsManager.MODE_ALLOWED) { in checkPrivilegedReadPermissionOrCarrierPrivilegePermission() 444 AppOpsManager.MODE_ALLOWED; in checkReadCallLog() 476 AppOpsManager.MODE_ALLOWED) { in checkReadPhoneNumber() 521 == AppOpsManager.MODE_ALLOWED; in checkReadPhoneNumber() 530 == AppOpsManager.MODE_ALLOWED; in checkReadPhoneNumber()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/ |
D | PipAppOpsListener.java | 19 import static android.app.AppOpsManager.MODE_ALLOWED; 53 packageName) != MODE_ALLOWED) {
|
/frameworks/base/services/tests/servicestests/src/com/android/server/appop/ |
D | AppOpsNotedWatcherTest.java | 69 eq(AppOpsManager.MODE_ALLOWED)); in testWatchNotedOps() 73 eq(AppOpsManager.MODE_ALLOWED)); in testWatchNotedOps()
|
/frameworks/native/libs/binder/include/binder/ |
D | AppOpsManager.h | 33 MODE_ALLOWED = IAppOpsService::MODE_ALLOWED, enumerator
|
D | PermissionController.h | 41 MODE_ALLOWED = 0, enumerator
|
/frameworks/base/core/tests/coretests/src/android/provider/ |
D | TestDocumentsProvider.java | 97 return AppOpsManager.MODE_ALLOWED; in enforceReadPermissionInner() 102 return AppOpsManager.MODE_ALLOWED; in enforceWritePermissionInner()
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | AssistDataRequester.java | 20 import static android.app.AppOpsManager.MODE_ALLOWED; 219 == MODE_ALLOWED && allowFetchData) { in requestData() 263 == MODE_ALLOWED && allowFetchScreenshot) { in requestData()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | SmsPermissions.java | 117 == AppOpsManager.MODE_ALLOWED; in checkCallingCanSendSms() 131 == AppOpsManager.MODE_ALLOWED; in checkCallingOrSelfCanSendSms()
|
/frameworks/base/services/core/java/com/android/server/policy/ |
D | SoftRestrictedPermissionPolicy.java | 21 import static android.app.AppOpsManager.MODE_ALLOWED; 189 return MODE_ALLOWED; in forPermission()
|
D | PermissionPolicyService.java | 19 import static android.app.AppOpsManager.MODE_ALLOWED; 601 case MODE_ALLOWED: in addOpIfRestricted() 744 return setUidModeIfMode(opCode, uid, MODE_DEFAULT, MODE_ALLOWED, packageName); in setUidModeAllowedIfDefault() 748 setUidMode(opCode, uid, MODE_ALLOWED, packageName); in setUidModeAllowed() 753 return setUidModeIfMode(opCode, uid, MODE_ALLOWED, MODE_FOREGROUND, packageName); in setUidModeForegroundIfAllow()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/ |
D | WifiPermissionsUtil.java | 417 return mAppOps.noteOp(op, uid, pkgName) == AppOpsManager.MODE_ALLOWED; in noteAppOpAllowed() 421 return mAppOps.checkOp(op, uid, pkgName) == AppOpsManager.MODE_ALLOWED; in checkAppOpAllowed() 518 return mode == AppOpsManager.MODE_ALLOWED; in checkSystemAlertWindowPermission()
|
/frameworks/base/services/core/java/com/android/server/location/ |
D | RemoteListenerHelper.java | 181 callerIdentity.mPackageName) == AppOpsManager.MODE_ALLOWED; in hasPermission() 185 callerIdentity.mPackageName) == AppOpsManager.MODE_ALLOWED; in hasPermission()
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | AssistDataRequesterTest.java | 19 import static android.app.AppOpsManager.MODE_ALLOWED; 147 doReturn(assistStructureAllowed ? MODE_ALLOWED : MODE_ERRORED).when(mAppOpsManager) in setupMocks() 149 doReturn(assistScreenshotAllowed ? MODE_ALLOWED : MODE_ERRORED).when(mAppOpsManager) in setupMocks()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/ |
D | WifiServiceImpl.java | 19 import static android.app.AppOpsManager.MODE_ALLOWED; 616 if (enforceChangePermission(packageName) != MODE_ALLOWED) { in startScan() 836 return MODE_ALLOWED; in enforceChangePermission() 900 if (enforceChangePermission(packageName) != MODE_ALLOWED) { in setWifiEnabled() 1443 if (enforceChangePermission(packageName) != MODE_ALLOWED) { in startLocalOnlyHotspot() 1646 if (enforceChangePermission(packageName) != MODE_ALLOWED) { in setWifiApConfiguration() 1702 if (enforceChangePermission(packageName) != MODE_ALLOWED) { in disconnect() 1721 if (enforceChangePermission(packageName) != MODE_ALLOWED) { in reconnect() 1740 if (enforceChangePermission(packageName) != MODE_ALLOWED) { in reassociate() 2063 if (enforceChangePermission(packageName) != MODE_ALLOWED) { in addOrUpdateNetwork() [all …]
|
/frameworks/base/telephony/common/android/telephony/ |
D | LocationAccessPolicy.java | 189 case AppOpsManager.MODE_ALLOWED: in appOpsModeToPermissionResult() 213 if (appOpMode == AppOpsManager.MODE_ALLOWED) { in checkAppLocationPermissionHelper()
|