From beff0828edffdf9f78e12f0789e1fc47fbba2652 Mon Sep 17 00:00:00 2001 From: inthroxify Date: Thu, 15 Aug 2019 10:20:30 -0600 Subject: [PATCH] Fix flutter/flutter #34791 (flutter/engine#9977) This is a fix for [flutter/flutter issue #34791](https://github.com/flutter/flutter/issues/34791). PR #8048 in flutter/engine produced a bug/regression (flutter/flutter #34791) in flutter for Android that doesn't permit the Recents app bar color to be changed. This restores the original arguments to the function found in the previous version (https://github.com/flutter/engine/blob/7187e271f23d2e5919f79d27b890475181916480/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java) of PlatformPlugin.java while preserving the enhancements for the linter. I've compiled and tested this fix locally. The bar changes color again. --- .../android/io/flutter/plugin/platform/PlatformPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java b/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java index bed7648a523..e9c5af010af 100644 --- a/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java +++ b/engine/src/flutter/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java @@ -144,7 +144,7 @@ public class PlatformPlugin { // Linter refuses to believe we're only executing this code in API 28 unless we use distinct if blocks and // hardcode the API 28 constant. if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P && Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) { - activity.setTaskDescription(new TaskDescription(description.label)); + activity.setTaskDescription(new TaskDescription(description.label, /*icon=*/ null, description.color)); } if (Build.VERSION.SDK_INT >= 28) { TaskDescription taskDescription = new TaskDescription(description.label, 0, description.color);