Merge "Revert "Revert "Update StaticLayout_Delegate to use new nLoadHyphenator""" into mnc-ub-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
35f7562495
@@ -20,9 +20,10 @@ import com.android.layoutlib.bridge.impl.DelegateManager;
|
|||||||
import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
|
import com.android.tools.layoutlib.annotations.LayoutlibDelegate;
|
||||||
|
|
||||||
import java.io.File;
|
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/>
|
* <p/>
|
||||||
* Through the layoutlib_create tool, selected methods of StaticLayout have been replaced
|
* Through the layoutlib_create tool, selected methods of StaticLayout have been replaced
|
||||||
* by calls to methods of the same name in this delegate class.
|
* by calls to methods of the same name in this delegate class.
|
||||||
@@ -38,7 +39,7 @@ public class Hyphenator_Delegate {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*package*/ static long loadHyphenator(String patternData) {
|
/*package*/ static long loadHyphenator(ByteBuffer buf, int offset) {
|
||||||
return sDelegateManager.addNewDelegate(new Hyphenator_Delegate());
|
return sDelegateManager.addNewDelegate(new Hyphenator_Delegate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import android.icu.util.ULocale;
|
|||||||
import android.text.Primitive.PrimitiveType;
|
import android.text.Primitive.PrimitiveType;
|
||||||
import android.text.StaticLayout.LineBreaks;
|
import android.text.StaticLayout.LineBreaks;
|
||||||
|
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -52,8 +53,8 @@ public class StaticLayout_Delegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@LayoutlibDelegate
|
@LayoutlibDelegate
|
||||||
/*package*/ static long nLoadHyphenator(String patternData) {
|
/*package*/ static long nLoadHyphenator(ByteBuffer buf, int offset) {
|
||||||
return Hyphenator_Delegate.loadHyphenator(patternData);
|
return Hyphenator_Delegate.loadHyphenator(buf, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
@LayoutlibDelegate
|
@LayoutlibDelegate
|
||||||
|
|||||||
Reference in New Issue
Block a user