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

Commit 4c3d3e11 authored by Håkan Kvist's avatar Håkan Kvist Committed by Seigo Nonaka
Browse files

font_fallback, use language prio only if id prio not set

Corrected check for "not priority" to "priority is None"
in order to also allow value set to 0.
Previously 0 and None value would have been treated the same.

(cherry picked from https://partner-android-review.googlesource.com/q/commit:709479ff0383007a8e11b6a97dcc83cb042639b4)

Test: atest frameworks/base/data/fonts/script/test
Bug: 414480576
Flag: NONE build only fix
Change-Id: I635f3eef37c83195ad5d901fefb2bcba0f2a2110
parent 11908b1a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ class FallbackOrder:
    priority = None
    if family.id:
      priority = self.priority.get('id:%s' % family.id)
    if not priority and family.lang:
    if priority is None and family.lang:
      priority = self.priority.get('lang:%s' % family.lang)

    assert priority is not None, 'Unknown priority for %s' % family