Disable hyphenation by in default theme
Test: Added cts tests for default values
Test: atest CtsWidgetTestCases:EditTextTest
Test: atest CtsWidgetTestCases:TextViewTest
Test: atest FrameworksCoreTests:TextViewTest
Bug: 111096709
Change-Id: Ia4d13574557970432fdcd27581ee3fff4ec36c64
diff --git a/core/java/android/text/StaticLayout.java b/core/java/android/text/StaticLayout.java
index 4b78aa2..f25f93e 100644
--- a/core/java/android/text/StaticLayout.java
+++ b/core/java/android/text/StaticLayout.java
@@ -317,10 +317,17 @@
/**
* Set break strategy, useful for selecting high quality or balanced paragraph
* layout options. The default is {@link Layout#BREAK_STRATEGY_SIMPLE}.
+ * <p/>
+ * Enabling hyphenation with either using {@link Layout#HYPHENATION_FREQUENCY_NORMAL} or
+ * {@link Layout#HYPHENATION_FREQUENCY_FULL} while line breaking is set to one of
+ * {@link Layout#BREAK_STRATEGY_BALANCED}, {@link Layout#BREAK_STRATEGY_HIGH_QUALITY}
+ * improves the structure of text layout however has performance impact and requires more
+ * time to do the text layout.
*
* @param breakStrategy break strategy for paragraph layout
* @return this builder, useful for chaining
* @see android.widget.TextView#setBreakStrategy
+ * @see #setHyphenationFrequency(int)
*/
@NonNull
public Builder setBreakStrategy(@BreakStrategy int breakStrategy) {
@@ -333,10 +340,17 @@
* possible values are defined in {@link Layout}, by constants named with the pattern
* {@code HYPHENATION_FREQUENCY_*}. The default is
* {@link Layout#HYPHENATION_FREQUENCY_NONE}.
+ * <p/>
+ * Enabling hyphenation with either using {@link Layout#HYPHENATION_FREQUENCY_NORMAL} or
+ * {@link Layout#HYPHENATION_FREQUENCY_FULL} while line breaking is set to one of
+ * {@link Layout#BREAK_STRATEGY_BALANCED}, {@link Layout#BREAK_STRATEGY_HIGH_QUALITY}
+ * improves the structure of text layout however has performance impact and requires more
+ * time to do the text layout.
*
* @param hyphenationFrequency hyphenation frequency for the paragraph
* @return this builder, useful for chaining
* @see android.widget.TextView#setHyphenationFrequency
+ * @see #setBreakStrategy(int)
*/
@NonNull
public Builder setHyphenationFrequency(@HyphenationFrequency int hyphenationFrequency) {