mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Merge pull request #733 from rasika/android-sense
Android sense re-enrollment fixed
This commit is contained in:
commit
fe6a623289
@ -123,7 +123,8 @@ public class AndroidSenseServiceImpl implements AndroidSenseService {
|
|||||||
deviceIdentifier.setId(deviceId);
|
deviceIdentifier.setId(deviceId);
|
||||||
deviceIdentifier.setType(AndroidSenseConstants.DEVICE_TYPE);
|
deviceIdentifier.setType(AndroidSenseConstants.DEVICE_TYPE);
|
||||||
try {
|
try {
|
||||||
if (APIUtil.getDeviceManagementService().isEnrolled(deviceIdentifier)) {
|
Device enrolledDevice = APIUtil.getDeviceManagementService().getDevice(deviceIdentifier);
|
||||||
|
if (enrolledDevice != null && !enrolledDevice.getEnrolmentInfo().getStatus().equals(EnrolmentInfo.Status.REMOVED)) {
|
||||||
AndroidConfiguration androidConfiguration = new AndroidConfiguration();
|
AndroidConfiguration androidConfiguration = new AndroidConfiguration();
|
||||||
androidConfiguration.setTenantDomain(APIUtil.getAuthenticatedUserTenantDomain());
|
androidConfiguration.setTenantDomain(APIUtil.getAuthenticatedUserTenantDomain());
|
||||||
androidConfiguration.setMqttEndpoint(APIUtil.getMqttEndpoint());
|
androidConfiguration.setMqttEndpoint(APIUtil.getMqttEndpoint());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user