Merge "Also pin vdex file for camera"
am: d4ae914be2
Change-Id: I0d1a687ea2d90e968fe4e9705de223dc8b181238
This commit is contained in:
@@ -243,20 +243,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user