(int depIndex)
| 409 | // the name of that library. The string is prefixed with "lib" and suffixed |
| 410 | // with ".so". |
| 411 | private static @Nullable String getLibString(int depIndex) { |
| 412 | if (depIndex >= sPrecomputedLibs.size()) { |
| 413 | return null; |
| 414 | } |
| 415 | |
| 416 | int initialOffset = sPrecomputedLibs.get(depIndex); |
| 417 | int byteOffset = initialOffset; |
| 418 | while (byteOffset < sEncodedDeps.length && sEncodedDeps[byteOffset] > ' ') { |
| 419 | ++byteOffset; |
| 420 | } |
| 421 | |
| 422 | int libNameLength = (byteOffset - initialOffset) + LIB_PREFIX_SUFFIX_LEN; |
| 423 | char[] libBytes = new char[libNameLength]; |
| 424 | libBytes[0] = 'l'; |
| 425 | libBytes[1] = 'i'; |
| 426 | libBytes[2] = 'b'; |
| 427 | for (int i = 0; i < libNameLength - LIB_PREFIX_SUFFIX_LEN; ++i) { |
| 428 | libBytes[LIB_PREFIX_LEN + i] = (char) sEncodedDeps[initialOffset + i]; |
| 429 | } |
| 430 | libBytes[libNameLength - 3] = '.'; |
| 431 | libBytes[libNameLength - 2] = 's'; |
| 432 | libBytes[libNameLength - 1] = 'o'; |
| 433 | |
| 434 | return new String(libBytes); |
| 435 | } |
| 436 | |
| 437 | private static @Nullable String[] getDepsForLibAtOffset(int offset, int libNameLength) { |
| 438 | List<String> deps = new ArrayList<>(); |
no test coverage detected