Unhide HyphenEdit related methods
These APIs are necessary to implement hyphenation by third party developers.
Bug: 112327179
Test: atest android.graphics.cts.PaintTest#testSetGetHyphenEdit
Change-Id: I692a56d3d1b15100503eb6d8e0f59d6c5c8af81b
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java
index 128f860..5adb1ca 100644
--- a/core/java/android/text/StaticLayout.java
+++ b/core/java/android/text/StaticLayout.java
@@ -1216,11 +1216,19 @@
}
/**
+ * Returns the packed hyphen edit value for this line.
+ *
+ * You can extract start hyphen edit and end hyphen edit by using
+ * {@link Hyphenator#unpackStartHyphenEdit(int)} and
+ * {@link Hyphenator#unpackEndHyphenEdit(int)}.
+ *
+ * @param lineNumber a line number
+ * @return A packed hyphen edit value.
* @hide
*/
@Override
- public int getHyphen(int line) {
- return mLines[mColumns * line + HYPHEN] & HYPHEN_MASK;
+ public int getHyphen(int lineNumber) {
+ return mLines[mColumns * lineNumber + HYPHEN] & HYPHEN_MASK;
}
/**