Home
last modified time | relevance | path

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

1234

/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()
DEnterprisePrivacySettingsTest.java56 private DevicePolicyManager mDevicePolicyManager; field in EnterprisePrivacySettingsTest
71 when(mContext.getSystemService(DevicePolicyManager.class)).thenReturn(mDevicePolicyManager); in setUp()
72 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); in setUp()
73 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in setUp()
75 when(mDevicePolicyManager.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) in setUp()
103 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(false); in isPageEnabled_noDeviceOwner_shouldReturnFalse()
/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.isUsbDataSignalingEnabledForUser( in updateState_usbAudioRoutingEnabled_shouldCheckedPreference()
80 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in updateState_usbAudioRoutingEnabled_shouldCheckedPreference()
92 when(mDevicePolicyManager.isUsbDataSignalingEnabledForUser( in updateState_usbAudioRoutingDisabled_shouldUncheckedPreference()
94 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in updateState_usbAudioRoutingDisabled_shouldUncheckedPreference()
106 when(mDevicePolicyManager.isUsbDataSignalingEnabledForUser( in updateState_usbDataSignalingDisabled_shouldDisablePreference()
108 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in updateState_usbDataSignalingDisabled_shouldDisablePreference()
153 when(mDevicePolicyManager.isUsbDataSignalingEnabledForUser( in onDeveloperOptionsSwitchEnabled_usbEnabled_shouldNotDisablePreference()
155 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.isUsbDataSignalingEnabledForUser( in updateState_usbDataSignalingEnabled_shouldNotDisablePreference()
76 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in updateState_usbDataSignalingEnabled_shouldNotDisablePreference()
85 when(mDevicePolicyManager.isUsbDataSignalingEnabledForUser( in updateState_usbDataSignalingDisabled_shouldDisablePreference()
87 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in updateState_usbDataSignalingDisabled_shouldDisablePreference()
97 when(mDevicePolicyManager.isUsbDataSignalingEnabledForUser( in onDeveloperOptionsSwitchEnabled_usbEnabled_shouldNotDisablePreference()
99 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in onDeveloperOptionsSwitchEnabled_usbEnabled_shouldNotDisablePreference()
108 when(mDevicePolicyManager.isUsbDataSignalingEnabledForUser( in onDeveloperOptionsSwitchEnabled_usbDisabled_shouldDisablePreference()
110 when(mDevicePolicyManager.getProfileOwner()).thenReturn(TEST_COMPONENT_NAME); in onDeveloperOptionsSwitchEnabled_usbDisabled_shouldDisablePreference()
/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.java53 private DevicePolicyManager mDevicePolicyManager; field in MainClearConfirmTest
124 .thenReturn(mDevicePolicyManager); in shouldWipePersistentDataBlock_frpPolicyNotSupported_shouldReturnFalse()
125 when(mDevicePolicyManager.isFactoryResetProtectionPolicySupported()).thenReturn(false); in shouldWipePersistentDataBlock_frpPolicyNotSupported_shouldReturnFalse()
144 .thenReturn(mDevicePolicyManager); in shouldWipePersistentDataBlock_hasFactoryResetProtectionPolicy_shouldReturnFalse()
145 when(mDevicePolicyManager.isFactoryResetProtectionPolicySupported()).thenReturn(true); in shouldWipePersistentDataBlock_hasFactoryResetProtectionPolicy_shouldReturnFalse()
146 when(mDevicePolicyManager.getFactoryResetProtectionPolicy(null)).thenReturn(frp); in shouldWipePersistentDataBlock_hasFactoryResetProtectionPolicy_shouldReturnFalse()
147 when(mDevicePolicyManager.isOrganizationOwnedDeviceWithManagedProfile()).thenReturn(true); in shouldWipePersistentDataBlock_hasFactoryResetProtectionPolicy_shouldReturnFalse()
161 .thenReturn(mDevicePolicyManager); in shouldWipePersistentDataBlock_isNotOrganizationOwnedDevice_shouldReturnTrue()
162 when(mDevicePolicyManager.isFactoryResetProtectionPolicySupported()).thenReturn(true); in shouldWipePersistentDataBlock_isNotOrganizationOwnedDevice_shouldReturnTrue()
163 when(mDevicePolicyManager.getFactoryResetProtectionPolicy(null)).thenReturn(null); in shouldWipePersistentDataBlock_isNotOrganizationOwnedDevice_shouldReturnTrue()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
DAppWithAdminGrantedPermissionsCounterTest.java87 private DevicePolicyManager mDevicePolicyManager; field in AppWithAdminGrantedPermissionsCounterTest
143 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp1)).isTrue(); in testIncludeInCount()
146 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp2)).isFalse(); in testIncludeInCount()
149 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp3)).isTrue(); in testIncludeInCount()
152 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp4)).isFalse(); in testIncludeInCount()
155 mDevicePolicyManager, mPackageManager, mPackageManagerService, mApp5)).isFalse(); in testIncludeInCount()
188 when(mDevicePolicyManager.getPermissionGrantState(null, APP_1, PERMISSION_1)) in configureRunTimePermissions()
190 when(mDevicePolicyManager.getPermissionGrantState(null, APP_1, PERMISSION_2)) in configureRunTimePermissions()
192 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_2), any())) in configureRunTimePermissions()
194 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_3), any())) in configureRunTimePermissions()
[all …]
DAppWithAdminGrantedPermissionsListerTest.java83 private DevicePolicyManager mDevicePolicyManager; field in AppWithAdminGrantedPermissionsListerTest
121 when(mDevicePolicyManager.getPermissionGrantState(null, APP_1, PERMISSION_1)) in verifyListInstalledApps()
123 when(mDevicePolicyManager.getPermissionGrantState(null, APP_1, PERMISSION_2)) in verifyListInstalledApps()
125 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_2), any())) in verifyListInstalledApps()
127 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_3), any())) in verifyListInstalledApps()
129 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_4), any())) in verifyListInstalledApps()
131 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_5), any())) in verifyListInstalledApps()
171 when(mDevicePolicyManager.getPermissionGrantState(eq(null), eq(APP_6), any())) in verifyListInstalledApps()
214 mDevicePolicyManager, mUserManager); in AppWithAdminGrantedPermissionsListerTestable()
/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()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/task/
DSetDeviceOwnerPolicyTaskTest.java56 @Mock private DevicePolicyManager mDevicePolicyManager; field in SetDeviceOwnerPolicyTaskTest
75 .thenReturn(mDevicePolicyManager); in setUp()
80 when(mUtils.getCurrentDeviceOwnerComponentName(mDevicePolicyManager)).thenReturn(null); in setUp()
81 when(mDevicePolicyManager.setDeviceOwner(ADMIN_COMPONENT_NAME, mDefaultOwnerName, in setUp()
167 verify(mDevicePolicyManager).setActiveAdmin(ADMIN_COMPONENT_NAME, true, TEST_USER_ID); in testSetActiveAdmin()
181 verify(mDevicePolicyManager).setDeviceOwner(ADMIN_COMPONENT_NAME, mDefaultOwnerName, in testSetDeviceOwner()
193 when(mDevicePolicyManager.setDeviceOwner(ADMIN_COMPONENT_NAME, mDefaultOwnerName, in testSetDeviceOwner_PreconditionsNotMet()
210 when(mDevicePolicyManager.setDeviceOwner(ADMIN_COMPONENT_NAME, mDefaultOwnerName, in testSetDeviceOwner_ReturnFalse()
231 verify(mDevicePolicyManager).setDeviceOwner(ADMIN_COMPONENT_NAME, mDefaultOwnerName, in testSetDeviceOwnerType_asDeviceOwner_toFinancedDevice()
233 verify(mDevicePolicyManager).setDeviceOwnerType(ADMIN_COMPONENT_NAME, 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/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/ota/
DOtaControllerTest.java75 @Mock private DevicePolicyManager mDevicePolicyManager; field in OtaControllerTest
91 .thenReturn(mDevicePolicyManager); in setUp()
125 verify(mDevicePolicyManager).resetDefaultCrossProfileIntentFilters(UserHandle.USER_SYSTEM); in testDeviceOwnerSystemUser()
148 verify(mDevicePolicyManager).resetDefaultCrossProfileIntentFilters(UserHandle.USER_SYSTEM); in testManagedProfileWithoutMissingSystemIme()
149 verify(mDevicePolicyManager, never()).resetDefaultCrossProfileIntentFilters( in testManagedProfileWithoutMissingSystemIme()
187 verify(mDevicePolicyManager).resetDefaultCrossProfileIntentFilters(UserHandle.USER_SYSTEM); in testManagedProfileWithMissingSystemIme()
188 verify(mDevicePolicyManager, never()).resetDefaultCrossProfileIntentFilters( in testManagedProfileWithMissingSystemIme()
230 when(mDevicePolicyManager.getDeviceOwnerUserId()).thenReturn(userId); in setDeviceOwner()
231 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(admin); in setDeviceOwner()
237 when(mDevicePolicyManager.getProfileOwnerAsUser(userId)).thenReturn(admin); in addManagedProfile()
[all …]
/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/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/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/util/
DWifiPermissionsUtilTest.java108 @Mock private DevicePolicyManager mDevicePolicyManager; field in WifiPermissionsUtilTest
898 .thenReturn(mDevicePolicyManager); in testIsDeviceOwnerByPackageName()
900 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in testIsDeviceOwnerByPackageName()
902 when(mDevicePolicyManager.getDeviceOwnerUser()) in testIsDeviceOwnerByPackageName()
909 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in testIsDeviceOwnerByPackageName()
911 when(mDevicePolicyManager.getDeviceOwnerUser()) in testIsDeviceOwnerByPackageName()
917 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in testIsDeviceOwnerByPackageName()
919 when(mDevicePolicyManager.getDeviceOwnerUser()) in testIsDeviceOwnerByPackageName()
925 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()) in testIsDeviceOwnerByPackageName()
947 .thenReturn(mDevicePolicyManager); in testIsDeviceOwnerByUid()
[all …]
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/
DSetDeviceOwnerPolicyTask.java46 private final DevicePolicyManager mDevicePolicyManager; field in SetDeviceOwnerPolicyTask
69 mDevicePolicyManager = (DevicePolicyManager) context.getSystemService( in SetDeviceOwnerPolicyTask()
88 mDevicePolicyManager.setDeviceOwnerType(adminComponent, DEVICE_OWNER_TYPE_FINANCED); in run()
118 mDevicePolicyManager.setActiveAdmin(component, true, userId); in setActiveAdmin()
123 if (!component.equals(mUtils.getCurrentDeviceOwnerComponentName(mDevicePolicyManager))) { in setDeviceOwner()
124 return mDevicePolicyManager.setDeviceOwner(component, owner, userId); in setDeviceOwner()
/packages/apps/Settings/tests/unit/src/com/android/settings/safetycenter/
DBiometricsSafetySourceTest.java79 private DevicePolicyManager mDevicePolicyManager; field in BiometricsSafetySourceTest
94 when(mDevicePolicyManager.getProfileOwnerOrDeviceOwnerSupervisionComponent(USER_HANDLE)) in setUp()
99 .thenReturn(mDevicePolicyManager); in setUp()
137 when(mDevicePolicyManager.getKeyguardDisabledFeatures(COMPONENT_NAME)).thenReturn(0); in setSafetySourceData_setsDataForBiometricSource()
151 when(mDevicePolicyManager.getKeyguardDisabledFeatures(COMPONENT_NAME)).thenReturn(0); in setSafetySourceData_setsDataWithCorrectSafetyEvent()
165 when(mDevicePolicyManager.getKeyguardDisabledFeatures(COMPONENT_NAME)) in setSafetySourceData_withFingerprintNotEnrolled_whenDisabledByAdmin_setsData()
181 when(mDevicePolicyManager.getKeyguardDisabledFeatures(COMPONENT_NAME)).thenReturn(0); in setSafetySourceData_withFingerprintNotEnrolled_whenNotDisabledByAdmin_setsData()
200 when(mDevicePolicyManager.getKeyguardDisabledFeatures(COMPONENT_NAME)) in setSafetySourceData_withFingerprintsEnrolled_whenDisabledByAdmin_setsData()
220 when(mDevicePolicyManager.getKeyguardDisabledFeatures(COMPONENT_NAME)).thenReturn(0); in setSafetySourceData_withFingerprintsEnrolled_whenNotDisabledByAdmin_setsData()
236 when(mDevicePolicyManager.getKeyguardDisabledFeatures(COMPONENT_NAME)) in setSafetySourceData_withFaceNotEnrolled_whenDisabledByAdmin_setsData()
[all …]
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/ota/
DOtaController.java66 private final DevicePolicyManager mDevicePolicyManager; field in OtaController
88 mDevicePolicyManager = (DevicePolicyManager) context.getSystemService( in OtaController()
104 final int deviceOwnerUserId = mDevicePolicyManager.getDeviceOwnerUserId(); in run()
112 } else if (mDevicePolicyManager.getProfileOwnerAsUser(userInfo.id) != null) { in run()
117 mDevicePolicyManager.resetDefaultCrossProfileIntentFilters(userInfo.id); in run()
130 ComponentName deviceOwner = mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser(); in addDeviceOwnerTasks()
159 ComponentName profileOwner = mDevicePolicyManager.getProfileOwnerAsUser(userId); in addManagedProfileTasks()
182 ComponentName profileOwner = mDevicePolicyManager.getProfileOwnerAsUser(userId); in addManagedUserTasks()
/packages/apps/Settings/src/com/android/settings/password/
DConfirmDeviceCredentialActivity.java91 private DevicePolicyManager mDevicePolicyManager; field in ConfirmDeviceCredentialActivity
139 mDevicePolicyManager, mUserId, isStrongAuth);
150 mDevicePolicyManager.reportFailedBiometricAttempt(mUserId);
171 mDevicePolicyManager = getSystemService(DevicePolicyManager.class); in onCreate()
275 return mDevicePolicyManager.getResources().getString( in getTitleFromCredentialType()
283 return mDevicePolicyManager.getResources().getString( in getTitleFromCredentialType()
292 return mDevicePolicyManager.getResources().getString( in getTitleFromCredentialType()
308 return mDevicePolicyManager.getResources().getString(WORK_PROFILE_CONFIRM_PIN, in getDetailsFromCredentialType()
316 return mDevicePolicyManager.getResources().getString( in getDetailsFromCredentialType()
325 return mDevicePolicyManager.getResources().getString( in getDetailsFromCredentialType()

1234