Home
last modified time | relevance | path

Searched refs:mAppOpsManager (Results 1 – 25 of 58) sorted by relevance

123

/frameworks/base/core/tests/coretests/src/android/content/
DPermissionCheckerTest.java40 private final AppOpsManager mAppOpsManager = mContext.getSystemService(AppOpsManager.class); field in PermissionCheckerTest
54 mAppOpsManager.setMode(AppOpsManager.permissionToOp(INTERACT_ACROSS_PROFILES_PERMISSION), in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionGranted_returnsGranted()
66 mAppOpsManager.setMode(AppOpsManager.permissionToOp(INTERACT_ACROSS_PROFILES_PERMISSION), in testCheckPermissionForPreflight_appOpPermission_modeDefaultAndPermissionNotGranted_returnsHardDenied()
78 mAppOpsManager.setMode(AppOpsManager.permissionToOp(INTERACT_ACROSS_PROFILES_PERMISSION), in testCheckPermissionForPreflight_appOpPermission_modeAllowed_returnsGranted()
90 mAppOpsManager.setMode(AppOpsManager.permissionToOp(INTERACT_ACROSS_PROFILES_PERMISSION), in testCheckPermissionForPreflight_appOpPermission_packageNameIsNull_returnsGranted()
102 mAppOpsManager.setMode(AppOpsManager.permissionToOp(INTERACT_ACROSS_PROFILES_PERMISSION), in testCheckPermissionForPreflight_appOpPermission_modeIgnored_returnsHardDenied()
114 mAppOpsManager.setMode(AppOpsManager.permissionToOp(INTERACT_ACROSS_PROFILES_PERMISSION), in testCheckPermissionForPreflight_appOpPermission_modeErrored_returnsHardDenied()
127 mAppOpsManager.setMode(AppOpsManager.permissionToOp(INTERACT_ACROSS_PROFILES_PERMISSION), in testCheckPermissionForDataDelivery_appOpPermission_modeDefaultAndPermissionGranted_returnsGranted()
139 mAppOpsManager.setMode(AppOpsManager.permissionToOp(INTERACT_ACROSS_PROFILES_PERMISSION), in testCheckPermissionForDataDelivery_appOpPermission_modeDefaultAndPermissionNotGranted_returnsHardDenied()
151 mAppOpsManager.setMode(AppOpsManager.permissionToOp(INTERACT_ACROSS_PROFILES_PERMISSION), in testCheckPermissionForDataDelivery_appOpPermission_modeAllowed_returnsGranted()
[all …]
/frameworks/base/services/autofill/java/com/android/server/autofill/ui/
DOverlayControl.java35 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/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/
DPipAppOpsListener.java38 private AppOpsManager mAppOpsManager; field in PipAppOpsListener
52 mAppOpsManager.checkOpNoThrow(OP_PICTURE_IN_PICTURE, appInfo.uid,
67 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in PipAppOpsListener()
82 mAppOpsManager.startWatchingMode(OP_PICTURE_IN_PICTURE, packageName, in registerAppOpsListener()
87 mAppOpsManager.stopWatchingMode(mAppOpsChangedListener); in unregisterAppOpsListener()
/frameworks/av/services/camera/libcameraservice/api2/
DCameraOfflineSessionClient.cpp193 if (mAppOpsManager != nullptr) { in startCameraOps()
198 mAppOpsManager->startWatchingMode(AppOpsManager::OP_CAMERA, in startCameraOps()
201 res = mAppOpsManager->startOpNoThrow(AppOpsManager::OP_CAMERA, in startCameraOps()
234 if (mAppOpsManager != nullptr) { in finishCameraOps()
236 mAppOpsManager->finishOp(AppOpsManager::OP_CAMERA, mClientUid, in finishCameraOps()
242 if (mOpsCallback != nullptr && mAppOpsManager != nullptr) { in finishCameraOps()
243 mAppOpsManager->stopWatchingMode(mOpsCallback); in finishCameraOps()
/frameworks/libs/net/common/framework/com/android/net/module/util/
DLocationPermissionChecker.java64 private final AppOpsManager mAppOpsManager; field in LocationPermissionChecker
72 mAppOpsManager = mContext.getSystemService(AppOpsManager.class); in LocationPermissionChecker()
252 return mAppOpsManager.noteOp(op, uid, pkgName, featureId, message) in noteAppOpAllowed()
261 mAppOpsManager.checkPackage(uid, pkgName); in checkPackage()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/location/
DRecentLocationAccessesTest.java50 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()
DRecentLocationAppsTest.java52 private AppOpsManager mAppOpsManager; field in RecentLocationAppsTest
65 when(mContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mAppOpsManager); in setUp()
79 when(mAppOpsManager.getPackagesForOps(RecentLocationApps.LOCATION_REQUEST_OPS)).thenReturn( in setUp()
112 when(mAppOpsManager.getPackagesForOps(RecentLocationApps.LOCATION_REQUEST_OPS)).thenReturn( in testGetAppList_shouldNotShowAndroidOS()
/frameworks/base/services/incremental/test/
DIncrementalServiceTest.cpp691 mAppOpsManager(std::move(appOpsManager)), in MockServiceManager()
704 return std::move(mAppOpsManager); in getAppOpsManager()
719 std::unique_ptr<MockAppOpsManager> mAppOpsManager; member in android::os::incremental::MockServiceManager
742 mAppOpsManager = appOps.get(); in SetUp()
856 NiceMock<MockAppOpsManager>* mAppOpsManager = nullptr; member in android::os::incremental::IncrementalServiceTest
1451 mAppOpsManager->checkPermissionSuccess(); in TEST_F()
1460 EXPECT_CALL(*mAppOpsManager, startWatchingMode(_, _, _)).Times(1); in TEST_F()
1462 EXPECT_CALL(*mAppOpsManager, stopWatchingMode(_)).Times(0); in TEST_F()
1475 mAppOpsManager->checkPermissionSuccess(); in TEST_F()
1483 EXPECT_CALL(*mAppOpsManager, startWatchingMode(_, _, _)).Times(1); in TEST_F()
[all …]
/frameworks/base/services/core/java/com/android/server/am/
DAssistDataRequester.java59 private AppOpsManager mAppOpsManager; field in AssistDataRequester
138 mAppOpsManager = appOpsManager; in AssistDataRequester()
244 if (mAppOpsManager.checkOpNoThrow(mRequestStructureAppOps, callingUid, callingPackage) in requestData()
294 if (mAppOpsManager.checkOpNoThrow(mRequestScreenshotAppOps, callingUid, callingPackage) in requestData()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DAssistDataRequesterTest.java97 private AppOpsManager mAppOpsManager; field in AssistDataRequesterTest
112 mAppOpsManager = mock(AppOpsManager.class); in setUp()
117 mAppOpsManager, mCallbacks, mCallbacksLock, OP_ASSIST_STRUCTURE, in setUp()
150 doReturn(assistStructureAllowed ? MODE_ALLOWED : MODE_ERRORED).when(mAppOpsManager) in setupMocks()
152 doReturn(assistScreenshotAllowed ? MODE_ALLOWED : MODE_ERRORED).when(mAppOpsManager) in setupMocks()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/permission/
DLegacyPermissionManagerServiceTest.java62 private AppOpsManager mAppOpsManager; field in LegacyPermissionManagerServiceTest
144 when(mAppOpsManager.noteOpNoThrow(eq(AppOpsManager.OPSTR_READ_DEVICE_IDENTIFIERS), in checkDeviceIdentifierAccess_hasAppOp_returnsGranted()
355 when(mAppOpsManager.noteOpNoThrow(anyString(), anyInt(), anyString(), any(), in setupAccessTest()
357 when(mInjector.getSystemService(eq(Context.APP_OPS_SERVICE))).thenReturn(mAppOpsManager); in setupAccessTest()
380 when(mAppOpsManager.noteOpNoThrow(eq(appop), eq(APP_UID), eq(mPackageName), any(), in grantPermissionAndAppop()
/frameworks/base/tests/TelephonyCommonTests/src/com/android/internal/telephony/tests/
DSmsApplicationTest.java108 @Mock private AppOpsManager mAppOpsManager; field in SmsApplicationTest
118 when(mContext.getSystemService(AppOpsManager.class)).thenReturn(mAppOpsManager); in setUp()
142 when(mAppOpsManager.unsafeCheckOp( in setUp()
156 when(mAppOpsManager.unsafeCheckOp(AppOpsManager.OPSTR_READ_SMS, SMS_APP_UID, in testGetDefaultSmsApplicationWithAppOpsFix()
163 verify(mAppOpsManager, atLeastOnce()).setUidMode(AppOpsManager.OPSTR_READ_SMS, SMS_APP_UID, in testGetDefaultSmsApplicationWithAppOpsFix()
/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/
DAuthServiceTest.java92 AppOpsManager mAppOpsManager; field in AuthServiceTest
124 when(mInjector.getAppOps(any())).thenReturn(mAppOpsManager); in setUp()
185 when(mAppOpsManager.noteOp(eq(AppOpsManager.OP_USE_BIOMETRIC), anyInt(), any(), any(), in testAuthenticate_appOpsOk_callsBiometricServiceAuthenticate()
214 when(mAppOpsManager.noteOp(eq(AppOpsManager.OP_USE_BIOMETRIC), anyInt(), any(), any(), in testAuthenticate_appOpsDenied_doesNotCallBiometricService()
/frameworks/base/services/core/java/com/android/server/location/contexthub/
DContextHubClientBroker.java200 private final AppOpsManager mAppOpsManager; field in ContextHubClientBroker
332 mAppOpsManager = context.getSystemService(AppOpsManager.class); in ContextHubClientBroker()
358 mAppOpsManager.startWatchingMode(AppOpsManager.OP_NONE, mPackage, this); in startMonitoringOpChanges()
618 int opCode = mAppOpsManager.permissionToOpCode(permission); in notePermissions()
620 if (mAppOpsManager.noteOp(opCode, mUid, mPackage, mAttributionTag, noteMessage) in notePermissions()
864 mAppOpsManager.stopWatchingMode(this); in onClientExit()
/frameworks/base/services/tests/servicestests/src/com/android/server/job/
DBackgroundRestrictionsTest.java77 private AppOpsManager mAppOpsManager; field in BackgroundRestrictionsTest
109 mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in setUp()
201 mAppOpsManager.setMode(AppOpsManager.OP_RUN_ANY_IN_BACKGROUND, mTestPackageUid, in setAppOpsModeAllowed()
/frameworks/base/services/musicrecognition/java/com/android/server/musicrecognition/
DMusicRecognitionManagerPerUserService.java77 private final AppOpsManager mAppOpsManager; field in MusicRecognitionManagerPerUserService
92 mAppOpsManager = getContext().createAttributionContext( in MusicRecognitionManagerPerUserService()
363 int status = mAppOpsManager.startProxyOp( in startRecordAudioOp()
383 mAppOpsManager.finishProxyOp( in finishRecordAudioOp()
/frameworks/base/services/accessibility/java/com/android/server/accessibility/
DAccessibilitySecurityPolicy.java96 private final AppOpsManager mAppOpsManager; field in AccessibilitySecurityPolicy
116 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in AccessibilitySecurityPolicy()
536 if (mAppOpsManager.noteOpNoThrow(AppOpsManager.OPSTR_BIND_ACCESSIBILITY_SERVICE, in canRegisterService()
567 return mAppOpsManager.noteOpNoThrow(AppOpsManager.OPSTR_ACCESS_ACCESSIBILITY, in checkAccessibilityAccess()
571 return mAppOpsManager.noteOp(AppOpsManager.OPSTR_ACCESS_ACCESSIBILITY, in checkAccessibilityAccess()
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/
DPackageInstallerActivity.java92 AppOpsManager mAppOpsManager; field in PackageInstallerActivity
215 mAppOpsManager.noteOpNoThrow(appOpCode, mOriginatingUid, mOriginatingPackage, in onActivityResult()
310 mAppOpsManager = (AppOpsManager) getSystemService(Context.APP_OPS_SERVICE); in onCreate()
517 final int appOpMode = mAppOpsManager.noteOpNoThrow(appOpCode, mOriginatingUid, in handleUnknownSources()
523 mAppOpsManager.setMode(appOpCode, mOriginatingUid, in handleUnknownSources()
783 mAppOpsManager.startWatchingMode(
790 mAppOpsManager.stopWatchingMode(listener);
/frameworks/opt/telephony/src/java/com/android/internal/telephony/euicc/
DEuiccController.java100 private final AppOpsManager mAppOpsManager; field in EuiccController
146 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in EuiccController()
196 mAppOpsManager.checkPackage(Binder.getCallingUid(), callingPackage); in getEid()
373 mAppOpsManager.checkPackage(Binder.getCallingUid(), callingPackage); in getDownloadableSubscriptionMetadata()
535 mAppOpsManager.checkPackage(Binder.getCallingUid(), callingPackage); in downloadSubscription()
810 mAppOpsManager.checkPackage(Binder.getCallingUid(), callingPackage); in getDefaultDownloadableSubscriptionList()
896 mAppOpsManager.checkPackage(Binder.getCallingUid(), callingPackage); in deleteSubscription()
965 mAppOpsManager.checkPackage(Binder.getCallingUid(), callingPackage); in switchToSubscription()
1092 mAppOpsManager.checkPackage(Binder.getCallingUid(), callingPackage); in updateSubscriptionNickname()
/frameworks/base/services/core/java/com/android/server/
DMmsServiceBroker.java79 private volatile AppOpsManager mAppOpsManager = null; field in MmsServiceBroker
300 if (mAppOpsManager == null) { in getAppOpsManager()
301 mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in getAppOpsManager()
303 return mAppOpsManager; in getAppOpsManager()
/frameworks/base/services/core/java/com/android/server/incident/
DPendingReports.java55 private final AppOpsManager mAppOpsManager; field in PendingReports
126 mAppOpsManager = context.getSystemService(AppOpsManager.class); in PendingReports()
458 mAppOpsManager.checkPackage(uid, packageName); in isPackageInUid()
/frameworks/base/core/java/android/permission/
DPermissionUsageHelper.java152 private AppOpsManager mAppOpsManager; field in PermissionUsageHelper
162 mAppOpsManager = context.getSystemService(AppOpsManager.class); in PermissionUsageHelper()
167 mAppOpsManager.startWatchingActive(opStrs, context.getMainExecutor(), this); in PermissionUsageHelper()
169 mAppOpsManager.startWatchingStarted(ops, this); in PermissionUsageHelper()
342 ops = mAppOpsManager.getPackagesForOps(opNames.toArray(new String[opNames.size()])); in getOpUsages()
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DPreferencesHelperTest.java161 @Mock AppOpsManager mAppOpsManager; field in PreferencesHelperTest
266 when(mAppOpsManager.noteOpNoThrow(anyInt(), anyInt(), in setUp()
272 mAppOpsManager, mStatsEventBuilderFactory); in setUp()
1569 mAppOpsManager, mStatsEventBuilderFactory); in testSetupNewZenModeHelper_canBypass()
1581 mAppOpsManager, mStatsEventBuilderFactory); in testSetupNewZenModeHelper_cannotBypass()
2387 mAppOpsManager, mStatsEventBuilderFactory); in testXml_statusBarIcons_default()
2400 mAppOpsManager, mStatsEventBuilderFactory); in testXml_statusBarIcons()
2497 mAppOpsManager, mStatsEventBuilderFactory); in testDelegateXml_noDelegate()
2509 mAppOpsManager, mStatsEventBuilderFactory); in testDelegateXml_delegate()
2522 mAppOpsManager, mStatsEventBuilderFactory); in testDelegateXml_disabledDelegate()
[all …]
/frameworks/base/services/robotests/src/com/android/server/pm/
DCrossProfileAppsServiceImplRoboTest.java108 private final AppOpsManager mAppOpsManager = mContext.getSystemService(AppOpsManager.class); field in CrossProfileAppsServiceImplRoboTest
596 shadowOf(mAppOpsManager).setMode( in explicitlySetInteractAcrossProfilesAppOp()
613 return mAppOpsManager.unsafeCheckOpNoThrow( in getCrossProfileAppOp()
748 return mAppOpsManager; in getAppOpsManager()
/frameworks/base/services/core/java/com/android/server/policy/
DPermissionPolicyService.java578 private final @NonNull AppOpsManager mAppOpsManager; field in PermissionPolicyService.PermissionToOpSynchroniser
618 mAppOpsManager = context.getSystemService(AppOpsManager.class); in PermissionToOpSynchroniser()
892 final int currentMode = mAppOpsManager.unsafeCheckOpRaw(AppOpsManager.opToPublicName( in setUidModeIgnoredIfNotAllowed()
906 final int oldMode = mAppOpsManager.unsafeCheckOpRaw(AppOpsManager.opToPublicName( in setUidMode()
911 final int newMode = mAppOpsManager.unsafeCheckOpRaw(AppOpsManager.opToPublicName( in setUidMode()

123