Temporarily add a null intent check.
Due to b/403118101, add temproray null intent check to prevent tests
from failing for longer until we identify why there is task with bunch
of null fields.
Bug: 403118101
Flag: EXEMPT Bug fix
Test: m
Change-Id: I11246c1143d1acbe45133f0e34785818bce3dba9
diff --git a/quickstep/src/com/android/quickstep/util/DesksUtils.kt b/quickstep/src/com/android/quickstep/util/DesksUtils.kt
index a10f771..521ba27 100644
--- a/quickstep/src/com/android/quickstep/util/DesksUtils.kt
+++ b/quickstep/src/com/android/quickstep/util/DesksUtils.kt
@@ -19,7 +19,6 @@
import android.app.TaskInfo
import android.content.ComponentName
import android.content.res.Resources
-import android.util.Log
import android.window.DesktopExperienceFlags
import com.android.systemui.shared.recents.model.Task
@@ -40,7 +39,9 @@
@JvmStatic
fun isDesktopWallpaperTask(taskInfo: TaskInfo): Boolean {
- Log.d("b/403118101", "isDesktopWallpaperTask: $taskInfo")
+ // TODO: b/403118101 - In some launcher tests, there is a task with baseIntent set to
+ // null. Remove this check after finding out how that task is created.
+ if (taskInfo.baseIntent == null) return false
return taskInfo.baseIntent.component?.let(::isDesktopWallpaperComponent) == true
}