/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/ |
D | BackgroundActivityPreferenceControllerTest.java | 63 private AppOpsManager mAppOpsManager; field in BackgroundActivityPreferenceControllerTest 84 when(mContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mAppOpsManager); in setUp() 108 verify(mAppOpsManager).setMode(AppOpsManager.OP_RUN_IN_BACKGROUND, UID_NORMAL, in testOnPreferenceChange_TurnOnCheck_MethodInvoked() 117 verify(mAppOpsManager).setMode(AppOpsManager.OP_RUN_IN_BACKGROUND, UID_NORMAL, in testOnPreferenceChange_TurnOffCheck_MethodInvoked() 124 when(mAppOpsManager in testUpdateState_CheckOn_SetCheckedTrue() 136 when(mAppOpsManager in testUpdateState_CheckOff_SetCheckedFalse() 148 when(mAppOpsManager in testUpdateSummary_modeError_showSummaryDisabled() 160 when(mAppOpsManager in testUpdateSummary_modeDefault_showSummaryOn() 173 when(mAppOpsManager in testUpdateSummary_modeIgnored_showSummaryOff() 198 when(mAppOpsManager in testMultiplePackages_ReturnStatusForTargetPackage() [all …]
|
D | BatteryUtilsTest.java | 136 private AppOpsManager mAppOpsManager; field in BatteryUtilsTest 195 doReturn(mAppOpsManager).when(shadowContext).getSystemService(Context.APP_OPS_SERVICE); in setUp() 433 doReturn(AppOpsManager.MODE_IGNORED).when(mAppOpsManager).checkOpNoThrow( in testBackgroundRestrictionOn_restrictionOn_returnTrue() 442 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager).checkOpNoThrow( in testBackgroundRestrictionOn_restrictionOff_returnFalse()
|
D | AdvancedPowerUsageDetailTest.java | 127 private AppOpsManager mAppOpsManager; field in AdvancedPowerUsageDetailTest 200 doReturn(mAppOpsManager).when(mTestActivity).getSystemService(Context.APP_OPS_SERVICE); in setUp()
|
/packages/apps/Settings/tests/app/src/com/android/settings/applications/ |
D | ExternalSourcesSettingsTest.java | 70 private AppOpsManager mAppOpsManager; field in ExternalSourcesSettingsTest 79 mAppOpsManager = mContext.getSystemService(AppOpsManager.class); in setUp() 90 mAppOpsManager.setMode(OP_REQUEST_INSTALL_PACKAGES, uid, mPackageName, MODE_DEFAULT); in resetAppOpModeForAllProfiles() 156 mAppOpsManager.setMode(OP_REQUEST_INSTALL_PACKAGES, in testAppDetailScreenForAppOp() 178 mAppOpsManager.setMode(OP_REQUEST_INSTALL_PACKAGES, packageUid, mPackageName, fromAppOp); in testSwitchToggle() 184 mAppOpsManager.checkOpNoThrow(OP_REQUEST_INSTALL_PACKAGES, packageUid, in testSwitchToggle()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/ |
D | BackgroundActivityPreferenceController.java | 46 private final AppOpsManager mAppOpsManager; field in BackgroundActivityPreferenceController 61 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in BackgroundActivityPreferenceController() 68 final int mode = mAppOpsManager in updateState() 106 mAppOpsManager.setMode(AppOpsManager.OP_RUN_IN_BACKGROUND, mUid, mTargetPackage, in onPreferenceChange() 134 final int mode = mAppOpsManager in updateSummary()
|
D | BatteryUtils.java | 75 private AppOpsManager mAppOpsManager; field in BatteryUtils 89 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in BatteryUtils() 312 final int mode = mAppOpsManager in isBackgroundRestrictionEnabled() 392 return mPackageManager == null || mAppOpsManager == null; in isDataCorrupted()
|
/packages/services/Telecomm/src/com/android/server/telecom/ |
D | TelecomServiceImpl.java | 1040 mAppOpsManager.checkPackage( 1103 mAppOpsManager.checkPackage( 1182 final boolean hasCallAppOp = mAppOpsManager.noteOp(AppOpsManager.OP_CALL_PHONE, 1408 && mAppOpsManager.checkOp(opCode, uid, packageName) in enforceAnswerCallPermission() 1417 private AppOpsManager mAppOpsManager; field in TelecomServiceImpl 1437 mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in TelecomServiceImpl() 1568 mAppOpsManager.checkPackage(Binder.getCallingUid(), packageName); in enforceCallingPackage() 1640 return mAppOpsManager.noteOp(AppOpsManager.OP_READ_PHONE_STATE, in canReadPhoneState() 1665 return mAppOpsManager.noteOp(AppOpsManager.OP_CALL_PHONE, in canCallPhone() 1680 mAppOpsManager.checkPackage( in isCallerSimCallManager() [all …]
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | TelecomServiceImplTest.java | 131 private AppOpsManager mAppOpsManager; field in TelecomServiceImplTest 187 mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in setUp() 225 when(mAppOpsManager.noteOp(eq(AppOpsManager.OP_READ_PHONE_STATE), anyInt(), anyString())) in testGetDefaultOutgoingPhoneAccountFailure() 518 doNothing().when(mAppOpsManager).checkPackage(anyInt(), anyString()); in testAddNewIncomingCall() 535 doThrow(new SecurityException()).when(mAppOpsManager).checkPackage(anyInt(), anyString()); in testAddNewIncomingCallFailure() 554 doNothing().when(mAppOpsManager).checkPackage(anyInt(), anyString()); in testAddNewUnknownCall() 571 doThrow(new SecurityException()).when(mAppOpsManager).checkPackage(anyInt(), anyString()); in testAddNewUnknownCallFailure() 618 when(mAppOpsManager.noteOp(eq(AppOpsManager.OP_CALL_PHONE), anyInt(), anyString())) in testPlaceCallWithNonEmergencyPermission() 632 when(mAppOpsManager.noteOp(eq(AppOpsManager.OP_CALL_PHONE), anyInt(), anyString())) in testPlaceCallWithAppOpsOff() 646 when(mAppOpsManager.noteOp(eq(AppOpsManager.OP_CALL_PHONE), anyInt(), anyString())) in testPlaceCallWithNoCallingPermission()
|
D | VideoProviderTest.java | 81 private AppOpsManager mAppOpsManager; field in VideoProviderTest 95 mAppOpsManager = (AppOpsManager) mContext.getSystemService(Context.APP_OPS_SERVICE); in setUp() 119 doReturn(AppOpsManager.MODE_ALLOWED).when(mAppOpsManager).noteOp(anyInt(), anyInt(), in setUp() 201 doReturn(AppOpsManager.MODE_ERRORED).when(mAppOpsManager).noteOp(anyInt(), anyInt(), in testCameraChangeAppOpsFail() 230 doReturn(AppOpsManager.MODE_ERRORED).when(mAppOpsManager).noteOp(anyInt(), anyInt(), in testCameraChangeAppOpsBelowNMR1Fail()
|
D | ComponentContextFixture.java | 169 return mAppOpsManager; in getSystemService() 423 private final AppOpsManager mAppOpsManager = mock(AppOpsManager.class); 471 }).when(mAppOpsManager).checkPackage(anyInt(), anyString());
|
/packages/apps/Settings/src/com/android/settings/applications/ |
D | WriteSettingsDetails.java | 55 private AppOpsManager mAppOpsManager; field in WriteSettingsDetails 68 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in onCreate() 118 mAppOpsManager.setMode(AppOpsManager.OP_WRITE_SETTINGS, in setCanWriteSettings() 131 int result = mAppOpsManager.noteOpNoThrow(AppOpsManager.OP_WRITE_SETTINGS, in canWriteSettings()
|
D | AppStateAppOpsBridge.java | 52 private final AppOpsManager mAppOpsManager; field in AppStateAppOpsBridge 71 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in AppStateAppOpsBridge() 122 List<PackageOps> ops = mAppOpsManager.getOpsForPackage(uid, pkg, mAppOpsOpCodes); in getPermissionInfo() 234 final List<AppOpsManager.PackageOps> packageOps = mAppOpsManager.getPackagesForOps( in loadAppOpsStates()
|
D | AppStateInstallAppsBridge.java | 45 private final AppOpsManager mAppOpsManager; field in AppStateInstallAppsBridge 51 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in AppStateInstallAppsBridge() 90 return mAppOpsManager.checkOpNoThrow(appOpCode, uid, packageName); in getAppOpMode()
|
D | ExternalSourcesDetails.java | 43 private AppOpsManager mAppOpsManager; field in ExternalSourcesDetails 54 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in onCreate() 101 mAppOpsManager.setMode(AppOpsManager.OP_REQUEST_INSTALL_PACKAGES, in setCanInstallApps()
|
D | UsageAccessDetails.java | 54 private AppOpsManager mAppOpsManager; field in UsageAccessDetails 68 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in onCreate() 126 mAppOpsManager.setMode(AppOpsManager.OP_GET_USAGE_STATS, mPackageInfo.applicationInfo.uid, in setHasAccess()
|
D | DrawOverlayDetails.java | 57 private AppOpsManager mAppOpsManager; field in DrawOverlayDetails 70 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in onCreate() 141 mAppOpsManager.setMode(AppOpsManager.OP_SYSTEM_ALERT_WINDOW, in setCanDrawOverlay()
|
/packages/apps/Settings/src/com/android/settings/fuelgauge/anomaly/action/ |
D | BackgroundCheckAction.java | 33 private AppOpsManager mAppOpsManager; field in BackgroundCheckAction 39 mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE); in BackgroundCheckAction() 48 mAppOpsManager.setMode(AppOpsManager.OP_RUN_IN_BACKGROUND, anomaly.uid, in handlePositiveAction()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/apps/specialaccess/ |
D | ManageAppUsageAccess.java | 40 private AppOpsManager mAppOpsManager; field in ManageAppUsageAccess 45 mAppOpsManager = getContext().getSystemService(AppOpsManager.class); in onCreate() 106 mAppOpsManager.setMode(AppOpsManager.OP_GET_USAGE_STATS, in setAppUsageAccess()
|
D | ManageAppOp.java | 38 private AppOpsManager mAppOpsManager; field in ManageAppOp 43 mAppOpsManager = getContext().getSystemService(AppOpsManager.class); in onCreate() 95 return mAppOpsManager.checkOpNoThrow(getAppOpsOpCode(), uid, packageName);
|
D | ManageExternalSources.java | 41 private AppOpsManager mAppOpsManager; field in ManageExternalSources 45 mAppOpsManager = getContext().getSystemService(AppOpsManager.class); in onCreate() 131 mAppOpsManager.setMode(AppOpsManager.OP_REQUEST_INSTALL_PACKAGES, in setCanInstallApps()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/anomaly/action/ |
D | BackgroundCheckActionTest.java | 52 private AppOpsManager mAppOpsManager; field in BackgroundCheckActionTest 63 doReturn(mAppOpsManager).when(mContext).getSystemService(Context.APP_OPS_SERVICE); in setUp() 78 verify(mAppOpsManager).setMode(AppOpsManager.OP_RUN_IN_BACKGROUND, UID, PACKAGE_NAME, in testHandlePositiveAction_forceStopPackage()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | AppStateAppOpsBridgeTest.java | 45 @Mock private AppOpsManager mAppOpsManager; field in AppStateAppOpsBridgeTest 51 when(mContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mAppOpsManager); in setUp()
|
/packages/providers/BlockedNumberProvider/tests/src/com/android/providers/blockednumber/ |
D | MyMockContext.java | 46 AppOpsManager mAppOpsManager; field in MyMockContext 83 return mAppOpsManager; in getSystemService()
|
D | BlockedNumberProviderTest.java | 74 when(mMockContext.mAppOpsManager.noteOp( in setUp() 428 reset(mMockContext.mAppOpsManager); in testPrivilegedAppCannotUseSystemApis() 433 when(mMockContext.mAppOpsManager.noteOp( in testPrivilegedAppCannotUseSystemApis()
|
/packages/apps/PackageInstaller/src/com/android/packageinstaller/ |
D | PackageInstallerActivity.java | 95 AppOpsManager mAppOpsManager; field in PackageInstallerActivity 381 mAppOpsManager = (AppOpsManager) getSystemService(Context.APP_OPS_SERVICE); in onCreate() 524 final int appOpMode = mAppOpsManager.checkOpNoThrow(appOpCode, in handleUnknownSources() 528 mAppOpsManager.setMode(appOpCode, mOriginatingUid, in handleUnknownSources()
|