Skip to content

Commit

Permalink
Fix to multiple hardware changes
Browse files Browse the repository at this point in the history
  • Loading branch information
oaliaga committed Feb 12, 2016
1 parent e06fd87 commit b156836
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 8 additions & 0 deletions app/src/main/java/com/prey/PreyConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ public class PreyConfig {

public static final int NOTIFY_ANDROID_6 = 6;

public static final String SENT_UUID_SERIAL_NUMBER = "SENT_UUID_SERIAL_NUMBER";

private boolean securityPrivilegesAlreadyPrompted;

private Context ctx;
Expand Down Expand Up @@ -836,6 +838,12 @@ public int getGeofenceMaximumAccuracy(){
return FileConfigReader.getInstance(this.ctx).getGeofenceMaximumAccuracy();
}

public boolean isSentUuidSerialNumber() {
return getBoolean(PreyConfig.SENT_UUID_SERIAL_NUMBER, false);
}

public void setSentUuidSerialNumber(boolean sentUuidSerialNumber){
saveBoolean(PreyConfig.SENT_UUID_SERIAL_NUMBER, sentUuidSerialNumber);
}

}
9 changes: 5 additions & 4 deletions app/src/main/java/com/prey/net/PreyWebServices.java
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,11 @@ public PreyHttpResponse sendPreyHttpData(Context ctx, ArrayList<HttpDataService>
parameters.put("hardware_attributes[ram_size]", "" + hardware.getTotalMemory());
}


parameters.put( "hardware_attributes[uuid]", hardware.getUuid());
parameters.put( "hardware_attributes[serial_number]", hardware.getSerialNumber());

if(!"".equals(hardware.getUuid())&&!PreyConfig.getPreyConfig(ctx).isSentUuidSerialNumber()) {
parameters.put("hardware_attributes[uuid]", hardware.getUuid());
parameters.put("hardware_attributes[serial_number]", hardware.getSerialNumber());
PreyConfig.getPreyConfig(ctx).setSentUuidSerialNumber(true);
}



Expand Down

0 comments on commit b156836

Please sign in to comment.