|
|
@ -15,6 +15,7 @@
|
|
|
|
* specific language governing permissions and limitations
|
|
|
|
* specific language governing permissions and limitations
|
|
|
|
* under the License.
|
|
|
|
* under the License.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
//org.wso2.carbon....
|
|
|
|
package cdm.api.android;
|
|
|
|
package cdm.api.android;
|
|
|
|
|
|
|
|
|
|
|
|
import cdm.api.android.common.AndroidAgentException;
|
|
|
|
import cdm.api.android.common.AndroidAgentException;
|
|
|
@ -65,7 +66,6 @@ public class Device {
|
|
|
|
} catch (DeviceManagementException e) {
|
|
|
|
} catch (DeviceManagementException e) {
|
|
|
|
msg = "Error occurred while fetching the device list.";
|
|
|
|
msg = "Error occurred while fetching the device list.";
|
|
|
|
LOG.error(msg, e);
|
|
|
|
LOG.error(msg, e);
|
|
|
|
Response.status(HttpStatus.SC_INTERNAL_SERVER_ERROR);
|
|
|
|
|
|
|
|
throw new AndroidAgentException(msg, e);
|
|
|
|
throw new AndroidAgentException(msg, e);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -80,7 +80,6 @@ public class Device {
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
dmService = AndroidAPIUtils.getDeviceManagementService();
|
|
|
|
dmService = AndroidAPIUtils.getDeviceManagementService();
|
|
|
|
|
|
|
|
|
|
|
|
} catch (DeviceManagementServiceException deviceMgtServiceEx) {
|
|
|
|
} catch (DeviceManagementServiceException deviceMgtServiceEx) {
|
|
|
|
String errorMsg = "Device management service error";
|
|
|
|
String errorMsg = "Device management service error";
|
|
|
|
LOG.error(errorMsg, deviceMgtServiceEx);
|
|
|
|
LOG.error(errorMsg, deviceMgtServiceEx);
|
|
|
@ -94,7 +93,6 @@ public class Device {
|
|
|
|
Response.status(HttpStatus.SC_NOT_FOUND);
|
|
|
|
Response.status(HttpStatus.SC_NOT_FOUND);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return device;
|
|
|
|
return device;
|
|
|
|
|
|
|
|
|
|
|
|
} catch (DeviceManagementException deviceMgtEx) {
|
|
|
|
} catch (DeviceManagementException deviceMgtEx) {
|
|
|
|
msg = "Error occurred while fetching the device information.";
|
|
|
|
msg = "Error occurred while fetching the device information.";
|
|
|
|
LOG.error(msg, deviceMgtEx);
|
|
|
|
LOG.error(msg, deviceMgtEx);
|
|
|
|