/frameworks/base/services/core/java/com/android/server/location/injector/ |
D | SystemAppOpsHelper.java | 36 private AppOpsManager mAppOps; field in SystemAppOpsHelper 44 if (mAppOps != null) { in onSystemReady() 48 mAppOps = Objects.requireNonNull(mContext.getSystemService(AppOpsManager.class)); in onSystemReady() 49 mAppOps.startWatchingMode( in onSystemReady() 61 Preconditions.checkState(mAppOps != null); in startOpNoThrow() 65 return mAppOps.startOpNoThrow( in startOpNoThrow() 79 Preconditions.checkState(mAppOps != null); in finishOp() 83 mAppOps.finishOp( in finishOp() 95 Preconditions.checkState(mAppOps != null); in checkOpNoThrow() 99 return mAppOps.checkOpNoThrow( in checkOpNoThrow() [all …]
|
D | LocationPermissionsHelper.java | 52 private final AppOpsHelper mAppOps; field in LocationPermissionsHelper 56 mAppOps = appOps; in LocationPermissionsHelper() 58 mAppOps.addListener(this::onAppOpsChanged); in LocationPermissionsHelper() 105 return mAppOps.checkOpNoThrow(LocationPermissions.asAppOp(permissionLevel), identity); in hasLocationPermissions()
|
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/location/injector/ |
D | SystemAppOpsHelperTest.java | 64 @Mock private AppOpsManager mAppOps; field in SystemAppOpsHelperTest 74 doReturn(mAppOps).when(mContext).getSystemService(AppOpsManager.class); in setUp() 75 doAnswer(invocation -> mListeners.add(invocation.getArgument(3))).when(mAppOps) in setUp() 110 mAppOps).checkOpNoThrow(eq(OP_FINE_LOCATION), eq(1000), eq("mypackage")); in testCheckOp() 114 mAppOps).checkOpNoThrow(eq(OP_FINE_LOCATION), eq(1000), eq("mypackage")); in testCheckOp() 120 mAppOps).checkOpNoThrow(eq(OP_COARSE_LOCATION), eq(1000), eq("mypackage")); in testCheckOp() 124 mAppOps).checkOpNoThrow(eq(OP_COARSE_LOCATION), eq(1000), eq("mypackage")); in testCheckOp() 133 mAppOps).noteOpNoThrow(eq(OP_FINE_LOCATION), eq(1000), eq("mypackage"), in testNoteOpNoThrow() 138 mAppOps).noteOpNoThrow(eq(OP_FINE_LOCATION), eq(1000), eq("mypackage"), in testNoteOpNoThrow() 146 mAppOps).noteOpNoThrow(eq(OP_COARSE_LOCATION), eq(1000), eq("mypackage"), in testNoteOpNoThrow() [all …]
|
D | FakeAppOpsHelper.java | 38 private final HashMap<String, SparseArray<AppOp>> mAppOps; field in FakeAppOpsHelper 41 mAppOps = new HashMap<>(); in FakeAppOpsHelper() 104 SparseArray<AppOp> ops = mAppOps.get(packageName); in getOp() 107 mAppOps.put(packageName, ops); in getOp()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/ |
D | ForegroundServicesUserState.java | 41 private ArrayMap<String, ArraySet<Integer>> mAppOps = new ArrayMap<>(1); field in ForegroundServicesUserState 49 if (mAppOps.get(pkg) == null) { in addOp() 50 mAppOps.put(pkg, new ArraySet<>(3)); in addOp() 52 mAppOps.get(pkg).add(op); in addOp() 57 final ArraySet<Integer> keys = mAppOps.get(pkg); in removeOp() 63 mAppOps.remove(pkg); in removeOp() 136 return mAppOps.get(pkg); in getFeatures()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | SmsPermissions.java | 44 private final AppOpsManager mAppOps; field in SmsPermissions 49 mAppOps = appOps; in SmsPermissions() 107 return mAppOps.noteOp(AppOpsManager.OPSTR_SEND_SMS, Binder.getCallingUid(), callingPackage, in checkCallingCanSendSms() 121 return mAppOps.noteOp(AppOpsManager.OPSTR_SEND_SMS, Binder.getCallingUid(), callingPackage, in checkCallingOrSelfCanSendSms()
|
D | PhoneSubInfoController.java | 65 private AppOpsManager mAppOps; field in PhoneSubInfoController 81 mAppOps = context.getSystemService(AppOpsManager.class); in PhoneSubInfoController() 189 mAppOps.checkPackage(Binder.getCallingUid(), callingPackage); 350 mAppOps.checkPackage(Binder.getCallingUid(), callingPackage);
|
D | IccSmsInterfaceManager.java | 98 final protected AppOpsManager mAppOps; field in IccSmsInterfaceManager 176 mAppOps = appOps; in IccSmsInterfaceManager() 293 if (mAppOps.noteOp(AppOpsManager.OPSTR_WRITE_ICC_SMS, Binder.getCallingUid(), in updateMessageOnIccEf() 349 if (mAppOps.noteOp(AppOpsManager.OPSTR_WRITE_ICC_SMS, Binder.getCallingUid(), in copyMessageToIccEf() 385 if (mAppOps.noteOp(AppOpsManager.OPSTR_READ_ICC_SMS, Binder.getCallingUid(), in getAllMessagesFromIccEf()
|
/frameworks/base/services/core/java/com/android/server/audio/ |
D | HardeningEnforcer.java | 49 final AppOpsManager mAppOps; field in HardeningEnforcer 88 mAppOps = appOps; in HardeningEnforcer() 192 if (mAppOps.noteOpNoThrow(op, uid, packageName, attributionTag, null) in noteOp()
|
/frameworks/base/services/core/java/com/android/server/location/gnss/ |
D | GnssVisibilityControl.java | 74 private final AppOpsManager mAppOps; field in GnssVisibilityControl 106 mAppOps = mContext.getSystemService(AppOpsManager.class); in GnssVisibilityControl() 498 mAppOps.noteOpNoThrow(AppOpsManager.OP_FINE_LOCATION, proxyAppInfo.uid, in handleNfwNotification() 575 if (mAppOps.startOpNoThrow(AppOpsManager.OP_MONITOR_LOCATION, uid, in updateLocationIcon() 579 if (mAppOps.startOpNoThrow(AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION, uid, in updateLocationIcon() 581 mAppOps.finishOp(AppOpsManager.OP_MONITOR_LOCATION, uid, proxyAppPkgName); in updateLocationIcon() 585 mAppOps.finishOp(AppOpsManager.OP_MONITOR_LOCATION, uid, proxyAppPkgName); in updateLocationIcon() 586 mAppOps.finishOp(AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION, uid, proxyAppPkgName); in updateLocationIcon()
|
D | GnssLocationProvider.java | 332 private final AppOpsManager mAppOps; field in GnssLocationProvider 429 mAppOps = mContext.getSystemService(AppOpsManager.class); in GnssLocationProvider() 1132 mAppOps.startOpNoThrow(AppOpsManager.OP_GPS, newChain.getAttributionUid(), in updateClientUids() 1139 mAppOps.finishOp(AppOpsManager.OP_GPS, goneChain.getAttributionUid(), in updateClientUids() 1157 mAppOps.startOpNoThrow(AppOpsManager.OP_GPS, in updateClientUids() 1165 mAppOps.finishOp(AppOpsManager.OP_GPS, goneWork.getUid(i), in updateClientUids()
|
/frameworks/base/services/core/java/com/android/server/ |
D | HardwarePropertiesManagerService.java | 62 private final AppOpsManager mAppOps; field in HardwarePropertiesManagerService 66 mAppOps = (AppOpsManager)mContext.getSystemService(Context.APP_OPS_SERVICE); in HardwarePropertiesManagerService() 171 mAppOps.checkPackage(Binder.getCallingUid(), callingPackage); in enforceHardwarePropertiesRetrievalAllowed()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/appops/ |
D | AppOpsControllerImpl.java | 82 private final AppOpsManager mAppOps; field in AppOpsControllerImpl 166 mAppOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in AppOpsControllerImpl() 198 mAppOps.startWatchingActive(OPS, this); in setListening() 199 mAppOps.startWatchingNoted(OPS, this); in setListening() 212 mAppOps.stopWatchingActive(this); in setListening() 213 mAppOps.stopWatchingNoted(this); in setListening() 231 List<AppOpsManager.PackageOps> packageOps = mAppOps.getPackagesForOps(OPS); in fetchCurrentActiveOps()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/data/ |
D | DataServiceManager.java | 91 private final AppOpsManager mAppOps; field in DataServiceManager 153 mAppOps.setMode(AppOpsManager.OPSTR_MANAGE_IPSEC_TUNNELS, in grantPermissionsToService() 155 mAppOps.setMode(AppOpsManager.OPSTR_FINE_LOCATION, in grantPermissionsToService() 189 mAppOps.setMode(AppOpsManager.OPSTR_MANAGE_IPSEC_TUNNELS, UserHandle.myUserId(), in revokePermissionsFromUnusedDataServices() 191 mAppOps.setMode(AppOpsManager.OPSTR_FINE_LOCATION, UserHandle.myUserId(), in revokePermissionsFromUnusedDataServices() 379 mAppOps = (AppOpsManager) phone.getContext().getSystemService(Context.APP_OPS_SERVICE); in DataServiceManager()
|
/frameworks/base/media/java/android/media/ |
D | PlayerBase.java | 74 private @Nullable IAppOpsService mAppOps; field in PlayerBase 292 if (mAppOps != null) { in baseRelease() 293 mAppOps.stopWatchingMode(mAppOpsCallback); in baseRelease()
|
/frameworks/base/services/core/java/com/android/server/media/projection/ |
D | MediaProjectionManagerService.java | 131 private final AppOpsManager mAppOps; field in MediaProjectionManagerService 159 mAppOps = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in MediaProjectionManagerService() 598 mAppOps.setMode(AppOpsManager.OP_PROJECT_MEDIA, in createProjectionInternal() 673 || mAppOps.noteOpNoThrow( in hasProjectionPermission() 1109 final int currentMode = mAppOps.unsafeCheckOpRawNoThrow( in start() 1112 mAppOps.setMode(AppOpsManager.OP_SYSTEM_ALERT_WINDOW, uid, in start() 1151 final int currentMode = mAppOps.unsafeCheckOpRawNoThrow( in stop() 1154 mAppOps.setMode(AppOpsManager.OP_SYSTEM_ALERT_WINDOW, uid, packageName, in stop()
|
/frameworks/base/services/tests/VpnTests/java/com/android/server/connectivity/ |
D | VpnTest.java | 292 @Mock private AppOpsManager mAppOps; field in VpnTest 381 mockService(AppOpsManager.class, Context.APP_OPS_SERVICE, mAppOps); in setUp() 408 when(mAppOps.noteOpNoThrow(anyString(), anyInt(), anyString(), any(), any())) in setUp() 1054 when(mAppOps.noteOpNoThrow(opStr, Process.myUid(), TEST_VPN_PKG, in createVpn() 1072 verify(mAppOps).noteOpNoThrow(checkedOpStr, Process.myUid(), TEST_VPN_PKG, in checkProvisionVpnProfile() 1319 verify(mAppOps).noteOpNoThrow( in verifyPlatformVpnIsActivated() 1325 verify(mAppOps).startOp( in verifyPlatformVpnIsActivated() 1335 verify(mAppOps, after(100)).finishOp( in verifyPlatformVpnIsDeactivated() 1365 verify(mAppOps).noteOpNoThrow(AppOpsManager.OPSTR_ACTIVATE_VPN, Process.myUid(), in testStartVpnProfileVpnServicePreconsented() 1380 verify(mAppOps) in testStartVpnProfileNotConsented() [all …]
|
/frameworks/base/graphics/java/android/graphics/ |
D | GraphicsStatsService.java | 93 private final AppOpsManager mAppOps; field in GraphicsStatsService 104 mAppOps = context.getSystemService(AppOpsManager.class); in GraphicsStatsService() 180 mAppOps.checkPackage(uid, packageName); in requestBufferForProcess()
|
/frameworks/base/services/core/java/com/android/server/power/ |
D | Notifier.java | 128 private final AppOpsManager mAppOps; field in Notifier 202 mAppOps = mContext.getSystemService(AppOpsManager.class); in Notifier() 289 mAppOps.startOpNoThrow(AppOpsManager.OP_WAKE_LOCK, ownerUid, packageName); in onWakeLockAcquired() 426 mAppOps.finishOp(AppOpsManager.OP_WAKE_LOCK, ownerUid, packageName); in onWakeLockReleased() 755 mAppOps.noteOpNoThrow(AppOpsManager.OP_TURN_SCREEN_ON, opUid, opPackageName); in onWakeUp()
|
/frameworks/base/core/java/android/hardware/ |
D | Camera.java | 197 private @Nullable IAppOpsService mAppOps; field in Camera 601 mAppOps = IAppOpsService.Stub.asInterface(b); in initAppOps() 607 mAppOps.startWatchingMode(AppOpsManager.OP_PLAY_AUDIO, in initAppOps() 617 if (mAppOps != null) { in releaseAppOps() 618 mAppOps.stopWatchingMode(mAppOpsCallback); in releaseAppOps() 1655 if (mAppOps != null) { in updateAppOpsPlayAudio() 1656 mode = mAppOps.checkAudioOperation(AppOpsManager.OP_PLAY_AUDIO, in updateAppOpsPlayAudio()
|
/frameworks/base/services/usage/java/com/android/server/usage/ |
D | StorageStatsService.java | 127 private final AppOpsManager mAppOps; field in StorageStatsService 147 mAppOps = Preconditions.checkNotNull(context.getSystemService(AppOpsManager.class)); in StorageStatsService() 223 mode = mAppOps.noteOp(AppOpsManager.OP_GET_USAGE_STATS, callingUid, callingPackage); in checkStatsPermission() 225 mode = mAppOps.checkOp(AppOpsManager.OP_GET_USAGE_STATS, callingUid, callingPackage); in checkStatsPermission()
|
/frameworks/base/services/core/java/com/android/server/slice/ |
D | SliceManagerService.java | 91 private final AppOpsManager mAppOps; field in SliceManagerService 114 mAppOps = context.getSystemService(AppOpsManager.class); in SliceManagerService() 440 mAppOps.checkPackage(Binder.getCallingUid(), pkg); in verifyCaller()
|
/frameworks/base/services/core/java/com/android/server/clipboard/ |
D | ClipboardService.java | 148 private final AppOpsManager mAppOps; field in ClipboardService 187 mAppOps = (AppOpsManager) getContext().getSystemService(Context.APP_OPS_SERVICE); in ClipboardService() 1327 mAppOps.checkPackage(uid, callingPackage); in clipboardAccessAllowed() 1397 appOpsResult = mAppOps.noteOp(op, uid, callingPackage, attributionTag, null); in clipboardAccessAllowed() 1399 appOpsResult = mAppOps.checkOp(op, uid, callingPackage); in clipboardAccessAllowed()
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | PackageInstallerService.java | 211 private AppOpsManager mAppOps; field in PackageInstallerService 338 mAppOps = mContext.getSystemService(AppOpsManager.class); in systemReady() 716 mAppOps.checkPackage(callingUid, installerPackageName); 723 mAppOps.checkPackage(callingUid, requestedInstallerPackageName); 1361 mAppOps.checkPackage(callingUid, installerPackageName); 1418 mAppOps.checkPackage(callingUid, callerPackageName); 1479 mAppOps.checkPackage(callingUid, callerPackageName);
|
/frameworks/base/services/core/java/com/android/server/biometrics/sensors/fingerprint/ |
D | FingerprintService.java | 116 private final AppOpsManager mAppOps; field in FingerprintService 1033 mAppOps = context.getSystemService(AppOpsManager.class); in FingerprintService() 1181 if (mAppOps.noteOp(AppOpsManager.OP_USE_BIOMETRIC, uid, opPackageName, attributionTag, null) in checkAppOps() 1184 } else if (mAppOps.noteOp( in checkAppOps()
|