Home
last modified time | relevance | path

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

/packages/apps/ManagedProvisioning/tests/src/com/android/managedprovisioning/task/
DSetDevicePolicyTaskTest.java44 @Mock private DevicePolicyManager mDevicePolicyManager; field in SetDevicePolicyTaskTest
58 .thenReturn(mDevicePolicyManager); in setUp()
61 when(mDevicePolicyManager.getDeviceOwnerComponentOnCallingUser()).thenReturn(null); in setUp()
62 when(mDevicePolicyManager.setDeviceOwner(ADMIN_COMPONENT_NAME, OWNER_NAME, TEST_USER_ID)) in setUp()
90 verify(mDevicePolicyManager).setActiveAdmin(ADMIN_COMPONENT_NAME, true, TEST_USER_ID); in testSetActiveAdmin()
97 verify(mDevicePolicyManager).setDeviceOwner(ADMIN_COMPONENT_NAME, OWNER_NAME, TEST_USER_ID); in testSetDeviceOwner()
103 when(mDevicePolicyManager.setDeviceOwner(ADMIN_COMPONENT_NAME, OWNER_NAME, TEST_USER_ID)) in testSetDeviceOwner_PreconditionsNotMet()
106 verify(mDevicePolicyManager).setDeviceOwner(ADMIN_COMPONENT_NAME, OWNER_NAME, TEST_USER_ID); in testSetDeviceOwner_PreconditionsNotMet()
112 when(mDevicePolicyManager.setDeviceOwner(ADMIN_COMPONENT_NAME, OWNER_NAME, TEST_USER_ID)) in testSetDeviceOwner_ReturnFalse()
115 verify(mDevicePolicyManager).setDeviceOwner(ADMIN_COMPONENT_NAME, OWNER_NAME, TEST_USER_ID); in testSetDeviceOwner_ReturnFalse()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/
DSetDevicePolicyTask.java44 private DevicePolicyManager mDevicePolicyManager; field in SetDevicePolicyTask
59 mDevicePolicyManager = (DevicePolicyManager) mContext. in SetDevicePolicyTask()
98 mDevicePolicyManager.setActiveAdmin(component, true, mUserId); in setActiveAdmin()
103 if (!component.equals(mDevicePolicyManager.getDeviceOwnerComponentOnCallingUser())) { in setDeviceOwner()
104 return mDevicePolicyManager.setDeviceOwner(component, owner, mUserId); in setDeviceOwner()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/
DPreBootListener.java43 private DevicePolicyManager mDevicePolicyManager; field in PreBootListener
54 mDevicePolicyManager = (DevicePolicyManager) context.getSystemService( in onReceive()
60 mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser(); in onReceive()
62 int deviceOwnerUserId = mDevicePolicyManager.getDeviceOwnerUserId(); in onReceive()
146 ComponentName profileOwner = mDevicePolicyManager.getProfileOwnerAsUser(userId); in runManagedProfileDisablingTasks()
/packages/apps/ManagedProvisioning/tests/src/com/android/managedprovisioning/uiflows/
DPreProvisioningControllerTest.java67 @Mock private DevicePolicyManager mDevicePolicyManager; field in PreProvisioningControllerTest
91 .thenReturn(mDevicePolicyManager); in setUp()
109 when(mDevicePolicyManager.getStorageEncryptionStatus()) in setUp()
138 when(mDevicePolicyManager.isProvisioningAllowed(ACTION_PROVISION_MANAGED_PROFILE)) in testManagedProfile_provisioningNotAllowed()
288 when(mDevicePolicyManager.getStorageEncryptionStatus()) in testManagedProfile_encryptionNotSupported()
378 when(mDevicePolicyManager.getStorageEncryptionStatus()) in testNfc_encryptionNotSupported()
535 when(mDevicePolicyManager.isProvisioningAllowed(action)).thenReturn(true); in prepareMocksForManagedProfileIntent()
542 when(mDevicePolicyManager.isProvisioningAllowed(action)).thenReturn(true); in prepareMocksForNfcIntent()
550 when(mDevicePolicyManager.isProvisioningAllowed(action)).thenReturn(true); in prepareMocksForQrIntent()
558 when(mDevicePolicyManager.isProvisioningAllowed(action)).thenReturn(true); in prepareMocksForDoIntent()
[all …]
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/uiflows/
DPreProvisioningController.java60 private final DevicePolicyManager mDevicePolicyManager; field in PreProvisioningController
91 mDevicePolicyManager = (DevicePolicyManager) mContext.getSystemService( in PreProvisioningController()
202 if (!mDevicePolicyManager.isProvisioningAllowed(mParams.provisioningAction)) { in initiateProvisioning()
277 ComponentName mdmPackageName = mDevicePolicyManager in initiateProfileOwnerProvisioning()
279 String domainName = mDevicePolicyManager in initiateProfileOwnerProvisioning()
329 if (mDevicePolicyManager.getStorageEncryptionStatus() == in maybeTriggerEncryption()