Home
last modified time | relevance | path

Searched refs:mDevicePolicyManager (Results 1 – 25 of 102) sorted by relevance

12345

/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/
DEnterprisePrivacyFeatureProviderImplTest.java88 private DevicePolicyManager mDevicePolicyManager; field in EnterprisePrivacyFeatureProviderImplTest
109 .thenReturn(mDevicePolicyManager); in setUp()
115 mProvider = new EnterprisePrivacyFeatureProviderImpl(mContext, mDevicePolicyManager, in setUp()
121 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(null); in testHasDeviceOwner()
124 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(mOwner); in testHasDeviceOwner()
130 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(mOwner); in testIsInCompMode()
139 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn(null); in testGetDeviceOwnerOrganizationName()
142 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn(OWNER_ORGANIZATION); in testGetDeviceOwnerOrganizationName()
149 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(null); in testGetDeviceOwnerDisclosure()
154 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(mOwner); in testGetDeviceOwnerDisclosure()
[all …]
DPrivacyPreferenceControllerHelperTest.java56 private DevicePolicyManager mDevicePolicyManager; field in PrivacyPreferenceControllerHelperTest
66 .thenReturn(mDevicePolicyManager); in setUp()
69 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); in setUp()
70 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in setUp()
72 when(mDevicePolicyManager.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) in setUp()
121 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(false); in isFinancedDevice_deviceNotManaged_returnsFalse()
133 when(mDevicePolicyManager.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) in isFinancedDevice_deviceManaged_financedDeviceOwnerType_returnsTrue()
/packages/apps/Settings/tests/robotests/src/com/android/settings/security/
DRequestManageCredentialsTest.java62 private DevicePolicyManager mDevicePolicyManager; field in RequestManageCredentialsTest
81 when(mDevicePolicyManager.getDeviceOwnerUser()).thenReturn(null); in onCreate_intentActionNotManageCredentials_finishActivity()
82 when(mDevicePolicyManager.getProfileOwner()).thenReturn(null); in onCreate_intentActionNotManageCredentials_finishActivity()
96 when(mDevicePolicyManager.getDeviceOwnerUser()).thenReturn(null); in onCreate_noAuthenticationPolicy_finishActivity()
97 when(mDevicePolicyManager.getProfileOwner()).thenReturn(null); in onCreate_noAuthenticationPolicy_finishActivity()
113 when(mDevicePolicyManager.getDeviceOwnerUser()).thenReturn(null); in onCreate_invalidAuthenticationPolicy_finishActivity()
114 when(mDevicePolicyManager.getProfileOwner()).thenReturn(null); in onCreate_invalidAuthenticationPolicy_finishActivity()
130 when(mDevicePolicyManager.getDeviceOwnerUser()).thenReturn(null); in onCreate_runOnManagedProfile_finishActivity()
131 when(mDevicePolicyManager.getProfileOwner()).thenReturn(new ComponentName("pkg", "cls")); in onCreate_runOnManagedProfile_finishActivity()
147 when(mDevicePolicyManager.getDeviceOwnerUser()).thenReturn(UserHandle.SYSTEM); in onCreate_runOnManagedDevice_finishActivity()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/
DUsbAudioRoutingPreferenceControllerTest.java58 private DevicePolicyManager mDevicePolicyManager; field in UsbAudioRoutingPreferenceControllerTest
71 when(mContext.getSystemService(DevicePolicyManager.class)).thenReturn(mDevicePolicyManager); in setUp()
78 when(mDevicePolicyManager.isUsbDataSignalingEnabled()).thenReturn(true); in updateState_usbAudioRoutingEnabled_shouldCheckedPreference()
79 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in updateState_usbAudioRoutingEnabled_shouldCheckedPreference()
91 when(mDevicePolicyManager.isUsbDataSignalingEnabled()).thenReturn(true); in updateState_usbAudioRoutingDisabled_shouldUncheckedPreference()
92 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in updateState_usbAudioRoutingDisabled_shouldUncheckedPreference()
104 when(mDevicePolicyManager.isUsbDataSignalingEnabled()).thenReturn(false); in updateState_usbDataSignalingDisabled_shouldDisablePreference()
105 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in updateState_usbDataSignalingDisabled_shouldDisablePreference()
150 when(mDevicePolicyManager.isUsbDataSignalingEnabled()).thenReturn(true); in onDeveloperOptionsSwitchEnabled_usbEnabled_shouldNotDisablePreference()
151 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in onDeveloperOptionsSwitchEnabled_usbEnabled_shouldNotDisablePreference()
[all …]
DDefaultUsbConfigurationPreferenceControllerTest.java55 private DevicePolicyManager mDevicePolicyManager; field in DefaultUsbConfigurationPreferenceControllerTest
67 when(context.getSystemService(DevicePolicyManager.class)).thenReturn(mDevicePolicyManager); in setup()
74 when(mDevicePolicyManager.isUsbDataSignalingEnabled()).thenReturn(true); in updateState_usbDataSignalingEnabled_shouldNotDisablePreference()
75 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in updateState_usbDataSignalingEnabled_shouldNotDisablePreference()
84 when(mDevicePolicyManager.isUsbDataSignalingEnabled()).thenReturn(false); in updateState_usbDataSignalingDisabled_shouldDisablePreference()
85 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in updateState_usbDataSignalingDisabled_shouldDisablePreference()
95 when(mDevicePolicyManager.isUsbDataSignalingEnabled()).thenReturn(true); in onDeveloperOptionsSwitchEnabled_usbEnabled_shouldNotDisablePreference()
96 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in onDeveloperOptionsSwitchEnabled_usbEnabled_shouldNotDisablePreference()
105 when(mDevicePolicyManager.isUsbDataSignalingEnabled()).thenReturn(false); in onDeveloperOptionsSwitchEnabled_usbDisabled_shouldDisablePreference()
106 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in onDeveloperOptionsSwitchEnabled_usbDisabled_shouldDisablePreference()
/packages/apps/Settings/src/com/android/settings/enterprise/
DPrivacyPreferenceControllerHelper.java38 private final DevicePolicyManager mDevicePolicyManager; field in PrivacyPreferenceControllerHelper
44 mDevicePolicyManager = context.getSystemService(DevicePolicyManager.class); in PrivacyPreferenceControllerHelper()
55 preference.setSummary(mDevicePolicyManager.getResources().getString( in updateState()
60 preference.setSummary(mDevicePolicyManager.getResources().getString( in updateState()
74 return mDevicePolicyManager.isDeviceManaged() && mDevicePolicyManager.getDeviceOwnerType( in isFinancedDevice()
75 mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in isFinancedDevice()
DDeviceAdminStringProviderImpl.java33 private final DevicePolicyManager mDevicePolicyManager; field in DeviceAdminStringProviderImpl
37 mDevicePolicyManager = mContext.getSystemService(DevicePolicyManager.class); in DeviceAdminStringProviderImpl()
42 return mDevicePolicyManager.getResources().getString(DISABLED_BY_IT_ADMIN_TITLE, in getDefaultDisabledByPolicyTitle()
78 return mDevicePolicyManager.getResources().getString(CONTACT_YOUR_IT_ADMIN, in getDefaultDisabledByPolicyContent()
84 return mDevicePolicyManager.getResources().getString(IT_ADMIN_POLICY_DISABLING_INFO_URL, in getLearnMoreHelpPageUrl()
DCaCertsCurrentUserPreferenceController.java33 DevicePolicyManager mDevicePolicyManager; field in CaCertsCurrentUserPreferenceController
37 mDevicePolicyManager = mContext.getSystemService(DevicePolicyManager.class); in CaCertsCurrentUserPreferenceController()
50 preference.setTitle(mDevicePolicyManager.getResources().getString( in updateState()
54 preference.setTitle(mDevicePolicyManager.getResources().getString( in updateState()
DAlwaysOnVpnCurrentUserPreferenceController.java34 private final DevicePolicyManager mDevicePolicyManager; field in AlwaysOnVpnCurrentUserPreferenceController
40 mDevicePolicyManager = context.getSystemService(DevicePolicyManager.class); in AlwaysOnVpnCurrentUserPreferenceController()
47 mDevicePolicyManager.getResources().getString( in updateState()
53 mDevicePolicyManager.getResources().getString(ALWAYS_ON_VPN_DEVICE, in updateState()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/inputmethod/
DKeyboardManagementPreferenceControllerTest.java100 private DevicePolicyManager mDevicePolicyManager; field in KeyboardManagementPreferenceControllerTest
119 when(mContext.getSystemService(DevicePolicyManager.class)).thenReturn(mDevicePolicyManager); in setUp()
143 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn(null); in refreshUi_permitAllInputMethods_preferenceCountIs4()
160 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn( in refreshUi_multiplteAllowedImeByOrganization_allPreferencesVisible()
180 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn( in refreshUi_multipleEnabledInputMethods_allPreferencesEnabled()
200 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn( in refreshUi_multipleEnabledInputMethods_allPreferencesChecked()
221 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn( in refreshUi_disallowedByOrganization_preferenceShownDisabled()
260 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn(null); in refreshUi_verifyPreferenceIcon()
279 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn(null); in refreshUi_verifyPreferenceTitle()
298 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn(null); in refreshUi_verifyPreferenceSummary()
[all …]
DEnabledKeyboardPreferenceControllerTest.java82 private DevicePolicyManager mDevicePolicyManager; field in EnabledKeyboardPreferenceControllerTest
98 when(mContext.getSystemService(DevicePolicyManager.class)).thenReturn(mDevicePolicyManager); in setUp()
114 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn(null); in refreshUi_permitAllInputMethods()
125 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()) in refreshUi_hasAllowedImeByOrganization()
137 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()) in refreshUi_disallowedByOrganization()
163 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn(null); in refreshUi_verifyPreferenceIcon()
176 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn(null); in refreshUi_verifyPreferenceTitle()
189 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn(null); in refreshUi_verifyPreferenceSummary()
203 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn(null); in performClick_launchSettingsActivity()
223 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn(null); in performClick_missingSettingsActivity_noCrash()
[all …]
DKeyboardPreferenceControllerTest.java74 private DevicePolicyManager mDevicePolicyManager; field in KeyboardPreferenceControllerTest
89 when(mContext.getSystemService(DevicePolicyManager.class)).thenReturn(mDevicePolicyManager); in setUp()
102 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn(null); in refreshUi_noInputMethodInfo()
111 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn(null); in refreshUi_permitAllInputMethods_hasOneInputMethodInfo()
126 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn(null); in refreshUi_permitAllInputMethods_hasTwoInputMethodInfo()
144 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn(null); in refreshUi_permitAllInputMethods_hasThreeInputMethodInfo()
165 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn( in refreshUi_hasAllowedImeByOrganization()
179 when(mDevicePolicyManager.getPermittedInputMethodsForCurrentUser()).thenReturn( in refreshUi_disallowedByOrganization()
/packages/apps/Settings/tests/robotests/src/com/android/settings/
DMainClearConfirmTest.java65 private DevicePolicyManager mDevicePolicyManager; field in MainClearConfirmTest
79 .thenReturn(mDevicePolicyManager); in setUp()
128 when(mDevicePolicyManager.isFactoryResetProtectionPolicySupported()).thenReturn(true); in shouldWipePersistentDataBlock_oemUnlockAllowedAndFlagDiscabled_shouldReturnFalse()
141 when(mDevicePolicyManager.isFactoryResetProtectionPolicySupported()).thenReturn(true); in shouldWipePersistentDataBlock_oemUnlockAllowedAndFlagEnabled_shouldReturnTrue()
156 when(mDevicePolicyManager.isFactoryResetProtectionPolicySupported()).thenReturn(false); in shouldWipePersistentDataBlock_frpPolicyNotSupported_shouldReturnFalse()
174 when(mDevicePolicyManager.isFactoryResetProtectionPolicySupported()).thenReturn(true); in shouldWipePersistentDataBlock_hasFactoryResetProtectionPolicy_shouldReturnFalse()
175 when(mDevicePolicyManager.getFactoryResetProtectionPolicy(null)).thenReturn(frp); in shouldWipePersistentDataBlock_hasFactoryResetProtectionPolicy_shouldReturnFalse()
176 when(mDevicePolicyManager.isOrganizationOwnedDeviceWithManagedProfile()).thenReturn(true); in shouldWipePersistentDataBlock_hasFactoryResetProtectionPolicy_shouldReturnFalse()
189 when(mDevicePolicyManager.isFactoryResetProtectionPolicySupported()).thenReturn(true); in shouldWipePersistentDataBlock_isNotOrganizationOwnedDevice_shouldReturnTrue()
190 when(mDevicePolicyManager.getFactoryResetProtectionPolicy(null)).thenReturn(null); in shouldWipePersistentDataBlock_isNotOrganizationOwnedDevice_shouldReturnTrue()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DAppWithAdminGrantedPermissionsCounterTest.java93 private DevicePolicyManager mDevicePolicyManager; field in AppWithAdminGrantedPermissionsCounterTest
148 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp1)).isTrue(); in testIncludeInCount()
151 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp2)).isFalse(); in testIncludeInCount()
154 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp3)).isTrue(); in testIncludeInCount()
157 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp4)).isFalse(); in testIncludeInCount()
160 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp5)).isFalse(); in testIncludeInCount()
195 when(mDevicePolicyManager.getPermissionGrantState(null, APP_1, PERMISSION_1)) in configureRunTimePermissions()
197 when(mDevicePolicyManager.getPermissionGrantState(null, APP_1, PERMISSION_2)) in configureRunTimePermissions()
199 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_2), any())) in configureRunTimePermissions()
201 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_3), any())) in configureRunTimePermissions()
[all …]
DAppWithAdminGrantedPermissionsListerTest.java90 private DevicePolicyManager mDevicePolicyManager; field in AppWithAdminGrantedPermissionsListerTest
130 when(mDevicePolicyManager.getPermissionGrantState(null, APP_1, PERMISSION_1)) in verifyListInstalledApps()
132 when(mDevicePolicyManager.getPermissionGrantState(null, APP_1, PERMISSION_2)) in verifyListInstalledApps()
134 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_2), any())) in verifyListInstalledApps()
136 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_3), any())) in verifyListInstalledApps()
138 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_4), any())) in verifyListInstalledApps()
140 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_5), any())) in verifyListInstalledApps()
180 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_6), any())) in verifyListInstalledApps()
223 mDevicePolicyManager, mUserManager); in AppWithAdminGrantedPermissionsListerTestable()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/
DSetDeviceOwnerPolicyTaskTest.java56 @Mock private DevicePolicyManager mDevicePolicyManager; field in SetDeviceOwnerPolicyTaskTest
71 .thenReturn(mDevicePolicyManager); in setUp()
76 when(mUtils.getCurrentDeviceOwnerComponentName(mDevicePolicyManager)).thenReturn(null); in setUp()
77 when(mDevicePolicyManager.setDeviceOwner(ADMIN_COMPONENT_NAME, TEST_USER_ID)) in setUp()
163 verify(mDevicePolicyManager).setActiveAdmin(ADMIN_COMPONENT_NAME, true, TEST_USER_ID); in testSetActiveAdmin()
177 verify(mDevicePolicyManager).setDeviceOwner(ADMIN_COMPONENT_NAME, TEST_USER_ID); in testSetDeviceOwner()
188 when(mDevicePolicyManager.setDeviceOwner(ADMIN_COMPONENT_NAME, in testSetDeviceOwner_PreconditionsNotMet()
205 when(mDevicePolicyManager.setDeviceOwner( in testSetDeviceOwner_ReturnFalse()
226 verify(mDevicePolicyManager).setDeviceOwner(ADMIN_COMPONENT_NAME, TEST_USER_ID); in testSetDeviceOwnerType_asDeviceOwner_toFinancedDevice()
227 verify(mDevicePolicyManager).setDeviceOwnerType( in testSetDeviceOwnerType_asDeviceOwner_toFinancedDevice()
[all …]
DProvisionFullyManagedDeviceTaskTest.java70 @Mock private DevicePolicyManager mDevicePolicyManager; field in ProvisionFullyManagedDeviceTaskTest
87 .thenReturn(mDevicePolicyManager); in setUp()
107 doThrow(createProvisioningException()).when(mDevicePolicyManager) in testError()
120 .when(mDevicePolicyManager).provisionFullyManagedDevice(any()); in testTextError()
136 verify(mDevicePolicyManager).provisionFullyManagedDevice(mParamsCaptor.capture()); in testCanGrantSensorsPermissionsByDefault()
154 verify(mDevicePolicyManager).provisionFullyManagedDevice(mParamsCaptor.capture()); in testCanOptOutOfGrantingSensorsPermissions()
/packages/apps/Settings/src/com/android/settings/biometrics/face/
DFaceProfileStatusPreferenceController.java33 private final DevicePolicyManager mDevicePolicyManager; field in FaceProfileStatusPreferenceController
37 mDevicePolicyManager = context.getSystemService(DevicePolicyManager.class); in FaceProfileStatusPreferenceController()
42 mDevicePolicyManager = context.getSystemService(DevicePolicyManager.class); in FaceProfileStatusPreferenceController()
47 mDevicePolicyManager = context.getSystemService(DevicePolicyManager.class); in FaceProfileStatusPreferenceController()
52 mDevicePolicyManager = context.getSystemService(DevicePolicyManager.class); in FaceProfileStatusPreferenceController()
83 mDevicePolicyManager.getResources().getString(FACE_SETTINGS_FOR_WORK_TITLE, () -> in updateState()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/ota/
DOtaControllerTest.java76 @Mock private DevicePolicyManager mDevicePolicyManager; field in OtaControllerTest
92 .thenReturn(mDevicePolicyManager); in setUp()
126 verify(mDevicePolicyManager).resetDefaultCrossProfileIntentFilters(UserHandle.USER_SYSTEM); in testDeviceOwnerSystemUser()
149 verify(mDevicePolicyManager).resetDefaultCrossProfileIntentFilters(UserHandle.USER_SYSTEM); in testManagedProfileWithoutMissingSystemIme()
150 verify(mDevicePolicyManager, never()).resetDefaultCrossProfileIntentFilters( in testManagedProfileWithoutMissingSystemIme()
188 verify(mDevicePolicyManager).resetDefaultCrossProfileIntentFilters(UserHandle.USER_SYSTEM); in testManagedProfileWithMissingSystemIme()
189 verify(mDevicePolicyManager, never()).resetDefaultCrossProfileIntentFilters( in testManagedProfileWithMissingSystemIme()
231 when(mDevicePolicyManager.getDeviceOwnerUserId()).thenReturn(userId); in setDeviceOwner()
232 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(admin); in setDeviceOwner()
238 when(mDevicePolicyManager.getProfileOwnerAsUser(userId)).thenReturn(admin); in addManagedProfile()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/password/
DSetNewPasswordControllerTest.java64 private DevicePolicyManager mDevicePolicyManager; field in SetNewPasswordControllerTest
75 mDevicePolicyManager, mUi); in setUp()
87 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithFingerprint()
107 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithFace()
155 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithoutFingerprint_noFingerprintSensor()
174 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithoutFace_noFaceSensor()
193 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithoutFingerprint_hasFingerprintEnrolled()
212 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithoutFace_hasFaceEnrolled()
231 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithoutFingerprint_deviceAdminDisallowFingerprintForKeyguard()
250 when(mDevicePolicyManager.getKeyguardDisabledFeatures(any(ComponentName.class))) in launchChooseLockWithoutFace_deviceAdminDisallowFaceForKeyguard()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/
DSetDeviceOwnerPolicyTask.java45 private final DevicePolicyManager mDevicePolicyManager; field in SetDeviceOwnerPolicyTask
68 mDevicePolicyManager = (DevicePolicyManager) context.getSystemService( in SetDeviceOwnerPolicyTask()
85 mDevicePolicyManager.setDeviceOwnerType(adminComponent, DEVICE_OWNER_TYPE_FINANCED); in run()
115 mDevicePolicyManager.setActiveAdmin(component, true, userId); in setActiveAdmin()
120 if (!component.equals(mUtils.getCurrentDeviceOwnerComponentName(mDevicePolicyManager))) { in setDeviceOwner()
121 return mDevicePolicyManager.setDeviceOwner(component, userId); in setDeviceOwner()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/finalization/
DUserProvisioningStateHelper.java50 private final DevicePolicyManager mDevicePolicyManager; field in UserProvisioningStateHelper
65 mDevicePolicyManager = (DevicePolicyManager) mContext.getSystemService( in UserProvisioningStateHelper()
161 final int currentState = mDevicePolicyManager.getUserProvisioningState(); in isStateUnmanagedOrFinalized()
176 final int currentState = mDevicePolicyManager.getUserProvisioningState(); in isUserProvisioningStateProfileFinalized()
182 mDevicePolicyManager.setUserProvisioningState(state, userId); in setUserProvisioningState()
191 || mDevicePolicyManager.getHeadlessDeviceOwnerMode() in maybeSetHeadlessSystemUserProvisioningState()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/ota/
DOtaController.java66 private final DevicePolicyManager mDevicePolicyManager; field in OtaController
88 mDevicePolicyManager = (DevicePolicyManager) context.getSystemService( in OtaController()
107 final int deviceOwnerUserId = mDevicePolicyManager.getDeviceOwnerUserId(); in run()
116 } else if (mDevicePolicyManager.getProfileOwnerAsUser(userInfo.id) != null) { in run()
124 mDevicePolicyManager.resetDefaultCrossProfileIntentFilters(userInfo.id); in run()
138 ComponentName deviceOwner = mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser(); in addDeviceOwnerTasks()
167 ComponentName profileOwner = mDevicePolicyManager.getProfileOwnerAsUser(userId); in addManagedProfileTasks()
190 ComponentName profileOwner = mDevicePolicyManager.getProfileOwnerAsUser(userId); in addManagedUserTasks()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/util/
DWifiPermissionsUtilTest.java109 @Mock private DevicePolicyManager mDevicePolicyManager; field in WifiPermissionsUtilTest
883 .thenReturn(mDevicePolicyManager); in testIsDeviceOwnerByPackageName()
885 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in testIsDeviceOwnerByPackageName()
887 when(mDevicePolicyManager.getDeviceOwnerUser()) in testIsDeviceOwnerByPackageName()
894 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in testIsDeviceOwnerByPackageName()
896 when(mDevicePolicyManager.getDeviceOwnerUser()) in testIsDeviceOwnerByPackageName()
902 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in testIsDeviceOwnerByPackageName()
904 when(mDevicePolicyManager.getDeviceOwnerUser()) in testIsDeviceOwnerByPackageName()
910 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in testIsDeviceOwnerByPackageName()
933 .thenReturn(mDevicePolicyManager); in testIsDeviceOwnerByUid()
[all …]
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/finalization/
DUserProvisioningStateHelperTest.java59 @Mock private DevicePolicyManager mDevicePolicyManager; field in UserProvisioningStateHelperTest
70 when(mContext.getSystemService(DEVICE_POLICY_SERVICE)).thenReturn(mDevicePolicyManager); in setUp()
119 verify(mDevicePolicyManager, never()).setUserProvisioningState(anyInt(), anyInt()); in testInitiallyDone_DeviceAfterSuw()
167 when(mDevicePolicyManager.getHeadlessDeviceOwnerMode()) in testFinalized_DeviceOwner_HeadlessSystemUser()
193 verify(mDevicePolicyManager).setUserProvisioningState(state, userId); in verifyUserProvisioningStateSet()
201 when(mDevicePolicyManager.getUserProvisioningState()).thenReturn(currentState); in isStateUnmanagedOrFinalizedWithCurrentState()

12345