Skip to content

Commit d67b4af

Browse files
simpletonfacebook-github-bot
authored andcommitted
Stop to clean up the lib-main folder if enable SOLOADER_DISABLE_BACKUP_SOSOURCE
Summary: remove this optional backup soSource clean up logic to migrate below Violation. ``` - Caused by: android.os.strictmode.CredentialProtectedWhileLockedViolation: Accessed credential protected path /<pkg>/lib-main while user 0 was locked - android.os.StrictMode.onCredentialProtectedPathAccess (StrictMode.java:2226) - android.os.StrictMode.access$2000 (StrictMode.java:153) - android.os.StrictMode$5.onPathAccess (StrictMode.java:1858) - libcore.io.BlockGuardOs.access (BlockGuardOs.java:72) - libcore.io.ForwardingOs.access (ForwardingOs.java:72) - android.app.ActivityThread$AndroidOs.access (ActivityThread.java:7616) - java.io.UnixFileSystem.checkAccess (UnixFileSystem.java:281) - java.io.File.exists (File.java:815) - com.facebook.soloader.SoLoader.addBackupSoSource (SoLoader.java:460) [inlined] - com.facebook.soloader.SoLoader.initSoSources (SoLoader.java:371) ``` Reviewed By: phecdarain Differential Revision: D53060447 fbshipit-source-id: 2cca0cda601cf4cf60a863b586ed2624584632e6
1 parent c96d478 commit d67b4af

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

java/com/facebook/soloader/SoLoader.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -455,15 +455,6 @@ private static void addApplicationSoSource(ArrayList<SoSource> soSources, int fl
455455
private static void addBackupSoSource(Context context, ArrayList<SoSource> soSources)
456456
throws IOException {
457457
if ((sFlags & SOLOADER_DISABLE_BACKUP_SOSOURCE) != 0) {
458-
// Clean up backups
459-
final File backupDir = UnpackingSoSource.getSoStorePath(context, SO_STORE_NAME_MAIN);
460-
try {
461-
if (backupDir.exists()) {
462-
SysUtil.dumbDelete(backupDir);
463-
}
464-
} catch (Throwable e) {
465-
LogUtil.w(TAG, "Failed to delete " + backupDir.getCanonicalPath(), e);
466-
}
467458
return;
468459
}
469460

0 commit comments

Comments
 (0)