diff --git a/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java b/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java index f13730e602a0a..3f5c2c8f45d5d 100644 --- a/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java +++ b/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java @@ -171,8 +171,8 @@ public final class PhoneStateMonitor { return mStatusBarStateController.isDozing(); } - private boolean isLauncherShowing(ActivityManager.RunningTaskInfo runningTaskInfo) { - if (runningTaskInfo == null) { + private boolean isLauncherShowing(@Nullable ActivityManager.RunningTaskInfo runningTaskInfo) { + if (runningTaskInfo == null || runningTaskInfo.topActivity == null) { return false; } else { return runningTaskInfo.topActivity.equals(mDefaultHome);