/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/ |
D | DeviceStateToLayoutMapTest.java | 30 import com.android.server.display.layout.Layout; 66 Layout configLayout = mDeviceStateToLayoutMap.get(0); in testInitialState() 68 Layout testLayout = new Layout(); in testInitialState() 85 Layout configLayout = mDeviceStateToLayoutMap.get(1); in testSwitchedState() 87 Layout testLayout = new Layout(); in testSwitchedState() 98 Layout configLayout = mDeviceStateToLayoutMap.get(2); in testThermalBrightnessThrottlingMapId() 106 Layout configLayout = mDeviceStateToLayoutMap.get(5); in testPowerThrottlingMapId() 114 Layout configLayout = mDeviceStateToLayoutMap.get(2); in testRearDisplayLayout() 116 assertEquals(Layout.Display.POSITION_FRONT, configLayout.getAt(0).getPosition()); in testRearDisplayLayout() 117 assertEquals(Layout.Display.POSITION_REAR, configLayout.getAt(1).getPosition()); in testRearDisplayLayout() [all …]
|
/frameworks/base/core/java/android/text/ |
D | AndroidBidi.java | 22 import android.text.Layout.Directions; 49 case Layout.DIR_REQUEST_LTR: paraLevel = Bidi.LTR; break; in bidi() 50 case Layout.DIR_REQUEST_RTL: paraLevel = Bidi.RTL; break; in bidi() 51 case Layout.DIR_REQUEST_DEFAULT_LTR: paraLevel = Bidi.LEVEL_DEFAULT_LTR; break; in bidi() 52 case Layout.DIR_REQUEST_DEFAULT_RTL: paraLevel = Bidi.LEVEL_DEFAULT_RTL; break; in bidi() 61 return (result & 0x1) == 0 ? Layout.DIR_LEFT_TO_RIGHT : Layout.DIR_RIGHT_TO_LEFT; in bidi() 79 return Layout.DIRS_ALL_LEFT_TO_RIGHT; in directions() 82 int baseLevel = dir == Layout.DIR_LEFT_TO_RIGHT ? 0 : 1; in directions() 119 return Layout.DIRS_ALL_RIGHT_TO_LEFT; in directions() 121 return Layout.DIRS_ALL_LEFT_TO_RIGHT; in directions() [all …]
|
D | PrecomputedText.java | 96 private final @Layout.BreakStrategy int mBreakStrategy; 99 private final @Layout.HyphenationFrequency int mHyphenationFrequency; 115 private @Layout.BreakStrategy int mBreakStrategy = Layout.BREAK_STRATEGY_HIGH_QUALITY; 118 private @Layout.HyphenationFrequency int mHyphenationFrequency = 119 Layout.HYPHENATION_FREQUENCY_NORMAL; 154 public Builder setBreakStrategy(@Layout.BreakStrategy int strategy) { in setBreakStrategy() 169 public Builder setHyphenationFrequency(@Layout.HyphenationFrequency int frequency) { in setHyphenationFrequency() 217 @Layout.BreakStrategy int strategy, in Params() 218 @Layout.HyphenationFrequency int frequency) { in Params() 249 public @Layout.BreakStrategy int getBreakStrategy() { in getBreakStrategy() [all …]
|
D | Selection.java | 199 public static boolean moveUp(Spannable text, Layout layout) { in moveUp() 233 private static void setSelectionAndMemory(Spannable text, Layout layout, int line, int end, in setSelectionAndMemory() 270 public static boolean moveDown(Spannable text, Layout layout) { in moveDown() 306 public static boolean moveLeft(Spannable text, Layout layout) { in moveLeft() 331 public static boolean moveRight(Spannable text, Layout layout) { in moveRight() 359 public static boolean moveToParagraphStart(@NonNull Spannable text, @NonNull Layout layout) { in moveToParagraphStart() 386 public static boolean moveToParagraphEnd(@NonNull Spannable text, @NonNull Layout layout) { in moveToParagraphEnd() 448 public static boolean extendUp(Spannable text, Layout layout) { in extendUp() 467 public static boolean extendDown(Spannable text, Layout layout) { in extendDown() 486 public static boolean extendLeft(Spannable text, Layout layout) { in extendLeft() [all …]
|
D | MeasuredParagraph.java | 39 import android.text.Layout.Directions; 111 private @Layout.Direction int mParaDir; 201 public @Layout.Direction int getParagraphDir() { in getParagraphDir() 204 return Layout.DIR_LEFT_TO_RIGHT; in getParagraphDir() 207 ? Layout.DIR_LEFT_TO_RIGHT : Layout.DIR_RIGHT_TO_LEFT; in getParagraphDir() 223 return Layout.DIRS_ALL_LEFT_TO_RIGHT; in getDirections() 230 return Layout.DIRS_ALL_LEFT_TO_RIGHT; in getDirections() 232 return Layout.DIRS_ALL_RIGHT_TO_LEFT; in getDirections() 243 return Layout.DIRS_ALL_RIGHT_TO_LEFT; in getDirections() 245 return Layout.DIRS_ALL_LEFT_TO_RIGHT; in getDirections() [all …]
|
/frameworks/base/apct-tests/perftests/core/src/android/text/ |
D | PrecomputedTextPerfTest.java | 57 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED) in testCreate_NoStyled_Hyphenation() 58 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testCreate_NoStyled_Hyphenation() 74 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testCreate_NoStyled_NoHyphenation() 75 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testCreate_NoStyled_NoHyphenation() 91 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED) in testCreate_NoStyled_Hyphenation_WidthOnly() 92 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testCreate_NoStyled_Hyphenation_WidthOnly() 108 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testCreate_NoStyled_NoHyphenation_WidthOnly() 109 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testCreate_NoStyled_NoHyphenation_WidthOnly() 125 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED) in testCreate_Styled_Hyphenation() 126 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testCreate_Styled_Hyphenation() [all …]
|
D | PrecomputedTextMemoryUsageTest.java | 66 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testMemoryUsage_Latin_NoHyphenation() 67 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testMemoryUsage_Latin_NoHyphenation() 84 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED) in testMemoryUsage_Latin_Hyphenation() 85 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testMemoryUsage_Latin_Hyphenation() 102 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testMemoryUsage_CJK_NoHyphenation() 103 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testMemoryUsage_CJK_NoHyphenation() 120 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED) in testMemoryUsage_CJK_Hyphenation() 121 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testMemoryUsage_CJK_Hyphenation() 139 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testMemoryUsage_Arabic_NoHyphenation() 140 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testMemoryUsage_Arabic_NoHyphenation() [all …]
|
D | StaticLayoutPerfTest.java | 102 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testCreate_FixedText_NoStyle_Greedy_NoHyphenation() 103 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testCreate_FixedText_NoStyle_Greedy_NoHyphenation() 117 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testCreate_RandomText_NoStyled_Greedy_NoHyphenation() 118 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testCreate_RandomText_NoStyled_Greedy_NoHyphenation() 132 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testCreate_RandomText_NoStyled_Greedy_Hyphenation() 133 .setBreakStrategy(Layout.BREAK_STRATEGY_SIMPLE) in testCreate_RandomText_NoStyled_Greedy_Hyphenation() 147 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NONE) in testCreate_RandomText_NoStyled_Balanced_NoHyphenation() 148 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED) in testCreate_RandomText_NoStyled_Balanced_NoHyphenation() 162 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testCreate_RandomText_NoStyled_Balanced_Hyphenation() 163 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED) in testCreate_RandomText_NoStyled_Balanced_Hyphenation() [all …]
|
/frameworks/base/apct-tests/perftests/core/src/android/widget/ |
D | TextViewPrecomputedTextPerfTest.java | 28 import android.text.Layout; 92 textView.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED); in testNewLayout_RandomText() 93 textView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL); in testNewLayout_RandomText() 112 textView.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED); in testNewLayout_RandomText_Selectable() 113 textView.setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL); in testNewLayout_RandomText_Selectable() 130 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testNewLayout_PrecomputedText() 131 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED).build(); in testNewLayout_PrecomputedText() 152 .setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_NORMAL) in testNewLayout_PrecomputedText_Selectable() 153 .setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED).build(); in testNewLayout_PrecomputedText_Selectable() 176 textView.setBreakStrategy(Layout.BREAK_STRATEGY_BALANCED); in testSetText_RandomText() [all …]
|
/frameworks/base/core/java/android/text/style/ |
D | AlignmentSpan.java | 21 import android.text.Layout; 35 Layout.Alignment getAlignment(); in getAlignment() 57 private final Layout.Alignment mAlignment; 62 public Standard(@NonNull Layout.Alignment align) { in Standard() 70 mAlignment = Layout.Alignment.valueOf(src.readString()); in Standard() 101 public Layout.Alignment getAlignment() { in getAlignment()
|
D | LeadingMarginSpan.java | 22 import android.text.Layout; 71 boolean first, Layout layout); in drawLeadingMargin() 158 boolean first, Layout layout) { in drawLeadingMargin()
|
/frameworks/base/core/tests/coretests/src/android/text/ |
D | TextLineJustificationTest.kt | 40 set(paint, cs, 0, cs.length, Layout.DIR_LEFT_TO_RIGHT, Layout.DIRS_ALL_LEFT_TO_RIGHT, false, in <lambda>() 66 val originalWidth = Layout.getDesiredWidth(line, PAINT) in justifyTest_IntrCharacter_Latin() 70 tl.justify(Layout.JUSTIFICATION_MODE_INTER_CHARACTER, originalWidth + extraWidth) in justifyTest_IntrCharacter_Latin() 83 val originalWidth = Layout.getDesiredWidth(line, PAINT) in justifyTest_IntrCharacter_Japanese() 87 tl.justify(Layout.JUSTIFICATION_MODE_INTER_CHARACTER, originalWidth + extraWidth) in justifyTest_IntrCharacter_Japanese() 99 val originalWidth = Layout.getDesiredWidth(line, PAINT) in justifyTest_IntrWord_Latin() 103 tl.justify(Layout.JUSTIFICATION_MODE_INTER_WORD, originalWidth + extraWidth) in justifyTest_IntrWord_Latin() 116 val originalWidth = Layout.getDesiredWidth(line, PAINT) in justifyTest_IntrWord_Japanese() 120 tl.justify(Layout.JUSTIFICATION_MODE_INTER_WORD, originalWidth + extraWidth) in justifyTest_IntrWord_Japanese()
|
D | TextLineLetterSpacingTest.kt | 47 assertThat(TextLine.calculateRunFlag(0, 1, Layout.DIR_LEFT_TO_RIGHT)) in calculateRunFlagTest() 49 assertThat(TextLine.calculateRunFlag(0, 1, Layout.DIR_RIGHT_TO_LEFT)) in calculateRunFlagTest() 54 assertThat(TextLine.calculateRunFlag(0, 2, Layout.DIR_LEFT_TO_RIGHT)) in calculateRunFlagTest() 57 assertThat(TextLine.calculateRunFlag(1, 2, Layout.DIR_LEFT_TO_RIGHT)) in calculateRunFlagTest() 60 assertThat(TextLine.calculateRunFlag(0, 2, Layout.DIR_RIGHT_TO_LEFT)) in calculateRunFlagTest() 63 assertThat(TextLine.calculateRunFlag(1, 2, Layout.DIR_RIGHT_TO_LEFT)) in calculateRunFlagTest() 68 assertThat(TextLine.calculateRunFlag(0, 3, Layout.DIR_LEFT_TO_RIGHT)) in calculateRunFlagTest() 71 assertThat(TextLine.calculateRunFlag(1, 3, Layout.DIR_LEFT_TO_RIGHT)) in calculateRunFlagTest() 74 assertThat(TextLine.calculateRunFlag(2, 3, Layout.DIR_LEFT_TO_RIGHT)) in calculateRunFlagTest() 77 assertThat(TextLine.calculateRunFlag(0, 3, Layout.DIR_RIGHT_TO_LEFT)) in calculateRunFlagTest() [all …]
|
D | LayoutTest.java | 41 import android.text.Layout.Alignment; 80 private Layout.Alignment mAlign; 109 Layout layout = new MockLayout(text, mTextPaint, mWidth, in testGetText() 119 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, in testGetPaint() 130 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 10, in testGetWidth() 140 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, 15, in testGetEllipsizedWidth() 150 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, in testIncreaseWidthTo() 169 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, in testGetHeight() 176 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, in testGetAlignment() 186 Layout layout = new MockLayout(LAYOUT_TEXT, mTextPaint, mWidth, mAlign, -1, mSpacingAdd); in testGetSpacingMultiplier() [all …]
|
D | StaticLayoutTest.java | 19 import static android.text.Layout.Alignment.ALIGN_NORMAL; 29 import android.text.Layout.Alignment; 112 Layout l = b.build(); in testGetters1() 118 assertEquals(Layout.DIR_LEFT_TO_RIGHT, l.getParagraphDirection(0)); in testGetters1() 120 assertEquals(Layout.DIRS_ALL_LEFT_TO_RIGHT, l.getLineDirections(0)); in testGetters1() 136 Layout l = b.build(); in testLineMetrics_withPadding() 152 Layout l = b.build(); in testLineMetrics_withPaddingAndWidth() 172 Layout l = b.build(); in testLineMetrics_withThreeLines() 202 Layout l = b.build(); in testLineMetrics_withLargeText() 225 Layout l = b.build(); in testLineMetrics_withSpacingAdd() [all …]
|
D | StaticLayoutDirectionsTest.java | 22 import android.text.Layout.Directions; 140 Layout l = b.build(); in testTrailingWhitespace() 145 Directions expected = dirs(0, LVL1_1, 1, LVL2_1, 2, 3 | (1 << Layout.RUN_LEVEL_SHIFT)); in testTrailingWhitespace() 161 Layout l = b.build(); in testNextToRightOf() 178 Layout l = b.build(); in testNextToLeftOf() 204 private void checkDirections(Layout l, int i, String text, in checkDirections()
|
/frameworks/base/services/core/java/com/android/server/display/ |
D | DeviceStateToLayoutMap.java | 32 import com.android.server.display.layout.Layout; 57 private static final int POSITION_UNKNOWN = Layout.Display.POSITION_UNKNOWN; 58 private static final int POSITION_FRONT = Layout.Display.POSITION_FRONT; 59 private static final int POSITION_REAR = Layout.Display.POSITION_REAR; 70 private final SparseArray<Layout> mLayoutMap = new SparseArray<>(); 107 Layout get(int state) { in get() 108 Layout layout = mLayoutMap.get(state); in get() 135 for (com.android.server.display.config.layout.Layout l : layouts.getLayout()) { in loadLayoutsFromConfig() 137 final Layout layout = createLayout(state); in loadLayoutsFromConfig() 192 private Layout createLayout(int state) { in createLayout() [all …]
|
/frameworks/minikin/tests/unittest/ |
D | LayoutTest.cpp | 71 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F() 90 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F() 109 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F() 128 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F() 159 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F() 178 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F() 198 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F() 219 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F() 253 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F() 272 Layout layout(text, range, Bidi::LTR, paint, StartHyphenEdit::NO_EDIT, in TEST_F() [all …]
|
/frameworks/base/core/java/android/text/method/ |
D | ArrowKeyMovementMethod.java | 21 import android.text.Layout; 39 private static int getCurrentLineTop(Spannable buffer, Layout layout) { in getCurrentLineTop() 74 final Layout layout = widget.getLayout(); in left() 87 final Layout layout = widget.getLayout(); in right() 100 final Layout layout = widget.getLayout(); in up() 113 final Layout layout = widget.getLayout(); in down() 126 final Layout layout = widget.getLayout(); in pageUp() 153 final Layout layout = widget.getLayout(); in pageDown() 200 final Layout layout = widget.getLayout(); in lineStart() 213 final Layout layout = widget.getLayout(); in lineEnd() [all …]
|
/frameworks/minikin/include/minikin/ |
D | Layout.h | 35 class Layout; variable 87 class Layout { 89 Layout(const U16StringPiece& str, const Range& range, Bidi bidiFlags, const MinikinPaint& paint, in Layout() function 97 Layout(const U16StringPiece& str, const Range& range, Bidi bidiFlags, const MinikinPaint& paint, in Layout() function 103 Layout(uint32_t count) : mAdvance(0) { in Layout() function 188 Layout* layout, float* advances, MinikinRect* bounds, 194 StartHyphenEdit startHyphen, EndHyphenEdit endHyphen, Layout* layout, 211 inline std::ostream& operator<<(std::ostream& os, const Layout& l) {
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | ImageFloatingTextView.java | 24 import android.text.Layout; 75 setHyphenationFrequency(Layout.HYPHENATION_FREQUENCY_FULL_FAST); in ImageFloatingTextView() 76 setBreakStrategy(Layout.BREAK_STRATEGY_HIGH_QUALITY); in ImageFloatingTextView() 82 protected Layout makeSingleLayout(int wantWidth, BoringLayout.Metrics boring, int ellipsisWidth, in makeSingleLayout() 83 Layout.Alignment alignment, boolean shouldEllipsize, in makeSingleLayout() 178 Layout layout = getLayout(); in onMeasure()
|
/frameworks/minikin/libs/minikin/ |
D | Layout.cpp | 193 void Layout::doLayout(const U16StringPiece& textBuf, const Range& range, Bidi bidiFlags, in doLayout() 210 float Layout::measureText(const U16StringPiece& textBuf, const Range& range, Bidi bidiFlags, in measureText() 245 float Layout::doLayoutRunCached(const U16StringPiece& textBuf, const Range& range, bool isRtl, in doLayoutRunCached() 248 Layout* layout, float* advances, MinikinRect* bounds, in doLayoutRunCached() 279 LayoutAppendFunctor(Layout* layout, float* advances, uint32_t outOffset, float wordSpacing, in LayoutAppendFunctor() 307 Layout* mLayout; 316 float Layout::doLayoutWord(const uint16_t* buf, size_t start, size_t count, size_t bufSize, in doLayoutWord() 318 StartHyphenEdit startHyphen, EndHyphenEdit endHyphen, Layout* layout, in doLayoutWord() 343 void Layout::appendLayout(const LayoutPiece& src, size_t start, float extraAdvance) { in appendLayout() 358 void Layout::purgeCaches() { in purgeCaches()
|
/frameworks/base/libs/hwui/hwui/ |
D | MinikinUtils.h | 45 static minikin::Layout doLayout(const Paint* paint, minikin::Bidi bidiFlags, 65 static float xOffsetForTextAlign(Paint* paint, const minikin::Layout& layout); 67 static float hOffsetForTextAlign(Paint* paint, const minikin::Layout& layout, 71 static void forFontRun(const minikin::Layout& layout, Paint* paint, F& f) { in forFontRun()
|
/frameworks/base/core/tests/coretests/src/android/widget/ |
D | TextViewPopulateCharacterBoundsTest.java | 32 import android.text.Layout; 102 final Layout layout = textView.getLayout(); in testPopulateCharacterBounds_LTR() 131 final Layout layout = textView.getLayout(); in testPopulateCharacterBounds_LTR_multiline() 161 final Layout layout = textView.getLayout(); in testPopulateCharacterBounds_LTR_newline() 194 final Layout layout = textView.getLayout(); in testPopulateCharacterBounds_RTL() 223 final Layout layout = textView.getLayout(); in testPopulateCharacterBounds_RTL_multiline() 253 final Layout layout = textView.getLayout(); in testPopulateCharacterBounds_RTL_newline() 287 final Layout layout = textView.getLayout(); in testPopulateCharacterBounds_BiDi() 320 final Layout layout = textView.getLayout(); in testPopulateCharacterBounds_BiDi_multiline() 348 final Layout layout = textView.getLayout(); in testPopulateCharacterBounds_charactersWithInvisibleRegion() [all …]
|
/frameworks/base/tools/aapt2/xml/ |
D | XmlDom_test.cpp | 44 </Layout>)"; in TEST() 61 doc->root->name = "Layout"; in TEST() 90 EXPECT_THAT(new_doc->root->name, StrEq("Layout")); in TEST()
|