summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDeepanshu Gupta <deepanshu@google.com>2015-11-19 20:49:35 +0000
committerDeepanshu Gupta <deepanshu@google.com>2015-11-19 20:49:35 +0000
commit66098964e240e76e6136b4dec3f9cc6234012695 (patch)
tree2d55064c6f8fa6aadc8c5b19088758937568da53 /tools
parent65a834980cdbb9407a3f27e48cd0a8c472182cd6 (diff)
downloadframeworks_base-66098964e240e76e6136b4dec3f9cc6234012695.zip
frameworks_base-66098964e240e76e6136b4dec3f9cc6234012695.tar.gz
frameworks_base-66098964e240e76e6136b4dec3f9cc6234012695.tar.bz2
Revert "Revert "Update StaticLayout_Delegate to use new nLoadHyphenator""
This reverts commit 65a834980cdbb9407a3f27e48cd0a8c472182cd6. The original revert was only for cherry-pick to release branch. Change-Id: Ib78f9a06ce49681c767f65b262058f18a670e38e
Diffstat (limited to 'tools')
-rw-r--r--tools/layoutlib/bridge/src/android/text/Hyphenator_Delegate.java5
-rw-r--r--tools/layoutlib/bridge/src/android/text/StaticLayout_Delegate.java5
2 files changed, 6 insertions, 4 deletions
diff --git a/tools/layoutlib/bridge/src/android/text/Hyphenator_Delegate.java b/tools/layoutlib/bridge/src/android/text/Hyphenator_Delegate.java
index 5a59597..44ce731 100644
--- a/tools/layoutlib/bridge/src/android/text/Hyphenator_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/text/Hyphenator_Delegate.java
@@ -20,9 +20,10 @@ import com.android.layoutlib.bridge.impl.DelegateManager;
import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
import java.io.File;
+import java.nio.ByteBuffer;
/**
- * Delegate that overrides implementation for certain methods in {@link android.text.StaticLayout}
+ * Delegate that overrides implementation for certain methods in {@link android.text.Hyphenator}
* <p/>
* Through the layoutlib_create tool, selected methods of StaticLayout have been replaced
* by calls to methods of the same name in this delegate class.
@@ -38,7 +39,7 @@ public class Hyphenator_Delegate {
return null;
}
- /*package*/ static long loadHyphenator(String patternData) {
+ /*package*/ static long loadHyphenator(ByteBuffer buf, int offset) {
return sDelegateManager.addNewDelegate(new Hyphenator_Delegate());
}
}
diff --git a/tools/layoutlib/bridge/src/android/text/StaticLayout_Delegate.java b/tools/layoutlib/bridge/src/android/text/StaticLayout_Delegate.java
index 1b0ba51..65c0a07 100644
--- a/tools/layoutlib/bridge/src/android/text/StaticLayout_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/text/StaticLayout_Delegate.java
@@ -13,6 +13,7 @@ import android.icu.util.ULocale;
import android.text.Primitive.PrimitiveType;
import android.text.StaticLayout.LineBreaks;
+import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -52,8 +53,8 @@ public class StaticLayout_Delegate {
}
@LayoutlibDelegate
- /*package*/ static long nLoadHyphenator(String patternData) {
- return Hyphenator_Delegate.loadHyphenator(patternData);
+ /*package*/ static long nLoadHyphenator(ByteBuffer buf, int offset) {
+ return Hyphenator_Delegate.loadHyphenator(buf, offset);
}
@LayoutlibDelegate