Skip to content

Commit

Permalink
Merge pull request #126 from NordicSemiconductor/improvement/ui-hashes
Browse files Browse the repository at this point in the history
Minor UI improvements
  • Loading branch information
philips77 authored Oct 25, 2023
2 parents 46a5454 + 451a896 commit ea9b936
Showing 1 changed file with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,25 +357,16 @@ protected void onFileLoaded(@NonNull final byte[] data) {
for (final McuMgrTargetImage binary: zip.getBinaries().getImages()) {
final byte[] hash = binary.image.getHash();
hashBuilder
.append(StringUtils.toHex(hash));
.append(StringUtils.toHex(hash))
.append("\n");
sizeBuilder
.append(getString(R.string.image_upgrade_size_value, binary.image.getData().length));
switch (binary.imageIndex) {
case 0 -> {
hashBuilder.append(" (app core)");
sizeBuilder.append(" (app core)");
}
case 1 -> {
hashBuilder.append(" (net core)");
sizeBuilder.append(" (net core)");
}
default -> {
hashBuilder.append(" (unknown core (").append(binary.imageIndex).append(")");
sizeBuilder.append(" (unknown core (").append(binary.imageIndex).append(")");
}
case 0 -> sizeBuilder.append(" (app core");
case 1 -> sizeBuilder.append(" (net core");
default -> sizeBuilder.append(" (unknown core (").append(binary.imageIndex);
}
hashBuilder.append("\n");
sizeBuilder.append("\n");
sizeBuilder.append(", slot: ").append(binary.slot).append(")\n");
}
hashBuilder.setLength(hashBuilder.length() - 1);
sizeBuilder.setLength(sizeBuilder.length() - 1);
Expand Down

0 comments on commit ea9b936

Please sign in to comment.