From c9a07df91a749da8e3431edab91be4bac75a9d78 Mon Sep 17 00:00:00 2001 From: dilanua Date: Sat, 4 Jun 2016 00:27:19 +0530 Subject: [PATCH] Fixing wrong device id shown for OTA-UPGRADE operation --- .../carbon/mdm/services/android/util/AndroidConstants.java | 2 +- .../carbon/mdm/services/android/util/AndroidDeviceUtils.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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/AndroidConstants.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/AndroidConstants.java index beb8c010bf..7aad2f7b1f 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/AndroidConstants.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/AndroidConstants.java @@ -51,7 +51,7 @@ public final class AndroidConstants { public static final String DEVICE_PROPERTIES_KEY = "properties"; public static final String DEVICE_FEATURES_KEY = "features"; public static final String DEVICE_DATA = "data"; - public static final String DEVICE_ID_NOT_FOUND = "Device Id not found for device found at %s"; + public static final String DEVICE_ID_NOT_FOUND = "Device not found for device id: %s"; public static final String DEVICE_ID_SERVICE_NOT_FOUND = "Issue in retrieving device management service instance for device found at %s"; } 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/AndroidDeviceUtils.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/AndroidDeviceUtils.java index f2ed96cdd4..9c4c660a73 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/AndroidDeviceUtils.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/AndroidDeviceUtils.java @@ -55,8 +55,8 @@ public class AndroidDeviceUtils { if (isValidDeviceIdentifier(deviceIdentifier)) { validDeviceIDList.add(deviceIdentifier); } else { - errorDeviceIdList.add(String.format(AndroidConstants.DeviceConstants.DEVICE_ID_NOT_FOUND, - deviceIDCounter)); + errorDeviceIdList.add(String.format(AndroidConstants.DeviceConstants. + DEVICE_ID_NOT_FOUND, deviceID)); } } catch (DeviceManagementException e) { errorDeviceIdList.add(String.format(AndroidConstants.DeviceConstants.DEVICE_ID_SERVICE_NOT_FOUND,