/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | PhoneSubInfoControllerTest.java | 18 import android.app.AppOpsManager; 42 private AppOpsManager mAppOsMgr; 61 mAppOsMgr = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in setUp() 108 doReturn(AppOpsManager.MODE_ERRORED).when(mAppOsMgr).noteOp( in testGetDeviceIdWithOutPermission() 109 eq(AppOpsManager.OP_READ_PHONE_STATE), anyInt(), eq(TAG)); in testGetDeviceIdWithOutPermission() 116 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOsMgr).noteOp( in testGetDeviceIdWithOutPermission() 117 eq(AppOpsManager.OP_READ_PHONE_STATE), anyInt(), eq(TAG)); in testGetDeviceIdWithOutPermission() 158 doReturn(AppOpsManager.MODE_ERRORED).when(mAppOsMgr).noteOp( in testGetNaiWithOutPermission() 159 eq(AppOpsManager.OP_READ_PHONE_STATE), anyInt(), eq(TAG)); in testGetNaiWithOutPermission() 166 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOsMgr).noteOp( in testGetNaiWithOutPermission() [all …]
|
/frameworks/base/core/java/android/app/ |
D | AppOpsManager.java | 50 public class AppOpsManager { class 888 AppOpsManager.MODE_ALLOWED, 889 AppOpsManager.MODE_ALLOWED, 890 AppOpsManager.MODE_ALLOWED, 891 AppOpsManager.MODE_ALLOWED, 892 AppOpsManager.MODE_ALLOWED, 893 AppOpsManager.MODE_ALLOWED, 894 AppOpsManager.MODE_ALLOWED, 895 AppOpsManager.MODE_ALLOWED, 896 AppOpsManager.MODE_ALLOWED, [all …]
|
D | AppOpsManager.aidl | 19 parcelable AppOpsManager.PackageOps; 20 parcelable AppOpsManager.OpEntry;
|
/frameworks/native/libs/binder/ |
D | AppOpsManager.cpp | 32 const int APP_OPS_MANAGER_UNAVAILABLE_MODE = AppOpsManager::MODE_ALLOWED; 34 const int APP_OPS_MANAGER_UNAVAILABLE_MODE = AppOpsManager::MODE_IGNORED; 52 AppOpsManager::AppOpsManager() in AppOpsManager() function in android::AppOpsManager 58 sp<IAppOpsService> AppOpsManager::getService() { return NULL; } in getService() 60 sp<IAppOpsService> AppOpsManager::getService() in getService() 88 int32_t AppOpsManager::checkOp(int32_t op, int32_t uid, const String16& callingPackage) in checkOp() 96 int32_t AppOpsManager::noteOp(int32_t op, int32_t uid, const String16& callingPackage) { in noteOp() 103 int32_t AppOpsManager::startOp(int32_t op, int32_t uid, const String16& callingPackage) { in startOp() 110 void AppOpsManager::finishOp(int32_t op, int32_t uid, const String16& callingPackage) { in finishOp() 117 void AppOpsManager::startWatchingMode(int32_t op, const String16& packageName, in startWatchingMode() [all …]
|
/frameworks/base/services/core/java/com/android/server/ |
D | MmsServiceBroker.java | 21 import android.app.AppOpsManager; 74 private volatile AppOpsManager mAppOpsManager = null; 297 private AppOpsManager getAppOpsManager() { in getAppOpsManager() 299 mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in getAppOpsManager() 337 if (getAppOpsManager().noteOp(AppOpsManager.OP_SEND_SMS, Binder.getCallingUid(), in sendMessage() 338 callingPkg) != AppOpsManager.MODE_ALLOWED) { in sendMessage() 355 if (getAppOpsManager().noteOp(AppOpsManager.OP_RECEIVE_MMS, Binder.getCallingUid(), in downloadMessage() 356 callingPkg) != AppOpsManager.MODE_ALLOWED) { in downloadMessage() 376 if (getAppOpsManager().noteOp(AppOpsManager.OP_WRITE_SMS, Binder.getCallingUid(), in importTextMessage() 377 callingPkg) != AppOpsManager.MODE_ALLOWED) { in importTextMessage() [all …]
|
D | AppOpsService.java | 39 import android.app.AppOpsManager; 167 mode = AppOpsManager.opToDefaultMode(op); in Op() 302 int appOpMode = checkOperation(AppOpsManager.OP_REQUEST_INSTALL_PACKAGES, in systemReady() 305 case AppOpsManager.MODE_ALLOWED: in systemReady() 307 case AppOpsManager.MODE_ERRORED: in systemReady() 324 if (noteOperation(AppOpsManager.OP_READ_EXTERNAL_STORAGE, uid, in systemReady() 325 packageName) != AppOpsManager.MODE_ALLOWED) { in systemReady() 328 if (noteOperation(AppOpsManager.OP_WRITE_EXTERNAL_STORAGE, uid, in systemReady() 329 packageName) != AppOpsManager.MODE_ALLOWED) { in systemReady() 393 private ArrayList<AppOpsManager.OpEntry> collectOps(Ops pkgOps, int[] ops) { in collectOps() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/location/ |
D | RecentLocationApps.java | 20 import android.app.AppOpsManager; 46 AppOpsManager.OP_MONITOR_LOCATION, 47 AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION, 65 AppOpsManager aoManager = in getAppList() 66 (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in getAppList() 67 List<AppOpsManager.PackageOps> appOps = aoManager.getPackagesForOps(LOCATION_OPS); in getAppList() 78 AppOpsManager.PackageOps ops = appOps.get(i); in getAppList() 106 AppOpsManager.PackageOps ops) { in getRequestFromOps() 108 List<AppOpsManager.OpEntry> entries = ops.getOps(); in getRequestFromOps() 113 for (AppOpsManager.OpEntry entry : entries) { in getRequestFromOps() [all …]
|
/frameworks/support/compat/java/android/support/v4/app/ |
D | AppOpsManagerCompat.java | 21 import android.app.AppOpsManager; 62 return AppOpsManager.permissionToOp(permission); in permissionToOp() 86 AppOpsManager appOpsManager = context.getSystemService(AppOpsManager.class); in noteOp() 112 AppOpsManager appOpsManager = context.getSystemService(AppOpsManager.class); in noteProxyOp()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/net/ |
D | NetworkStatsAccessTest.java | 23 import android.app.AppOpsManager; 44 @Mock private AppOpsManager mAppOps; 73 setHasAppOpsPermission(AppOpsManager.MODE_DEFAULT, false); in testCheckAccessLevel_hasCarrierPrivileges() 83 setHasAppOpsPermission(AppOpsManager.MODE_DEFAULT, false); in testCheckAccessLevel_isDeviceOwner() 93 setHasAppOpsPermission(AppOpsManager.MODE_DEFAULT, false); in testCheckAccessLevel_isProfileOwner() 103 setHasAppOpsPermission(AppOpsManager.MODE_ALLOWED, false); in testCheckAccessLevel_hasAppOpsBitAllowed() 113 setHasAppOpsPermission(AppOpsManager.MODE_DEFAULT, true); in testCheckAccessLevel_hasAppOpsBitDefault_grantedPermission() 123 setHasAppOpsPermission(AppOpsManager.MODE_DEFAULT, false); in testCheckAccessLevel_hasReadHistoryPermission() 133 setHasAppOpsPermission(AppOpsManager.MODE_ERRORED, true); in testCheckAccessLevel_deniedAppOpsBit() 143 setHasAppOpsPermission(AppOpsManager.MODE_DEFAULT, false); in testCheckAccessLevel_deniedAppOpsBit_deniedPermission() [all …]
|
/frameworks/base/services/autofill/java/com/android/server/autofill/ui/ |
D | OverlayControl.java | 20 import android.app.AppOpsManager; 34 private final @NonNull AppOpsManager mAppOpsManager; 37 mAppOpsManager = context.getSystemService(AppOpsManager.class); in OverlayControl() 51 AppOpsManager.OP_SYSTEM_ALERT_WINDOW, !allowed, mToken); in setOverlayAllowed() 53 AppOpsManager.OP_TOAST_WINDOW, !allowed, mToken); in setOverlayAllowed()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | LocationControllerImpl.java | 20 import android.app.AppOpsManager; 48 = new int[] {AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION}; 52 private AppOpsManager mAppOpsManager; 70 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in LocationControllerImpl() 148 List<AppOpsManager.PackageOps> packages in areActiveHighPowerLocationRequests() 154 AppOpsManager.PackageOps packageOp = packages.get(packageInd); in areActiveHighPowerLocationRequests() 155 List<AppOpsManager.OpEntry> opEntries = packageOp.getOps(); in areActiveHighPowerLocationRequests() 159 AppOpsManager.OpEntry opEntry = opEntries.get(opInd); in areActiveHighPowerLocationRequests() 162 if (opEntry.getOp() == AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION) { in areActiveHighPowerLocationRequests()
|
/frameworks/base/core/java/com/android/internal/util/ |
D | DumpUtils.java | 19 import android.app.AppOpsManager; 120 final AppOpsManager appOps = context.getSystemService(AppOpsManager.class); in checkUsageStatsPermission() 124 switch (appOps.checkOpNoThrow(AppOpsManager.OP_GET_USAGE_STATS, uid, pkg)) { in checkUsageStatsPermission() 125 case AppOpsManager.MODE_ALLOWED: in checkUsageStatsPermission() 129 case AppOpsManager.MODE_DEFAULT: in checkUsageStatsPermission()
|
/frameworks/base/services/core/java/com/android/server/net/ |
D | NetworkStatsAccess.java | 26 import android.app.AppOpsManager; 174 AppOpsManager appOps = (AppOpsManager) context.getSystemService( in hasAppOpsPermission() 177 final int mode = appOps.checkOp(AppOpsManager.OP_GET_USAGE_STATS, in hasAppOpsPermission() 179 if (mode == AppOpsManager.MODE_DEFAULT) { in hasAppOpsPermission() 186 return (mode == AppOpsManager.MODE_ALLOWED); in hasAppOpsPermission()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/ |
D | WifiPermissionsUtilTest.java | 29 import android.app.AppOpsManager; 70 @Mock private AppOpsManager mMockAppOps; 178 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testCanReadPeersMacAddressCurrentUserAndAllPermissions() 206 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testCanReadPeersMacAddressCurrentProfileAndAllPermissions() 258 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testCanAccessScanResults_UserOrProfileNotCurrent() 286 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testCannotAccessScanResults_NoInteractAcrossUsersFullPermission() 311 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testCanAccessScanResults_CallerIsActiveNwScorer() 339 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testLegacyForegroundAppAndAllPermissions() 370 mAllowCoarseLocationApps = AppOpsManager.MODE_ALLOWED; in testLegacyAppHasLocationAndAllPermissions() 371 mWifiScanAllowApps = AppOpsManager.MODE_ALLOWED; in testLegacyAppHasLocationAndAllPermissions() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/ |
D | PipNotificationController.java | 19 import static android.app.AppOpsManager.MODE_ALLOWED; 20 import static android.app.AppOpsManager.OP_PICTURE_IN_PICTURE; 26 import android.app.AppOpsManager; 27 import android.app.AppOpsManager.OnOpChangedListener; 58 private AppOpsManager mAppOpsManager; 66 private AppOpsManager.OnOpChangedListener mAppOpsChangedListener = new OnOpChangedListener() { 88 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in PipNotificationController()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/ |
D | WifiPermissionsUtil.java | 20 import android.app.AppOpsManager; 44 private final AppOpsManager mAppOps; 56 mAppOps = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in WifiPermissionsUtil() 162 return checkAppOpAllowed(AppOpsManager.OP_WIFI_SCAN, pkgName, uid); in isScanAllowedbyApps() 212 return mAppOps.noteOp(op, uid, pkgName) == AppOpsManager.MODE_ALLOWED; in checkAppOpAllowed() 232 && checkAppOpAllowed(AppOpsManager.OP_COARSE_LOCATION, pkgName, uid)) { in checkCallersLocationPermission()
|
/frameworks/base/core/java/com/android/internal/app/ |
D | IAppOpsService.aidl | 19 import android.app.AppOpsManager; 39 List<AppOpsManager.PackageOps> getPackagesForOps(in int[] ops); in getPackagesForOps() 40 List<AppOpsManager.PackageOps> getOpsForPackage(int uid, String packageName, in int[] ops); in getOpsForPackage() 41 List<AppOpsManager.PackageOps> getUidOps(int uid, in int[] ops); in getUidOps()
|
/frameworks/base/core/java/android/content/ |
D | ContentProvider.java | 20 import static android.app.AppOpsManager.MODE_ALLOWED; 21 import static android.app.AppOpsManager.MODE_ERRORED; 22 import static android.app.AppOpsManager.MODE_IGNORED; 27 import android.app.AppOpsManager; 197 AppOpsManager mAppOpsManager = null; 198 int mReadOp = AppOpsManager.OP_NONE; 199 int mWriteOp = AppOpsManager.OP_NONE; 215 if (enforceReadPermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in query() 262 if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in insert() 277 if (enforceWritePermission(callingPkg, uri, null) != AppOpsManager.MODE_ALLOWED) { in bulkInsert() [all …]
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | PhoneSubInfoController.java | 21 import android.app.AppOpsManager; 49 private final AppOpsManager mAppOps; 57 mAppOps = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in PhoneSubInfoController() 433 return mAppOps.noteOp(AppOpsManager.OP_READ_PHONE_STATE, Binder.getCallingUid(), in checkReadPhoneState() 434 callingPackage) == AppOpsManager.MODE_ALLOWED; in checkReadPhoneState() 443 if (mAppOps.noteOp(AppOpsManager.OP_WRITE_SMS, in checkReadPhoneNumber() 444 Binder.getCallingUid(), callingPackage) == AppOpsManager.MODE_ALLOWED) { in checkReadPhoneNumber() 455 if (opCode != AppOpsManager.OP_NONE) { in checkReadPhoneNumber() 457 == AppOpsManager.MODE_ALLOWED; in checkReadPhoneNumber() 467 if (opCode != AppOpsManager.OP_NONE) { in checkReadPhoneNumber() [all …]
|
D | IccSmsInterfaceManager.java | 24 import android.app.AppOpsManager; 84 final protected AppOpsManager mAppOps; 132 mAppOps = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in IccSmsInterfaceManager() 201 if (mAppOps.noteOp(AppOpsManager.OP_WRITE_ICC_SMS, Binder.getCallingUid(), in updateMessageOnIccEf() 202 callingPackage) != AppOpsManager.MODE_ALLOWED) { in updateMessageOnIccEf() 255 if (mAppOps.noteOp(AppOpsManager.OP_WRITE_ICC_SMS, Binder.getCallingUid(), in copyMessageToIccEf() 256 callingPackage) != AppOpsManager.MODE_ALLOWED) { in copyMessageToIccEf() 293 if (mAppOps.noteOp(AppOpsManager.OP_READ_ICC_SMS, Binder.getCallingUid(), in getAllMessagesFromIccEf() 294 callingPackage) != AppOpsManager.MODE_ALLOWED) { in getAllMessagesFromIccEf() 377 if (mAppOps.noteOp(AppOpsManager.OP_SEND_SMS, Binder.getCallingUid(), in sendDataInternal() [all …]
|
/frameworks/base/telephony/java/com/android/internal/telephony/ |
D | SmsApplication.java | 20 import android.app.AppOpsManager; 478 AppOpsManager appOps = (AppOpsManager)context.getSystemService(Context.APP_OPS_SERVICE); in getApplication() 486 int mode = appOps.checkOp(AppOpsManager.OP_WRITE_SMS, applicationData.mUid, in getApplication() 488 if (mode != AppOpsManager.MODE_ALLOWED) { in getApplication() 492 appOps.setMode(AppOpsManager.OP_WRITE_SMS, applicationData.mUid, in getApplication() 493 applicationData.mPackageName, AppOpsManager.MODE_ALLOWED); in getApplication() 577 AppOpsManager appOps = (AppOpsManager)context.getSystemService(Context.APP_OPS_SERVICE); in setDefaultApplicationInternal() 582 appOps.setMode(AppOpsManager.OP_WRITE_SMS, info.applicationInfo.uid, in setDefaultApplicationInternal() 583 oldPackageName, AppOpsManager.MODE_IGNORED); in setDefaultApplicationInternal() 599 appOps.setMode(AppOpsManager.OP_WRITE_SMS, applicationData.mUid, in setDefaultApplicationInternal() [all …]
|
/frameworks/base/core/tests/coretests/src/android/provider/ |
D | TestDocumentsProvider.java | 20 import android.app.AppOpsManager; 97 return AppOpsManager.MODE_ALLOWED; in enforceReadPermissionInner() 102 return AppOpsManager.MODE_ALLOWED; in enforceWritePermissionInner() 119 return Mockito.mock(AppOpsManager.class); in getSystemService()
|
/frameworks/av/services/audioflinger/ |
D | ServiceUtilities.cpp | 98 AppOpsManager appOps; in recordingAllowed() 99 if (appOps.noteOp(AppOpsManager::OP_RECORD_AUDIO, uid, checkedOpPackageName) in recordingAllowed() 100 != AppOpsManager::MODE_ALLOWED) { in recordingAllowed()
|
/frameworks/base/services/core/java/com/android/server/clipboard/ |
D | ClipboardService.java | 21 import android.app.AppOpsManager; 150 private final AppOpsManager mAppOps; 166 mAppOps = (AppOpsManager) getContext().getSystemService(Context.APP_OPS_SERVICE); in ClipboardService() 257 if (!clipboardAccessAllowed(AppOpsManager.OP_WRITE_CLIPBOARD, callingPackage, in setPrimaryClip() 306 if (!clipboardAccessAllowed(AppOpsManager.OP_READ_CLIPBOARD, pkg, in getPrimaryClip() 318 if (!clipboardAccessAllowed(AppOpsManager.OP_READ_CLIPBOARD, callingPackage, in getPrimaryClipDescription() 330 if (!clipboardAccessAllowed(AppOpsManager.OP_READ_CLIPBOARD, callingPackage, in hasPrimaryClip() 357 if (!clipboardAccessAllowed(AppOpsManager.OP_READ_CLIPBOARD, callingPackage, in hasClipboardText() 420 if (clipboardAccessAllowed(AppOpsManager.OP_READ_CLIPBOARD, li.mPackageName, in setPrimaryClipInternal() 557 if (mAppOps.checkOp(op, callingUid, callingPackage) != AppOpsManager.MODE_ALLOWED) { in clipboardAccessAllowed()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/aware/ |
D | WifiAwareClientState.java | 20 import android.app.AppOpsManager; 64 private AppOpsManager mAppOps; 81 mAppOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in WifiAwareClientState() 256 AppOpsManager.OP_COARSE_LOCATION, mUid, mCallingPackage) in hasLocationingPermission() 257 == AppOpsManager.MODE_ALLOWED; in hasLocationingPermission()
|