| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |