From c6bcdec78c0b5f8154d19a02f5531bbb71eb1977 Mon Sep 17 00:00:00 2001 From: "Viscomi, Federico" Date: Fri, 25 Oct 2013 12:52:54 +0200 Subject: [PATCH] added password protected locked property to DeviceInfo --- .../ios/driver/binding/model/DeviceInfo.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/libimobiledevice/ios/driver/binding/model/DeviceInfo.java b/src/main/java/org/libimobiledevice/ios/driver/binding/model/DeviceInfo.java index e1fbcc5..3002ef4 100644 --- a/src/main/java/org/libimobiledevice/ios/driver/binding/model/DeviceInfo.java +++ b/src/main/java/org/libimobiledevice/ios/driver/binding/model/DeviceInfo.java @@ -57,6 +57,7 @@ public class DeviceInfo { private String chipID; private String deviceClass; private String deviceColor; + private boolean passwordProtectedLocked; private String productType; private String productVersion; private String uniqueDeviceID; @@ -128,6 +129,10 @@ public String getModelNumber() { return modelNumber; } + public boolean getPasswordProtectedLocked() { + return passwordProtectedLocked; + } + public String getProductType() { return productType; } @@ -159,6 +164,9 @@ private void parse() throws java.lang.Exception { firmwareVersion = get(rootDict, "FirmwareVersion"); hardwareModel = get(rootDict, "HardwareModel"); modelNumber = get(rootDict, "ModelNumber"); + passwordProtectedLocked = + get(rootDict, "PasswordProtected") != null && get(rootDict, "PasswordProtected") + .contains("true"); productType = get(rootDict, "ProductType"); productVersion = get(rootDict, "ProductVersion"); uniqueDeviceID = get(rootDict, "UniqueDeviceID"); @@ -213,8 +221,8 @@ public MyParser() { * Initialize the document builder factory so that it can be reuused and does not need to be * reinitialized for each new parsing. * - * @throws javax.xml.parsers.ParserConfigurationException - * If the parser configuration is not supported on your system. + * @throws javax.xml.parsers.ParserConfigurationException If the parser configuration is not + * supported on your system. */ private static synchronized void initDocBuilderFactory() throws ParserConfigurationException { docBuilderFactory = DocumentBuilderFactory.newInstance(); @@ -253,7 +261,7 @@ public InputSource resolveEntity(String publicId, String systemId) { * * @param f The XML property list file. * @return The root object of the property list. This is usally a NSDictionary but can also be a - * NSArray. + * NSArray. * @throws Exception When an error occurs during parsing. * @see javax.xml.parsers.DocumentBuilder#parse(java.io.File) */ @@ -270,7 +278,7 @@ public static NSObject parse(File f) throws Exception { * * @param bytes The byte array containing the property list's data. * @return The root object of the property list. This is usally a NSDictionary but can also be a - * NSArray. + * NSArray. * @throws Exception When an error occurs during parsing. */ public static NSObject parse(final byte[] bytes) throws Exception { @@ -283,7 +291,7 @@ public static NSObject parse(final byte[] bytes) throws Exception { * * @param is The input stream pointing to the property list's data. * @return The root object of the property list. This is usally a NSDictionary but can also be a - * NSArray. + * NSArray. * @throws Exception When an error occurs during parsing. * @see javax.xml.parsers.DocumentBuilder#parse(java.io.InputStream) */