From 532f66ebc549cf253866c9a22655cba44ac64041 Mon Sep 17 00:00:00 2001 From: inoshperera Date: Thu, 25 Aug 2016 14:09:28 +0530 Subject: [PATCH] fixing the operations not getting applied to multiple devices 80, 73 --- .../wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java index cb65fc6f0..46315c203 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java @@ -122,9 +122,10 @@ public class AndroidAPIUtils { throw new BadRequestException( new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build()); } - DeviceIdentifier deviceIdentifier = new DeviceIdentifier(); + DeviceIdentifier deviceIdentifier; List deviceids = new ArrayList<>(); for (String deviceId : deviceIDs) { + deviceIdentifier = new DeviceIdentifier(); deviceIdentifier.setId(deviceId); deviceIdentifier.setType(AndroidConstants.DEVICE_TYPE_ANDROID); deviceids.add(deviceIdentifier);