OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.base; | 5 package org.chromium.base; |
6 | 6 |
7 import org.chromium.base.annotations.CalledByNative; | 7 import org.chromium.base.annotations.CalledByNative; |
8 import org.chromium.base.annotations.MainDex; | 8 import org.chromium.base.annotations.MainDex; |
9 | 9 |
10 /** | 10 /** |
11 * This class provides JNI-related methods to the native library. | 11 * This class provides JNI-related methods to the native library. |
12 */ | 12 */ |
13 @MainDex | 13 @MainDex |
14 public class JNIUtils { | 14 public class JNIUtils { |
15 /** | 15 /** |
16 * This returns a ClassLoader that is capable of loading Chromium Java code.
Such a ClassLoader | 16 * This returns a ClassLoader that is capable of loading Chromium Java code.
Such a ClassLoader |
17 * is needed for the few cases where the JNI mechanism is unable to automati
cally determine the | 17 * is needed for the few cases where the JNI mechanism is unable to automati
cally determine the |
18 * appropriate ClassLoader instance. | 18 * appropriate ClassLoader instance. |
19 */ | 19 */ |
20 @CalledByNative | 20 @CalledByNative |
21 public static Object getClassLoader() { | 21 public static Object getClassLoader() { |
22 return JNIUtils.class.getClassLoader(); | 22 return JNIUtils.class.getClassLoader(); |
23 } | 23 } |
| 24 |
| 25 @CalledByNative |
| 26 public static boolean isMultidexEnabled() { |
| 27 return BuildConfig.isMultidexEnabled(); |
| 28 } |
24 } | 29 } |
OLD | NEW |