mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 06:37:39 +00:00
Fix ResourcesProvider being closed
This commit is contained in:
parent
0329f00129
commit
15a7e9af57
@ -178,9 +178,8 @@ public class DownloadActivity extends Activity {
|
|||||||
decryptResources(new FileOutputStream(fd));
|
decryptResources(new FileOutputStream(fd));
|
||||||
Os.lseek(fd, 0, OsConstants.SEEK_SET);
|
Os.lseek(fd, 0, OsConstants.SEEK_SET);
|
||||||
var loader = new ResourcesLoader();
|
var loader = new ResourcesLoader();
|
||||||
try (var pfd = ParcelFileDescriptor.dup(fd);
|
try (var pfd = ParcelFileDescriptor.dup(fd)) {
|
||||||
var provider = ResourcesProvider.loadFromTable(pfd, null)) {
|
loader.addProvider(ResourcesProvider.loadFromTable(pfd, null));
|
||||||
loader.addProvider(provider);
|
|
||||||
getResources().addLoaders(loader);
|
getResources().addLoaders(loader);
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user