Skip to content

Commit

Permalink
Style[downloader]: move internet usage counter addition
Browse files Browse the repository at this point in the history
  • Loading branch information
artdeell committed Jan 27, 2025
1 parent c2ef913 commit 2c60d96
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -420,15 +420,15 @@ private void tryGetLibrarySha1() {
String resultHash = null;
try {
resultHash = downloadSha1();
// The hash is a 40-byte download.
mInternetUsageCounter.getAndAdd(40);
}catch (IOException e) {
Log.i("MinecraftDownloader", "Failed to download hash", e);
}
if(resultHash != null) {
Log.i("MinecraftDownloader", "Got hash: "+resultHash+ " for "+FileUtils.getFileName(mTargetUrl));
mTargetSha1 = resultHash;
}
// The hash is a 40-byte download.
mInternetUsageCounter.getAndAdd(40);
}

@Override
Expand Down

0 comments on commit 2c60d96

Please sign in to comment.