Add theme & View API to control force-dark

Bug: 102591313
Test: CTS android.uirendering.cts.testclasses.ForceDarkTests

Change-Id: I6ba129681aed8e2f3f1b1ac60d458bb5f5393e9b
This commit is contained in:
John Reck
2018-10-01 12:21:55 -07:00
parent c63d1cc434
commit a2d20b447a
9 changed files with 49 additions and 27 deletions

View File

@@ -1294,7 +1294,7 @@ public final class Bitmap implements Parcelable {
final RenderNode node = RenderNode.create("BitmapTemporary", null);
node.setLeftTopRightBottom(0, 0, width, height);
node.setClipToBounds(false);
node.setAllowForceDark(false);
node.setForceDarkAllowed(false);
final RecordingCanvas canvas = node.start(width, height);
if (source.getWidth() != width || source.getHeight() != height) {
canvas.scale(width / (float) source.getWidth(),