(final Context context, boolean extractToDisk)
| 215 | } |
| 216 | |
| 217 | private static boolean initDeps(final Context context, boolean extractToDisk) throws IOException { |
| 218 | verifyUninitialized(); |
| 219 | byte[] depsBytes = null; |
| 220 | byte[] apkId = null; |
| 221 | if (extractToDisk) { |
| 222 | File apkFile = new File(context.getApplicationInfo().sourceDir); |
| 223 | apkId = SysUtil.makeApkDepBlock(apkFile, context); |
| 224 | depsBytes = NativeDepsUnpacker.readNativeDepsFromDisk(context); |
| 225 | } else { |
| 226 | depsBytes = NativeDepsUnpacker.readNativeDepsFromApk(context); |
| 227 | // ApkDepBlock is not needed if we are reading directly from APK |
| 228 | } |
| 229 | |
| 230 | return processDepsBytes(apkId, depsBytes); |
| 231 | } |
| 232 | |
| 233 | // Given the offset where the dependencies for a library begin in |
| 234 | // sEncodedDeps, stores indices for mapping from lib name hash to offset, |
no test coverage detected