Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1fcced6 authored by Roozbeh Pournader's avatar Roozbeh Pournader Committed by Android (Google) Code Review
Browse files

Merge "Make unicodeWrap() return null if the input string is null." into mnc-dev

parents 921ded79 f156cb31
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -377,9 +377,11 @@ public final class BidiFormatter {
     *        See {@link TextDirectionHeuristics} for pre-defined heuristics.
     * @param isolate Whether to directionally isolate the string to prevent it from garbling the
     *     content around it
     * @return Input string after applying the above processing.
     * @return Input string after applying the above processing. {@code null} if {@code str} is
     *     {@code null}.
     */
    public String unicodeWrap(String str, TextDirectionHeuristic heuristic, boolean isolate) {
        if (str == null) return null;
        final boolean isRtl = heuristic.isRtl(str, 0, str.length());
        StringBuilder result = new StringBuilder();
        if (getStereoReset() && isolate) {