diff --git a/android/src/main/java/com/idlefish/flutterboost/XPlatformPlugin.java b/android/src/main/java/com/idlefish/flutterboost/XPlatformPlugin.java
index dbf4ee634e5e39f474a00ba71cd2a8ba13308884..4239582c0064a5ae306b89e230b2b1fcd21cbf3e 100644
--- a/android/src/main/java/com/idlefish/flutterboost/XPlatformPlugin.java
+++ b/android/src/main/java/com/idlefish/flutterboost/XPlatformPlugin.java
@@ -126,11 +126,11 @@ public class XPlatformPlugin implements ActivityLifecycleListener {
 
         // 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) {
+        if (Build.VERSION.SDK_INT < 28 && Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP) {
             activity.setTaskDescription(new TaskDescription(description.label));
         }
         if (Build.VERSION.SDK_INT >= 28) {
-            TaskDescription taskDescription = new TaskDescription(description.label, 0, description.color);
+            TaskDescription taskDescription = new TaskDescription(description.label, null, description.color);
             activity.setTaskDescription(taskDescription);
         }
     }