Merge "Check null taskInfo for occlude-by-dream" into udc-dev am: 7cfd239b42

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23401111

Change-Id: Id8c657853ecc624da4c30da76c17222360b443ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-05-24 12:00:17 +00:00
committed by Automerger Merge Worker

View File

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