/frameworks/base/core/java/android/text/style/ |
D | SpanUtils.java | 57 for (StyleSpan span : boldSpans) { in toggleBold() 58 if ((span.getStyle() & Typeface.BOLD) == Typeface.BOLD) { in toggleBold() 59 filteredBoldSpans.add(span); in toggleBold() 72 final StyleSpan span = filteredBoldSpans.get(si); in toggleBold() local 73 final int start = spannable.getSpanStart(span); in toggleBold() 74 final int end = spannable.getSpanEnd(span); in toggleBold() 75 final int flag = spannable.getSpanFlags(span); in toggleBold() 78 final boolean needItalicSpan = (span.getStyle() & Typeface.ITALIC) == Typeface.ITALIC; in toggleBold() 85 spannable.setSpan(span, start, min, flag); in toggleBold() 86 spannable.setSpan(new StyleSpan(span.getStyle()), max, end, flag); in toggleBold() [all …]
|
/frameworks/ex/widget/java/com/android/ex/widget/ |
D | StaggeredGridView.java | 139 public int span; field in StaggeredGridView.LayoutRecord 146 mMargins = new int[span * 2]; in ensureMargins() 183 " s=" + span; in toString() 519 final int colEnd = lp.column + Math.min(mColCount, lp.span); in recycleOffscreenViews() 774 final int span = Math.min(mColCount, lp.span); in layoutChildren() local 775 final int widthSize = colWidth * span + itemMargin * (span - 1); in layoutChildren() 792 if (span > 1) { in layoutChildren() 794 for (int j = col + 1; j < col + span; j++) { in layoutChildren() 808 for (int j = col; j < col + span; j++) { in layoutChildren() 819 if (rec != null && rec.span != span) { in layoutChildren() [all …]
|
/frameworks/opt/setupwizard/library/platform/src/com/android/setupwizardlib/view/ |
D | RichTextView.java | 30 import com.android.setupwizardlib.span.LinkSpan; 31 import com.android.setupwizardlib.span.LinkSpan.OnLinkClickListener; 32 import com.android.setupwizardlib.span.SpanHelper; 68 for (Annotation span : spans) { in getRichText() 69 final String key = span.getKey(); in getRichText() 71 String textAppearance = span.getValue(); in getRichText() 80 SpanHelper.replaceSpan(spannable, span, textAppearanceSpan); in getRichText() 82 LinkSpan link = new LinkSpan(span.getValue()); in getRichText() 83 SpanHelper.replaceSpan(spannable, span, link); in getRichText() 169 public boolean onLinkClick(LinkSpan span) { in onLinkClick() argument [all …]
|
/frameworks/opt/setupwizard/library/gingerbread/src/com/android/setupwizardlib/util/ |
D | LinkAccessibilityHelper.java | 178 for (ClickableSpan span : linkSpans) { in getVisibleVirtualViews() 179 virtualViewIds.add(spannedText.getSpanStart(span)); in getVisibleVirtualViews() 186 final ClickableSpan span = getSpanForOffset(virtualViewId); in onPopulateEventForVirtualView() local 187 if (span != null) { in onPopulateEventForVirtualView() 188 event.setContentDescription(getTextForSpan(span)); in onPopulateEventForVirtualView() 198 final ClickableSpan span = getSpanForOffset(virtualViewId); in onPopulateNodeForVirtualView() local 199 if (span != null) { in onPopulateNodeForVirtualView() 200 info.setContentDescription(getTextForSpan(span)); in onPopulateNodeForVirtualView() 207 getBoundsForSpan(span, tempRect); in onPopulateNodeForVirtualView() 220 ClickableSpan span = getSpanForOffset(virtualViewId); in onPerformActionForVirtualView() local [all …]
|
/frameworks/opt/setupwizard/library/gingerbread/src/com/android/setupwizardlib/view/ |
D | RichTextView.java | 34 import com.android.setupwizardlib.span.LinkSpan; 35 import com.android.setupwizardlib.span.LinkSpan.OnLinkClickListener; 36 import com.android.setupwizardlib.span.SpanHelper; 68 for (Annotation span : spans) { in getRichText() 69 final String key = span.getKey(); in getRichText() 71 String textAppearance = span.getValue(); in getRichText() 80 SpanHelper.replaceSpan(spannable, span, textAppearanceSpan); in getRichText() 82 LinkSpan link = new LinkSpan(span.getValue()); in getRichText() 83 SpanHelper.replaceSpan(spannable, span, link); in getRichText() 209 public boolean onLinkClick(LinkSpan span) { in onLinkClick() argument [all …]
|
/frameworks/native/include/input/ |
D | TfLiteMotionPredictor.h | 133 std::span<float> inputR(); 134 std::span<float> inputPhi(); 135 std::span<float> inputPressure(); 136 std::span<float> inputOrientation(); 137 std::span<float> inputTilt(); 141 std::span<const float> outputR() const; 142 std::span<const float> outputPhi() const; 143 std::span<const float> outputPressure() const;
|
/frameworks/base/services/core/java/com/android/server/power/stats/ |
D | PowerStatsStore.java | 134 public void storePowerStatsSpan(PowerStatsSpan span) { in storePowerStatsSpan() argument 145 AtomicFile file = new AtomicFile(makePowerStatsSpanFilename(span.getId())); in storePowerStatsSpan() 148 span.writeXml(out, Xml.newBinarySerializer()); in storePowerStatsSpan() 183 PowerStatsSpan span = createPowerStatsSpan(stats); in storeAggregatedPowerStats() local 184 if (span == null) { in storeAggregatedPowerStats() 187 storePowerStatsSpan(span); in storeAggregatedPowerStats() 199 PowerStatsSpan span = new PowerStatsSpan(monotonicTime); in createPowerStatsSpan() local 208 span.addTimeFrame(clockUpdate.monotonicTime, clockUpdate.currentTime, duration); in createPowerStatsSpan() 213 span.addSection(new AggregatedPowerStatsSection(stats)); in createPowerStatsSpan() 214 return span; in createPowerStatsSpan() [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/communal/shared/model/ |
D | CommunalContentSize.kt | 25 enum class CommunalContentSize(val span: Int) { constant in com.android.systemui.communal.shared.model.CommunalContentSize 37 fun toSize(span: Int): CommunalContentSize { in toSize() 38 return entries.find { it.span == span } in toSize()
|
/frameworks/base/core/java/android/widget/ |
D | TableRow.java | 170 for (int j = 0; j < layoutParams.span; j++) { in mapIndexAndColumns() 200 final int span = lp.span; in measureChildBeforeLayout() local 202 for (int i = 0; i < span; i++) { in measureChildBeforeLayout() 260 return layoutParams.span - 1; in getChildrenSkipCount() 300 if (layoutParams.span == 1) { in getColumnsWidths() 410 public int span; field in TableRow.LayoutParams 428 span = a.getInt(com.android.internal.R.styleable.TableRow_Cell_layout_span, 1); in LayoutParams() 429 if (span <= 1) { in LayoutParams() 430 span = 1; in LayoutParams() 445 span = 1; in LayoutParams() [all …]
|
D | GridLayout.java | 705 Interval span = spec.span; in getDefaultMargin() local 707 boolean isAtEdge = leading1 ? (span.min == 0) : (span.max == axis.getCount()); in getDefaultMargin() 728 int index = leading ? spec.span.min : spec.span.max; in getMargin() 783 final Interval majorRange = majorSpec.span; in validateLayoutParams() 791 final Interval minorRange = minorSpec.span; in validateLayoutParams() 867 Interval span = spec.span; in checkLayoutParams() local 868 if (span.min != UNDEFINED && span.min < 0) { in checkLayoutParams() 874 if (span.max > count) { in checkLayoutParams() 878 if (span.size() > count) { in checkLayoutParams() 1056 Interval span = spec.span; in measureChildrenWithMargins() local [all …]
|
/frameworks/base/tools/aapt/ |
D | StringPool.cpp | 207 entry_style_span span; in addStyleSpan() local 208 span.name = name; in addStyleSpan() 209 span.span.firstChar = start; in addStyleSpan() 210 span.span.lastChar = end; in addStyleSpan() 211 return addStyleSpan(idx, span); in addStyleSpan() 226 status_t StringPool::addStyleSpan(size_t idx, const entry_style_span& span) in addStyleSpan() argument 234 style.spans.add(span); in addStyleSpan() 414 entry_style_span& span = style.spans.editItemAt(i); in writeStringBlock() local 415 ssize_t idx = add(span.name, true); in writeStringBlock() 418 String8(span.name).c_str()); in writeStringBlock() [all …]
|
/frameworks/base/core/java/android/text/ |
D | AlteredCharSequence.java | 72 public int getSpanStart(Object span) { in getSpanStart() argument 73 return mSpanned.getSpanStart(span); in getSpanStart() 76 public int getSpanEnd(Object span) { in getSpanEnd() argument 77 return mSpanned.getSpanEnd(span); in getSpanEnd() 80 public int getSpanFlags(Object span) { in getSpanFlags() argument 81 return mSpanned.getSpanFlags(span); in getSpanFlags()
|
D | SpanSet.java | 65 final E span = allSpans[i]; in init() local 67 final int spanStart = spanned.getSpanStart(span); in init() 68 final int spanEnd = spanned.getSpanEnd(span); in init() 71 final int spanFlag = spanned.getSpanFlags(span); in init() 73 spans[numberOfSpans] = span; in init()
|
D | TextUtils.java | 904 final Object span; 907 span = new AlignmentSpan.Standard(p); 911 span = new ForegroundColorSpan(p); 915 span = new RelativeSizeSpan(p); 919 span = new ScaleXSpan(p); 923 span = new StrikethroughSpan(p); 927 span = new UnderlineSpan(p); 931 span = new StyleSpan(p); 935 span = new BulletSpan(p); 939 span = new QuoteSpan(p); [all …]
|
/frameworks/base/core/java/com/android/internal/util/ |
D | ContrastColorUtil.java | 190 for (Object span : spans) { in invertCharSequenceColors() 191 Object resultSpan = span; in invertCharSequenceColors() 193 resultSpan = ((CharacterStyle) span).getUnderlying(); in invertCharSequenceColors() 197 (TextAppearanceSpan) span); in invertCharSequenceColors() 202 resultSpan = span; in invertCharSequenceColors() 209 resultSpan = span; in invertCharSequenceColors() 211 builder.setSpan(resultSpan, ss.getSpanStart(span), ss.getSpanEnd(span), in invertCharSequenceColors() 212 ss.getSpanFlags(span)); in invertCharSequenceColors() 219 private TextAppearanceSpan processTextAppearanceSpan(TextAppearanceSpan span) { in processTextAppearanceSpan() argument 220 ColorStateList colorStateList = span.getTextColor(); in processTextAppearanceSpan() [all …]
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | GridLayoutManager.java | 387 int span = getSpanIndex(recycler, state, anchorInfo.mPosition); in ensureAnchorIsInCorrectSpan() local 390 while (span > 0 && anchorInfo.mPosition > 0) { in ensureAnchorIsInCorrectSpan() 392 span = getSpanIndex(recycler, state, anchorInfo.mPosition); in ensureAnchorIsInCorrectSpan() 398 int bestSpan = span; in ensureAnchorIsInCorrectSpan() 425 final int span = getSpanIndex(recycler, state, position); in findReferenceChild() local 426 if (span != 0) { in findReferenceChild() 760 int span, start, end, diff; in assignSpans() local 771 span = 0; in assignSpans() 776 params.mSpanIndex = span; in assignSpans() 777 span += params.mSpanSize; in assignSpans() [all …]
|
/frameworks/base/core/java/android/view/ |
D | ScaleGestureDetector.java | 355 final float span; in onTouchEvent() local 357 span = spanY; in onTouchEvent() 359 span = (float) Math.hypot(spanX, spanY); in onTouchEvent() 368 if (!inAnchoredScaleMode() && mInProgress && (span < mMinSpan || configChanged)) { in onTouchEvent() 371 mInitialSpan = span; in onTouchEvent() 376 mInitialSpan = mPrevSpan = mCurrSpan = span; in onTouchEvent() 380 if (!mInProgress && span >= minSpan && in onTouchEvent() 381 (wasInProgress || Math.abs(span - mInitialSpan) > mSpanSlop)) { in onTouchEvent() 384 mPrevSpan = mCurrSpan = span; in onTouchEvent() 393 mCurrSpan = span; in onTouchEvent()
|
/frameworks/base/packages/SettingsLib/Spa/spa/src/com/android/settingslib/spa/framework/util/ |
D | AnnotatedStringResource.kt | 52 for (span in text.getSpans(0, text.length, Any::class.java)) { in spannableStringToAnnotatedString() method 53 val start = text.getSpanStart(span) in spannableStringToAnnotatedString() 54 val end = text.getSpanEnd(span) in spannableStringToAnnotatedString() 55 when (span) { in spannableStringToAnnotatedString() 56 is StyleSpan -> addStyleSpan(span, start, end) in spannableStringToAnnotatedString() 57 is URLSpan -> addUrlSpan(span, urlSpanColor, start, end) in spannableStringToAnnotatedString()
|
/frameworks/base/libs/androidfw/tests/ |
D | StringPool_test.cpp | 168 const StringPool::Span& span = ref->spans.front(); in TEST() local 169 EXPECT_THAT(*span.name, Eq("b")); in TEST() 170 EXPECT_THAT(span.first_char, Eq(2u)); in TEST() 171 EXPECT_THAT(span.last_char, Eq(6u)); in TEST() 289 const ResStringPool_span* span = span_result->unsafe_ptr(); in TEST() local 290 EXPECT_THAT(android::util::GetString(test, span->name.index), Eq("b")); in TEST() 291 EXPECT_THAT(android::util::GetString16(test, span->name.index), Eq(u"b")); in TEST() 292 EXPECT_THAT(span->firstChar, Eq(0u)); in TEST() 293 EXPECT_THAT(span->lastChar, Eq(1u)); in TEST() 294 span++; in TEST() [all …]
|
/frameworks/base/tools/aapt2/compile/ |
D | PseudolocaleGenerator.cpp | 61 inline static UnifiedSpan SpanToUnifiedSpan(const android::StringPool::Span& span) { in SpanToUnifiedSpan() argument 62 return UnifiedSpan{*span.name, span.first_char, span.last_char}; in SpanToUnifiedSpan() 151 UnifiedSpan* span = span_idx >= merged_spans.size() ? nullptr : &merged_spans[span_idx]; in PseudolocalizeStyledString() local 154 if (span != nullptr) { in PseudolocalizeStyledString() 155 if (parent_span == nullptr || parent_span->last_char > span->first_char) { in PseudolocalizeStyledString() 158 const StringPiece16 substr = text.substr(cursor, span->first_char - cursor); in PseudolocalizeStyledString() 171 span->first_char = new_cursor; in PseudolocalizeStyledString() 172 if (!span->tag) { in PseudolocalizeStyledString() 215 for (UnifiedSpan& span : merged_spans) { in PseudolocalizeStyledString() 216 if (span.tag) { in PseudolocalizeStyledString() [all …]
|
/frameworks/base/libs/androidfw/ |
D | StringPool.cpp | 134 for (const Span& span : entry_->spans) { in operator ==() local 136 if (span.first_char != rhs_span.first_char || span.last_char != rhs_span.last_char || in operator ==() 137 span.name != rhs_span.name) { in operator ==() 212 for (const android::Span& span : str.spans) { in MakeRef() local 213 entry->spans.emplace_back(Span{MakeRef(span.name), span.first_char, span.last_char}); in MakeRef() 227 for (const Span& span : ref.entry_->spans) { in MakeRef() local 228 entry->spans.emplace_back(Span{MakeRef(*span.name), span.first_char, span.last_char}); in MakeRef() 471 android::ResStringPool_span* span = in Flatten() local 474 span->name.index = util::HostToDevice32(s.name.index()); in Flatten() 475 span->firstChar = util::HostToDevice32(s.first_char); in Flatten() [all …]
|
/frameworks/base/services/tests/powerstatstests/src/com/android/server/power/stats/ |
D | PowerStatsStoreTest.java | 78 PowerStatsSpan span = new PowerStatsSpan(i); in garbageCollectOldSpans() local 79 span.addSection(new TestSection(i, spanSize)); in garbageCollectOldSpans() 80 mPowerStatsStore.storePowerStatsSpan(span); in garbageCollectOldSpans() 97 PowerStatsSpan span = new PowerStatsSpan(i); in reset() local 98 span.addSection(new TestSection(i, 42)); in reset() 99 mPowerStatsStore.storePowerStatsSpan(span); in reset()
|
/frameworks/native/libs/input/ |
D | TfLiteMotionPredictor.cpp | 137 std::span<T> getTensorBuffer(typename std::conditional<std::is_const<T>::value, const TfLiteTensor*, in getTensorBuffer() 146 return std::span<T>(reinterpret_cast<T*>(tensor->data.data), tensor->bytes / sizeof(T)); in getTensorBuffer() 392 std::span<float> TfLiteMotionPredictorModel::inputR() { in inputR() 396 std::span<float> TfLiteMotionPredictorModel::inputPhi() { in inputPhi() 400 std::span<float> TfLiteMotionPredictorModel::inputPressure() { in inputPressure() 404 std::span<float> TfLiteMotionPredictorModel::inputTilt() { in inputTilt() 408 std::span<float> TfLiteMotionPredictorModel::inputOrientation() { in inputOrientation() 412 std::span<const float> TfLiteMotionPredictorModel::outputR() const { in outputR() 416 std::span<const float> TfLiteMotionPredictorModel::outputPhi() const { in outputPhi() 420 std::span<const float> TfLiteMotionPredictorModel::outputPressure() const { in outputPressure()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
D | TextViewTransformState.java | 76 Object span = spans[i]; in hasSameSpans() local 78 if (!span.getClass().equals(otherSpan.getClass())) { in hasSameSpans() 81 if (ownSpanned.getSpanStart(span) != otherSpanned.getSpanStart(otherSpan) in hasSameSpans() 82 || ownSpanned.getSpanEnd(span) != otherSpanned.getSpanEnd(otherSpan)) { in hasSameSpans()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/floatingmenu/ |
D | AnnotationLinkSpan.java | 67 final AnnotationLinkSpan span = new AnnotationLinkSpan(listener); in linkify() 68 builder.setSpan(span, in linkify() 71 msg.getSpanFlags(span)); in linkify()
|