Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java

Issue 2362753005: build/android lint suppressions needed for Android SDK roll. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java
diff --git a/build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java b/build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java
index c04779b4de390221f32fcb2d70c73a912cce98b1..4842a62e114db6b708037119311b0f651fe1d138 100644
--- a/build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java
+++ b/build/android/incremental_install/java/org/chromium/incrementalinstall/ClassLoaderPatcher.java
@@ -4,6 +4,7 @@
package org.chromium.incrementalinstall;
+import android.annotation.SuppressLint;
import android.content.Context;
import android.os.Build;
import android.util.Log;
@@ -40,6 +41,10 @@ final class ClassLoaderPatcher {
/**
* Loads all dex files within |dexDir| into the app's ClassLoader.
*/
+ @SuppressLint({
+ "SetWorldReadable",
+ "SetWorldWritable",
+ })
void loadDexFiles(File dexDir) throws ReflectiveOperationException, FileNotFoundException {
Log.i(TAG, "Installing dex files from: " + dexDir);
File[] dexFilesArr = dexDir.listFiles();
@@ -100,6 +105,7 @@ final class ClassLoaderPatcher {
/**
* Sets up all libraries within |libDir| to be loadable by System.loadLibrary().
*/
+ @SuppressLint("SetWorldReadable")
void importNativeLibs(File libDir) throws ReflectiveOperationException, IOException {
Log.i(TAG, "Importing native libraries from: " + libDir);
if (!libDir.exists()) {
@@ -185,6 +191,7 @@ final class ClassLoaderPatcher {
}
}
+ @SuppressLint("SetWorldReadable")
private static boolean copyIfModified(File src, File dest) throws IOException {
long lastModified = src.lastModified();
if (dest.exists() && dest.lastModified() == lastModified) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698