mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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 (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:
parent
c0fa27aee5
commit
beff0828ed
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user