-
Notifications
You must be signed in to change notification settings - Fork 626
Refactor out cached ApkHashExtractor #3767
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
Conversation
...appdistribution/src/main/java/com/google/firebase/appdistribution/impl/ApkHashExtractor.java
Show resolved
Hide resolved
Coverage Report 1Affected Products
Test Logs
Notes |
Size Report 1Affected Products
Test Logs
Notes |
@Nullable | ||
String calculateApkHash(@NonNull File file) { | ||
LogWrapper.getInstance().v(TAG + "Calculating release id for " + file.getPath()); | ||
LogWrapper.getInstance().v(TAG + "File size: " + file.length()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: please merge this with the previous log statement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
} finally { | ||
long elapsed = System.currentTimeMillis() - start; | ||
if (elapsed > 2 * 1000) { | ||
LogWrapper.getInstance() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe log this always and merge the log statements?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
...ution/src/main/java/com/google/firebase/appdistribution/impl/ReleaseIdentificationUtils.java
Show resolved
Hide resolved
...or the package identifier for AABs. So I'm curious: Why not keep those two related things in |
c5e87bd
to
a566d15
Compare
a566d15
to
5ae822b
Compare
The main reason is the caching of the APK hash. That used to be maintained in the NewReleaseFetcher, but we'll want to take advantage of that caching for IAF as well. So now that's all isolated to the ApkHashExtractor. We could instead have the class be something like "BinaryIdentifierExtractor" and handle the AAB vs. APK logic there, but the APK specific stuff seems like enough of a responsibility on its own. Maybe that could be a separate class that depends on an injected ApkHashExtractor. |
/test check-coverage-changed |
This will be useful for in-app feedback because we'll be using the APK hash to identify the release.