From d48f5a7c1e6ba98e03f79ea9f8066e5241f05472 Mon Sep 17 00:00:00 2001 From: inthroxify Date: Sun, 14 Jul 2019 21:44:48 -0600 Subject: [PATCH 1/2] Fix flutter/flutter #34791 PR #8048 in flutter/engine produced a bug (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/2f4a38dbd33061e950cf83ddc31785803d58c126/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java) of PlatformPlugin.java while preserving the enhancements for the linter. --- .../android/io/flutter/plugin/platform/PlatformPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java b/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java index 3ca13ec44a2fd..38b7e7510a7f3 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java @@ -144,7 +144,7 @@ private void setSystemChromeApplicationSwitcherDescription(PlatformChannel.AppSw // 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, null, description.color)); } if (Build.VERSION.SDK_INT >= 28) { TaskDescription taskDescription = new TaskDescription(description.label, 0, description.color); From 86d7176da5b9a6a2c556ce56d9186f751b076596 Mon Sep 17 00:00:00 2001 From: inthroxify Date: Wed, 14 Aug 2019 20:25:01 -0600 Subject: [PATCH 2/2] Update shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java Annotate the icon parameter for anybody reading the code who doesn't know the whole method signature. Co-Authored-By: Michael Klimushyn --- .../android/io/flutter/plugin/platform/PlatformPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java b/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java index 38b7e7510a7f3..6d7a5b5274591 100644 --- a/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java +++ b/shell/platform/android/io/flutter/plugin/platform/PlatformPlugin.java @@ -144,7 +144,7 @@ private void setSystemChromeApplicationSwitcherDescription(PlatformChannel.AppSw // 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, null, description.color)); + 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);