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 (7187e271f2/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.
This commit is contained in:
inthroxify 2019-08-15 10:20:30 -06:00 committed by Michael Klimushyn
parent c0fa27aee5
commit beff0828ed

View File

@ -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);