Skip to content

Commit

Permalink
Remove prepareForceRefresh
Browse files Browse the repository at this point in the history
Reviewed By: michalgr

Differential Revision: D51155251

fbshipit-source-id: 600cfdc9384c4e010eba357a9710837c7026c2b3
  • Loading branch information
adicatana authored and facebook-github-bot committed Jan 4, 2024
1 parent 42cb90a commit 712a88d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
11 changes: 1 addition & 10 deletions java/com/facebook/soloader/UnpackingSoSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ protected byte[] getDepsBlock() throws IOException {

/** Verify or refresh the state of the shared library store. */
@Override
protected void prepare(int flags) throws IOException {
public void prepare(int flags) throws IOException {
SysUtil.mkdirOrThrow(soDirectory);

if (!soDirectory.canWrite() && !soDirectory.setWritable(true)) {
Expand Down Expand Up @@ -479,13 +479,4 @@ public String getLibraryPath(String soName) throws IOException {
}
return soFile.getCanonicalPath();
}

/**
* Prepare this SoSource by unconditonally unpacking/re-unpacking it.
*
* @throws IOException IOException
*/
public void prepareForceRefresh() throws IOException {
prepare(SoSource.PREPARE_FLAG_FORCE_REFRESH);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public boolean recover(UnsatisfiedLinkError error, SoSource[] soSources) {
BackupSoSource backupSoSource = (BackupSoSource) soSource;
try {
LogUtil.e(SoLoader.TAG, "Runpacking BackupSoSource " + backupSoSource.getName());
backupSoSource.prepareForceRefresh();
backupSoSource.prepare(SoSource.PREPARE_FLAG_FORCE_REFRESH);
} catch (Exception e) {
// Catch a general error and log it, rather than failing during recovery and crashing the
// app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public boolean recover(UnsatisfiedLinkError error, SoSource[] soSources) {
}
try {
LogUtil.e(SoLoader.TAG, "Runpacking " + uss.getName());
uss.prepareForceRefresh();
uss.prepare(SoSource.PREPARE_FLAG_FORCE_REFRESH);
} catch (Exception e) {
// Catch a general error and log it, rather than failing during recovery and crashing the
// app
Expand Down

0 comments on commit 712a88d

Please sign in to comment.