1# Copyright 2019 The Chromium Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5NATIVE_LIBRARIES_TEMPLATE = """\ 6// This file is autogenerated by 7// build/android/gyp/write_native_libraries_java.py 8// Please do not change its content. 9 10package org.chromium.base.library_loader; 11 12public class NativeLibraries {{ 13 public static final int CPU_FAMILY_UNKNOWN = 0; 14 public static final int CPU_FAMILY_ARM = 1; 15 public static final int CPU_FAMILY_MIPS = 2; 16 public static final int CPU_FAMILY_X86 = 3; 17 18 // Set to true to enable the use of the Chromium Linker. 19 public static {MAYBE_FINAL}boolean sUseLinker{USE_LINKER}; 20 public static {MAYBE_FINAL}boolean sUseLibraryInZipFile{USE_LIBRARY_IN_ZIP_FILE}; 21 public static {MAYBE_FINAL}boolean sUseModernLinker{USE_MODERN_LINKER}; 22 23 // This is the list of native libraries to be loaded (in the correct order) 24 // by LibraryLoader.java. 25 // TODO(cjhopman): This is public since it is referenced by NativeTestActivity.java 26 // directly. The two ways of library loading should be refactored into one. 27 public static {MAYBE_FINAL}String[] LIBRARIES = {{{LIBRARIES}}}; 28 29 // This is the expected version of the 'main' native library, which is the one that 30 // implements the initial set of base JNI functions including 31 // base::android::nativeGetVersionName() 32 // TODO(torne): This is public to work around classloader issues in Trichrome 33 // where NativeLibraries is not in the same dex as LibraryLoader. 34 // We should instead split up Java code along package boundaries. 35 public static {MAYBE_FINAL}String sVersionNumber = {VERSION_NUMBER}; 36 37 public static {MAYBE_FINAL}int sCpuFamily = {CPU_FAMILY}; 38}} 39""" 40