OSDN Git Service

Hide packing structure from public API
authorSeigo Nonaka <nona@google.com>
Fri, 8 Mar 2019 22:05:08 +0000 (14:05 -0800)
committerSeigo Nonaka <nona@google.com>
Mon, 11 Mar 2019 23:51:47 +0000 (16:51 -0700)
commitfb1b47931407723a83045f649235d53982116f98
tree38e91f9f95e0979a2156520b1170b11194343b20
parent36ad7638dc4066ec8d563ff9c7fd94fa8291a931
Hide packing structure from public API

The hyphen edit is packed into 8bit integer in native library, but this
should not be exposed to public API as API council suggested.

This CL includes:
- Removing packing structure from HyphenEdit and move constants from
  Hyphenator to Paint.
- Replace LineBreaker's getLineHyphenEdit with two separate start/end
  function.
- Replace Paint's getHyphenEdit with two separate start/end function.
- StaticLayout still relies on this packing mechanism but no longer need
  to be the same packing structure as in Minikin.

Bug: 124794844
Test: atest CtsGraphicsTestCases
Test: atest CtsTextTestCases
Change-Id: I8206061f554cf6e119b2b565162f54317eac630a
13 files changed:
api/current.txt
core/java/android/text/DynamicLayout.java
core/java/android/text/Hyphenator.java
core/java/android/text/Layout.java
core/java/android/text/StaticLayout.java
core/java/android/text/TextLine.java
core/jni/android/graphics/Paint.cpp
core/tests/coretests/src/android/text/StaticLayoutTest.java
core/tests/coretests/src/android/widget/TextViewTest.java
graphics/java/android/graphics/Paint.java
graphics/java/android/graphics/text/LineBreaker.java
libs/hwui/hwui/MinikinUtils.cpp
libs/hwui/hwui/Paint.h