diff options
| author | 2017-05-19 16:56:37 +0000 | |
|---|---|---|
| committer | 2017-05-19 16:56:43 +0000 | |
| commit | 540c5bd354aa79a9782f419f083c848793c7c3dd (patch) | |
| tree | 222455868264ac72e2f64bb36e824d88f3e45c90 | |
| parent | 906fe92759e5153620adfd085926ab5eea444ff8 (diff) | |
| parent | 128721a5387e903891e54843a6d565814f5024f9 (diff) | |
Merge "Also pin vdex file for camera" into oc-dev
| -rw-r--r-- | services/core/java/com/android/server/PinnerService.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/PinnerService.java b/services/core/java/com/android/server/PinnerService.java index a94bf79fcb30..e3ebf4d3a7ee 100644 --- a/services/core/java/com/android/server/PinnerService.java +++ b/services/core/java/com/android/server/PinnerService.java @@ -244,20 +244,22 @@ public final class PinnerService extends SystemService { // get the path to the odex or oat file String baseCodePath = cameraInfo.getBaseCodePath(); - String odex = null; + String[] files = null; try { - odex = DexFile.getDexFileOutputPath(baseCodePath, arch); + files = DexFile.getDexFileOutputPaths(baseCodePath, arch); } catch (IOException ioe) {} - if (odex == null) { + if (files == null) { return true; } //not pinning the oat/odex is not a fatal error - pf = pinFile(odex, 0, 0, MAX_CAMERA_PIN_SIZE); - if (pf != null) { - mPinnedCameraFiles.add(pf); - if (DEBUG) { - Slog.i(TAG, "Pinned " + pf.mFilename); + for (String file : files) { + pf = pinFile(file, 0, 0, MAX_CAMERA_PIN_SIZE); + if (pf != null) { + mPinnedCameraFiles.add(pf); + if (DEBUG) { + Slog.i(TAG, "Pinned " + pf.mFilename); + } } } |