Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7a40ace authored by Calin Juravle's avatar Calin Juravle Committed by android-build-merger
Browse files

Merge "Also pin vdex file for camera" am: d4ae914b

am: a433a9d9

Change-Id: I943815b1e8b29734224d49140a667bf4d7d23b8f
parents 2ce1b38e a433a9d9
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -243,22 +243,24 @@ 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);
        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);
                }
            }
        }

        return true;
    }