Skip to content

Commit

Permalink
Add missing dependency from AndroidTextInput (facebook#43448)
Browse files Browse the repository at this point in the history
Summary:

## Changelog:
[Internal] - 

This adds a stub for `TextLayoutManager.measureCachedSpannableById`, as well as a missing explicit dependency to `jni/react/jni` from the `TextInput` implementation on the Android platform.

This is required in order for certain build configurations to compile.

Differential Revision: D54807518
  • Loading branch information
rshest authored and facebook-github-bot committed Mar 12, 2024
1 parent 92540a6 commit 43f6d51
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ TextMeasurement TextLayoutManager::measure(
return TextMeasurement{{0, 0}, attachments};
}

TextMeasurement TextLayoutManager::measureCachedSpannableById(
int64_t /*cacheId*/,
const ParagraphAttributes& /*paragraphAttributes*/,
LayoutConstraints /*layoutConstraints*/) const {
return {};
}

LinesMeasurements TextLayoutManager::measureLines(
AttributedString attributedString,
ParagraphAttributes paragraphAttributes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ class TextLayoutManager {
LayoutConstraints layoutConstraints,
std::shared_ptr<void>) const;

/**
* Measures an AttributedString on the platform, as identified by some
* opaque cache ID.
*/
virtual TextMeasurement measureCachedSpannableById(
int64_t cacheId,
const ParagraphAttributes& paragraphAttributes,
LayoutConstraints layoutConstraints) const;

/*
* Measures lines of `attributedString` using native text rendering
* infrastructure.
Expand Down

0 comments on commit 43f6d51

Please sign in to comment.