Check null taskInfo for occlude-by-dream

Another instance of I479b05a5da896a166a375d30fdf050dc87448f3c
specific to the transition/remote animator for dream starting
over keyguard.

Change-Id: I731f5f10abfcc47e8a54bfa07445f25c2eb977b0
Test: atest android.platform.test.scenario.sysui.lockscreen
Fix: 283335509
This commit is contained in:
Robin Lee
2023-05-23 02:54:37 +00:00
parent 31877672c4
commit 826c782082

View File

@@ -140,8 +140,8 @@ public class KeyguardService extends Service {
return apps.length == 0 ? TRANSIT_OLD_KEYGUARD_GOING_AWAY_ON_WALLPAPER return apps.length == 0 ? TRANSIT_OLD_KEYGUARD_GOING_AWAY_ON_WALLPAPER
: TRANSIT_OLD_KEYGUARD_GOING_AWAY; : TRANSIT_OLD_KEYGUARD_GOING_AWAY;
} else if (type == TRANSIT_KEYGUARD_OCCLUDE) { } else if (type == TRANSIT_KEYGUARD_OCCLUDE) {
boolean isOccludeByDream = apps.length > 0 && apps[0].taskInfo.topActivityType boolean isOccludeByDream = apps.length > 0 && apps[0].taskInfo != null
== WindowConfiguration.ACTIVITY_TYPE_DREAM; && apps[0].taskInfo.topActivityType == WindowConfiguration.ACTIVITY_TYPE_DREAM;
if (isOccludeByDream) return TRANSIT_OLD_KEYGUARD_OCCLUDE_BY_DREAM; if (isOccludeByDream) return TRANSIT_OLD_KEYGUARD_OCCLUDE_BY_DREAM;
return TRANSIT_OLD_KEYGUARD_OCCLUDE; return TRANSIT_OLD_KEYGUARD_OCCLUDE;
} else if (type == TRANSIT_KEYGUARD_UNOCCLUDE) { } else if (type == TRANSIT_KEYGUARD_UNOCCLUDE) {