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

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

Issue 2499923003: Disable access to secondary dex files. (Closed)
Patch Set: Findbugs Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.incrementalinstall; 5 package org.chromium.incrementalinstall;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.content.Context; 8 import android.content.Context;
9 import android.os.Build; 9 import android.os.Build;
10 import android.util.Log; 10 import android.util.Log;
11 11
12 import org.chromium.base.Reflect;
13
12 import java.io.File; 14 import java.io.File;
13 import java.io.FileInputStream; 15 import java.io.FileInputStream;
14 import java.io.FileNotFoundException; 16 import java.io.FileNotFoundException;
15 import java.io.FileOutputStream; 17 import java.io.FileOutputStream;
16 import java.io.IOException; 18 import java.io.IOException;
17 import java.util.List; 19 import java.util.List;
18 20
19 /** 21 /**
20 * Provides the ability to add native libraries and .dex files to an existing cl ass loader. 22 * Provides the ability to add native libraries and .dex files to an existing cl ass loader.
21 * Tested with Jellybean MR2 - Marshmellow. 23 * Tested with Jellybean MR2 - Marshmellow.
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 mClassLoader, ret); 247 mClassLoader, ret);
246 } else { 248 } else {
247 dexFile = Reflect.invokeMethod(clazz, "loadDexFile", file, optim izedDirectory); 249 dexFile = Reflect.invokeMethod(clazz, "loadDexFile", file, optim izedDirectory);
248 } 250 }
249 ret[curDexElements.length + i] = 251 ret[curDexElements.length + i] =
250 Reflect.newInstance(entryClazz, emptyDir, false, file, dexFi le); 252 Reflect.newInstance(entryClazz, emptyDir, false, file, dexFi le);
251 } 253 }
252 return ret; 254 return ret;
253 } 255 }
254 } 256 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698