/frameworks/base/services/autofill/java/com/android/server/autofill/ui/ |
D | OverlayControl.java | 35 private final @NonNull AppOpsManager mAppOpsManager; field in OverlayControl 38 mAppOpsManager = context.getSystemService(AppOpsManager.class); in OverlayControl() 50 if (mAppOpsManager != null) { in setOverlayAllowed() 51 mAppOpsManager.setUserRestrictionForUser(AppOpsManager.OP_SYSTEM_ALERT_WINDOW, !allowed, in setOverlayAllowed() 53 mAppOpsManager.setUserRestrictionForUser(AppOpsManager.OP_TOAST_WINDOW, !allowed, in setOverlayAllowed()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/ |
D | PipAppOpsListener.java | 38 private AppOpsManager mAppOpsManager; field in PipAppOpsListener 52 mAppOpsManager.checkOpNoThrow(OP_PICTURE_IN_PICTURE, appInfo.uid, 69 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in PipAppOpsListener() 84 mAppOpsManager.startWatchingMode(OP_PICTURE_IN_PICTURE, packageName, in registerAppOpsListener() 89 mAppOpsManager.stopWatchingMode(mAppOpsChangedListener); in unregisterAppOpsListener()
|
/frameworks/base/core/java/com/android/internal/util/ |
D | LocationPermissionChecker.java | 63 private final AppOpsManager mAppOpsManager; field in LocationPermissionChecker 67 mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in LocationPermissionChecker() 241 return mAppOpsManager.noteOp(op, uid, pkgName) == AppOpsManager.MODE_ALLOWED; in noteAppOpAllowed() 249 mAppOpsManager.checkPackage(uid, pkgName); in checkPackage()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/location/ |
D | RecentLocationAccessesTest.java | 50 private AppOpsManager mAppOpsManager; field in RecentLocationAccessesTest 65 when(mContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mAppOpsManager); in setUp() 78 when(mAppOpsManager.getPackagesForOps(RecentLocationAccesses.LOCATION_OPS)).thenReturn( in setUp() 113 when(mAppOpsManager.getPackagesForOps(RecentLocationAccesses.LOCATION_OPS)).thenReturn( in testGetAppList_shouldNotShowAndroidOS()
|
D | RecentLocationAppsTest.java | 51 private AppOpsManager mAppOpsManager; field in RecentLocationAppsTest 64 when(mContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mAppOpsManager); in setUp() 78 when(mAppOpsManager.getPackagesForOps(RecentLocationApps.LOCATION_REQUEST_OPS)).thenReturn( in setUp() 111 when(mAppOpsManager.getPackagesForOps(RecentLocationApps.LOCATION_REQUEST_OPS)).thenReturn( in testGetAppList_shouldNotShowAndroidOS()
|
/frameworks/base/services/core/java/com/android/server/am/ |
D | AssistDataRequester.java | 58 private AppOpsManager mAppOpsManager; field in AssistDataRequester 137 mAppOpsManager = appOpsManager; in AssistDataRequester() 218 if (mAppOpsManager.checkOpNoThrow(mRequestStructureAppOps, callingUid, callingPackage) in requestData() 262 if (mAppOpsManager.checkOpNoThrow(mRequestScreenshotAppOps, callingUid, callingPackage) in requestData()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | LocationControllerImpl.java | 59 private AppOpsManager mAppOpsManager; field in LocationControllerImpl 78 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in LocationControllerImpl() 155 = mAppOpsManager.getPackagesForOps(mHighPowerRequestAppOpArray); in areActiveHighPowerLocationRequests()
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | AssistDataRequesterTest.java | 95 private AppOpsManager mAppOpsManager; field in AssistDataRequesterTest 110 mAppOpsManager = mock(AppOpsManager.class); in setUp() 114 mDataRequester = new AssistDataRequester(mContext, mWm, mAppOpsManager, mCallbacks, in setUp() 147 doReturn(assistStructureAllowed ? MODE_ALLOWED : MODE_ERRORED).when(mAppOpsManager) in setupMocks() 149 doReturn(assistScreenshotAllowed ? MODE_ALLOWED : MODE_ERRORED).when(mAppOpsManager) in setupMocks()
|
/frameworks/base/tests/TelephonyCommonTests/src/com/android/internal/telephony/tests/ |
D | SmsApplicationTest.java | 106 @Mock private AppOpsManager mAppOpsManager; field in SmsApplicationTest 115 when(mContext.getSystemService(AppOpsManager.class)).thenReturn(mAppOpsManager); in setUp() 137 when(mAppOpsManager.unsafeCheckOp( in setUp() 151 when(mAppOpsManager.unsafeCheckOp(AppOpsManager.OPSTR_READ_SMS, SMS_APP_UID, in testGetDefaultSmsApplicationWithAppOpsFix() 158 verify(mAppOpsManager, atLeastOnce()).setUidMode(AppOpsManager.OPSTR_READ_SMS, SMS_APP_UID, in testGetDefaultSmsApplicationWithAppOpsFix()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | WifiNetworkSuggestionsManagerTest.java | 94 private @Mock AppOpsManager mAppOpsManager; field in WifiNetworkSuggestionsManagerTest 134 when(mContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mAppOpsManager); in setUp() 1599 mInorder = inOrder(mAppOpsManager); in testAddRemoveNetworkSuggestionsStartStopAppOpsWatch() 1605 mInorder.verify(mAppOpsManager).startWatchingMode(eq(OPSTR_CHANGE_WIFI_STATE), in testAddRemoveNetworkSuggestionsStartStopAppOpsWatch() 1622 mInorder.verify(mAppOpsManager).stopWatchingMode(mAppOpChangedListenerCaptor.getValue()); in testAddRemoveNetworkSuggestionsStartStopAppOpsWatch() 1652 verify(mAppOpsManager).startWatchingMode(eq(OPSTR_CHANGE_WIFI_STATE), eq(TEST_PACKAGE_1), in testAppOpsChangeAfterSuggestionsAdd() 1658 when(mAppOpsManager.unsafeCheckOpNoThrow( in testAppOpsChangeAfterSuggestionsAdd() 1668 when(mAppOpsManager.unsafeCheckOpNoThrow( in testAppOpsChangeAfterSuggestionsAdd() 1674 verify(mAppOpsManager).stopWatchingMode(mAppOpChangedListenerCaptor.getValue()); in testAppOpsChangeAfterSuggestionsAdd() 1701 verify(mAppOpsManager).startWatchingMode(eq(OPSTR_CHANGE_WIFI_STATE), eq(TEST_PACKAGE_1), in testAppOpsChangeAfterConfigStoreLoad() [all …]
|
D | WifiServiceImplTest.java | 246 @Mock AppOpsManager mAppOpsManager; field in WifiServiceImplTest 364 when(mContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mAppOpsManager); in setUp() 551 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager) in testSetWifiEnabledMetricsNormalAppBelowQSDK() 570 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager) in testSetWifiEnabledMetricsNormalAppTargetingQSDKNoIncrement() 614 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager) in testSetWifiEnabledSuccessForDOAppsTargetingQSDK() 634 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager) in testSetWifiEnabledSuccessForSystemAppsTargetingQSDK() 652 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager) in testSetWifiEnabledSuccessForAppsTargetingBelowQSDK() 683 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager) in testSetWifiEnabledFailureForAppsTargetingQSDK() 700 doThrow(new SecurityException()).when(mAppOpsManager) in testSetWifiEnableAppOpsRejected() 720 doReturn(AppOpsManager.MODE_IGNORED).when(mAppOpsManager) in testSetWifiEnableAppOpsIgnored() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/appops/ |
D | AppOpsControllerTest.java | 60 private AppOpsManager mAppOpsManager; field in AppOpsControllerTest 76 getContext().addMockSystemService(AppOpsManager.class, mAppOpsManager); in setUp() 84 verify(mAppOpsManager, times(1)).startWatchingActive(AppOpsControllerImpl.OPS, mController); in testOnlyListenForFewOps() 90 verify(mAppOpsManager, times(1)).stopWatchingActive(mController); in testStopListening()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/job/ |
D | BackgroundRestrictionsTest.java | 76 private AppOpsManager mAppOpsManager; field in BackgroundRestrictionsTest 108 mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in setUp() 182 mAppOpsManager.setMode(AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, mTestPackageUid, in setAppOpsModeAllowed()
|
/frameworks/base/services/core/java/com/android/server/incident/ |
D | PendingReports.java | 55 private final AppOpsManager mAppOpsManager; field in PendingReports 126 mAppOpsManager = context.getSystemService(AppOpsManager.class); in PendingReports() 456 mAppOpsManager.checkPackage(uid, packageName); in isPackageInUid()
|
/frameworks/base/services/core/java/com/android/server/policy/ |
D | PermissionPolicyService.java | 388 private final @NonNull AppOpsManager mAppOpsManager; field in PermissionPolicyService.PermissionToOpSynchroniser 456 mAppOpsManager = context.getSystemService(AppOpsManager.class); in PermissionToOpSynchroniser() 771 final int currentMode = mAppOpsManager.unsafeCheckOpRaw(AppOpsManager in setUidMode() 775 mAppOpsManager.setUidMode(opCode, uid, mode); in setUidMode() 781 final int currentMode = mAppOpsManager.unsafeCheckOpRaw(AppOpsManager in setUidModeIfMode() 785 mAppOpsManager.setUidMode(opCode, uid, newMode); in setUidModeIfMode()
|
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/ |
D | PackageInstallerActivity.java | 88 AppOpsManager mAppOpsManager; field in PackageInstallerActivity 202 mAppOpsManager.noteOpNoThrow(appOpCode, mOriginatingUid, mOriginatingPackage); in onActivityResult() 294 mAppOpsManager = (AppOpsManager) getSystemService(Context.APP_OPS_SERVICE); in onCreate() 470 final int appOpMode = mAppOpsManager.noteOpNoThrow(appOpCode, in handleUnknownSources() 474 mAppOpsManager.setMode(appOpCode, mOriginatingUid, in handleUnknownSources()
|
/frameworks/base/services/core/java/com/android/server/ |
D | MmsServiceBroker.java | 78 private volatile AppOpsManager mAppOpsManager = null; field in MmsServiceBroker 297 if (mAppOpsManager == null) { in getAppOpsManager() 298 mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in getAppOpsManager() 300 return mAppOpsManager; in getAppOpsManager()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/euicc/ |
D | EuiccController.java | 99 private final AppOpsManager mAppOpsManager; field in EuiccController 144 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in EuiccController() 365 mAppOpsManager.checkPackage(Binder.getCallingUid(), callingPackage); in getDownloadableSubscriptionMetadata() 527 mAppOpsManager.checkPackage(Binder.getCallingUid(), callingPackage); in downloadSubscription() 802 mAppOpsManager.checkPackage(Binder.getCallingUid(), callingPackage); in getDefaultDownloadableSubscriptionList() 888 mAppOpsManager.checkPackage(Binder.getCallingUid(), callingPackage); in deleteSubscription() 957 mAppOpsManager.checkPackage(Binder.getCallingUid(), callingPackage); in switchToSubscription() 1084 mAppOpsManager.checkPackage(Binder.getCallingUid(), callingPackage); in updateSubscriptionNickname()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | CrossProfileAppsServiceImplTest.java | 74 private AppOpsManager mAppOpsManager; field in CrossProfileAppsServiceImplTest 142 }).when(mAppOpsManager).checkPackage(anyInt(), anyString()); in setupPackage() 569 return mAppOpsManager; in getAppOpsManager()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/ |
D | NetworkScorerAppManagerTest.java | 75 @Mock private AppOpsManager mAppOpsManager; field in NetworkScorerAppManagerTest 88 when(mMockContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mAppOpsManager); in setUp() 599 when(mAppOpsManager.noteOp(AppOpsManager.OP_COARSE_LOCATION, uid, packageName)) in mockLocationPermissionGranted() 606 when(mAppOpsManager.noteOp(AppOpsManager.OP_COARSE_LOCATION, uid, packageName)) in mockLocationPermissionDenied()
|
/frameworks/base/services/companion/java/com/android/server/companion/ |
D | CompanionDeviceManagerService.java | 122 private IAppOpsService mAppOpsManager; field in CompanionDeviceManagerService 135 mAppOpsManager = IAppOpsService.Stub.asInterface( in CompanionDeviceManagerService() 300 mAppOpsManager.checkPackage(Binder.getCallingUid(), pkg); in checkCallerIsSystemOr()
|
/frameworks/base/core/java/android/content/ |
D | ContentProvider.java | 212 volatile AppOpsManager mAppOpsManager = null; field in ContentProvider.Transport 622 int mode = mAppOpsManager.noteProxyOp(op, callingPkg); in noteProxyOp() 844 mTransport.mAppOpsManager.checkPackage(Binder.getCallingUid(), pkg); in getCallingPackage() 1011 return mTransport.mAppOpsManager; in getAppOpsManager() 2079 mTransport.mAppOpsManager = (AppOpsManager) context.getSystemService( in attachInfo()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/ |
D | PasspointManagerTest.java | 185 @Mock AppOpsManager mAppOpsManager; field in PasspointManagerTest 215 when(mContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mAppOpsManager); in setUp() 644 verify(mAppOpsManager).startWatchingMode(eq(OPSTR_CHANGE_WIFI_STATE), eq(TEST_PACKAGE), any( in addRemoveProviderWithValidUserCredential() 662 verify(mAppOpsManager).stopWatchingMode(any(AppOpsManager.OnOpChangedListener.class)); in addRemoveProviderWithValidUserCredential() 1695 verify(mAppOpsManager, never()).startWatchingMode(eq(OPSTR_CHANGE_WIFI_STATE), in verifyInstallEphemeralPasspointConfiguration() 1803 verify(mAppOpsManager).startWatchingMode(eq(OPSTR_CHANGE_WIFI_STATE), eq(TEST_PACKAGE), in verifyRemovingPasspointProfilesWhenAppIsDisabled() 1810 when(mAppOpsManager.unsafeCheckOpNoThrow( in verifyRemovingPasspointProfilesWhenAppIsDisabled() 1817 verify(mAppOpsManager).stopWatchingMode(mAppOpChangedListenerCaptor.getValue()); in verifyRemovingPasspointProfilesWhenAppIsDisabled()
|
/frameworks/av/services/camera/libcameraservice/ |
D | CameraService.cpp | 2413 mAppOpsManager = std::make_unique<AppOpsManager>(); in BasicClient() 2484 if (mAppOpsManager != nullptr) { in startCameraOps() 2488 mAppOpsManager->startWatchingMode(AppOpsManager::OP_CAMERA, in startCameraOps() 2490 res = mAppOpsManager->startOpNoThrow(AppOpsManager::OP_CAMERA, in startCameraOps() 2534 if (mAppOpsManager != nullptr) { in finishCameraOps() 2535 mAppOpsManager->finishOp(AppOpsManager::OP_CAMERA, mClientUid, in finishCameraOps() 2558 if (mOpsCallback != nullptr && mAppOpsManager != nullptr) { in finishCameraOps() 2559 mAppOpsManager->stopWatchingMode(mOpsCallback); in finishCameraOps() 2573 if (mAppOpsManager == nullptr) { in opChanged() 2582 res = mAppOpsManager->checkOp(AppOpsManager::OP_CAMERA, in opChanged()
|
/frameworks/base/services/core/java/com/android/server/role/ |
D | RoleManagerService.java | 103 private final AppOpsManager mAppOpsManager; field in RoleManagerService 152 mAppOpsManager = context.getSystemService(AppOpsManager.class); in RoleManagerService() 441 mAppOpsManager.checkPackage(callingUid, packageName); in isRoleHeld()
|