Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added password protected locked property to DeviceInfo #9

Open
wants to merge 1 commit into
base: work
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -128,6 +129,10 @@ public String getModelNumber() {
return modelNumber;
}

public boolean getPasswordProtectedLocked() {
return passwordProtectedLocked;
}

public String getProductType() {
return productType;
}
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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)
*/
Expand All @@ -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 {
Expand All @@ -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)
*/
Expand Down