During reinflation, the panel could be stuck in
a bad state where qs edit mode was on but not
visible. QS edit now persists through reinflations.
Test: manual
Change-Id: I6e7a20fda2db2184a26a11093064a1367469ab45
Fixes: 62807612
Previously, font underline position and thickness were fixed in Android.
Although a custom font may have specified a different value, such a value
would never be used. Now we use the values from the font if they are
provided and fall back to the old default values only if needed.
Bug: 62353930
Test: adb shell am instrument -w -e package android.graphics com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: adb shell am instrument -w -e package android.text com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: cts-tradefed run cts-dev --module CtsTextTestCases
Test: Manual
Change-Id: I6bf21000dd69a2780c894b231638bc0c122e41f4
Since Recents never goes away that means TaskViewThumbnail
never goes away which in turn means mDrawPaint never goes away.
mDrawPaint has a setShader(null) called on it to release
the BitmapShader it was previously drawn with, but that
change didn't push down to native until the next time the
paint was used. As a result, the Paint held on to a
reference to the bitmap.
The fix is simple, when the shader is changed simply
push down an immediate clear of the native shader. Since
the bitmap of a BitmapShader isn't changeable we don't
need to worry about clearing references for shader mutation,
merely when Paint#setShader() happens.
Bug: 38258699
Test: Open & close recents, observe EGL memory immediately returns
to sub-5MB.
Change-Id: I6742efa8ae8dfca76b62a06bc1a1a00646feba64
Also, in TextLine, fix underline color and thickness to come from the
underline info rather than the TextPaint object.
Bug: 32907446
Bug: 62353930
Test: Manual
Test: cts-tradefed run cts-dev --module CtsTextTestCases
Test: cts-tradefed run cts-dev --module CtsWidgetTestCases
Change-Id: I259e9cf635a7056ccd367baa77c03100c69e3b98
Moved the error checking to an earlier stage of the AVD, so that
the error message can contain more information.
BUG: 36571432
Test: Follow the repro step in b/36244835, the error message
is much clear now.
Change-Id: Ibc6a0e666cc4c23c3dfa589755a77a015da2db1c
Previously, we had singled out UnderlineSpan for special treatment
for proper kerning at span boundaries. That had the limitation that
any other span that used underlining, or even subclasses of
UnderlineSpan were not getting the fix.
With this CL, we actually look at all the effects of applying a
span's updateDrawState() and if the changes were only in underlining,
we merge the pieces and call handleText() on the merged chunk of
text.
Change-Id: I829162c758192b80594f164d1105699224b627ba
Bug: 32907446
Test: cts-tradefed run cts-dev --module CtsTextTestCases
Test: cts-tradefed run cts-dev --module CtsWidgetTestCases
Test: manual
The Typeface kept by Paint object can be null if nobody calls
setTypeface. The null typeface is equivalent to the Typeface.DEFAULT.
To check whether the passed axis is usable for Typeface.DEFAULT, we
need to pass Typeface.DEFAULT to isSupportedAxes if no typeface was set
on the Paint.
At the same time this CL fixes an issue in isSupportedAxes.
If the requested axis is listed in the first element of axes list,
isSupportedAxes returned false due to wrong handling of binarySearch
result.
Bug: 62146672
Bug: 62147012
Test: am instrument -w -e class android.graphics.cts.PaintTest
android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Change-Id: I7c154adfe8a19d6ed24ad645df7c10cee7880461
Through the file's javadoc comments, the less-than character is
improperly coded as "<" instead of "<" (it's missing the
terminating semicolon). Chrome is clever enough to render that as <
, but I don't know if other browsers do, and in any event we
shouldn't count on that behavior.
Doc is staged to:
http://go/dac-stage/reference/android/graphics/drawable/RippleDrawable.html
Test: make ds-docs
Bug: 62028102
Change-Id: I81813fcb758349300f56ce10ccb0d03046ab4736
For apps targeting releases earlier than O setBitmap will attempt
to preserve the matrix from the previous bitmap. It does not however
attempt to reconstruct the save/restore stack or the clip.
Test: manual test of messenger app referenced in the bug
Bug: 37589964
Change-Id: I67f0928a3f84a8be41da38ef1868e79bdeb03e46
resolveStyle increases minikinStyle's weight value based on Skia's style
value. Since we compute Skia's style based on given weight value, we
should not add extra bold weight to minikinStyle.
This CL also fixes misunderstanding of base weight.
The base weight is only used for computing weight relative to the
weighted alias. Thus, base weight should not be updated except for
createWeightAlias method.
To be clear, this CL changes the function names but keeps the same
semantics as before.
Test: adb shell /data/nativetest/hwui_unit_tests/hwui_unit_tests
Test: am instrument -w -e class android.graphics.cts.TypefaceTest\
android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Bug: 37880319
Merged-In: Ied73189b11792fb062da46f45afd2db664e6ecb4
Change-Id: I82350a1bfb99ce198b955f127949e21bccccb1cb
resolveStyle increases minikinStyle's weight value based on Skia's style
value. Since we compute Skia's style based on given weight value, we
should not add extra bold weight to minikinStyle.
This CL also fixes misunderstanding of base weight.
The base weight is only used for computing weight relative to the
weighted alias. Thus, base weight should not be updated except for
createWeightAlias method.
To be clear, this CL changes the function names but keeps the same
semantics as before.
Test: adb shell /data/nativetest/hwui_unit_tests/hwui_unit_tests
Test: am instrument -w -e class android.graphics.cts.TypefaceTest\
android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Bug: 37880319
Change-Id: Ied73189b11792fb062da46f45afd2db664e6ecb4