summaryrefslogtreecommitdiff
path: root/layoutlib
diff options
context:
space:
mode:
authorJerome Gaillard <jgaillard@google.com>2019-06-03 16:26:51 +0100
committerJerome Gaillard <jgaillard@google.com>2019-06-24 13:30:14 +0000
commite1f696fa6c87103d7426ef2f7fe590549675e485 (patch)
tree9d15605eaa21efad6307bc45042ef8c179a660a2 /layoutlib
parent5a777380e8981799504acfcc512167ec79f88603 (diff)
downloadidea-e1f696fa6c87103d7426ef2f7fe590549675e485.tar.gz
Add argument for native library location in Bridge.init
This will be used to pass the location of the native library linked to layoutlib. Bug: 117921091 Test: N/A Change-Id: Ib5ec5a6040e934c68fc6902fc7cd2ed3860f1b6b
Diffstat (limited to 'layoutlib')
-rw-r--r--layoutlib/src/com/android/tools/idea/layoutlib/LayoutLibrary.java4
-rw-r--r--layoutlib/src/com/android/tools/idea/layoutlib/LayoutLibraryLoader.java2
2 files changed, 4 insertions, 2 deletions
diff --git a/layoutlib/src/com/android/tools/idea/layoutlib/LayoutLibrary.java b/layoutlib/src/com/android/tools/idea/layoutlib/LayoutLibrary.java
index 45f31553da9..d99aa6ac129 100644
--- a/layoutlib/src/com/android/tools/idea/layoutlib/LayoutLibrary.java
+++ b/layoutlib/src/com/android/tools/idea/layoutlib/LayoutLibrary.java
@@ -149,6 +149,7 @@ public class LayoutLibrary implements Disposable {
*
* @param platformProperties The build properties for the platform.
* @param fontLocation the location of the fonts in the SDK target.
+ * @param nativeLibPath the absolute path of the JNI library for layoutlib.
* @param icuDataPath the location of the ICU data used natively.
* @param enumValueMap map attrName ⇒ { map enumFlagName ⇒ Integer value }. This is typically
* read from attrs.xml in the SDK target.
@@ -157,11 +158,12 @@ public class LayoutLibrary implements Disposable {
*/
public boolean init(Map<String, String> platformProperties,
File fontLocation,
+ String nativeLibPath,
String icuDataPath,
Map<String, Map<String, Integer>> enumValueMap,
LayoutLog log) {
if (mBridge != null) {
- return mBridge.init(platformProperties, fontLocation, icuDataPath, enumValueMap, log);
+ return mBridge.init(platformProperties, fontLocation, nativeLibPath, icuDataPath, enumValueMap, log);
}
return false;
diff --git a/layoutlib/src/com/android/tools/idea/layoutlib/LayoutLibraryLoader.java b/layoutlib/src/com/android/tools/idea/layoutlib/LayoutLibraryLoader.java
index f0cfbd25ba2..9883a43ffd3 100644
--- a/layoutlib/src/com/android/tools/idea/layoutlib/LayoutLibraryLoader.java
+++ b/layoutlib/src/com/android/tools/idea/layoutlib/LayoutLibraryLoader.java
@@ -83,7 +83,7 @@ public class LayoutLibraryLoader {
final Map<String, String> buildPropMap = ProjectProperties.parsePropertyFile(new BufferingFileWrapper(buildProp), logger);
final LayoutLog layoutLog = new LayoutLogWrapper(LOG);
- if (library.init(buildPropMap, new File(fontFolder.getPath()), null, enumMap, layoutLog)) {
+ if (library.init(buildPropMap, new File(fontFolder.getPath()), null, null, enumMap, layoutLog)) {
return library;
} else {
return null;