Merge "Fix NPE with live wallpaper" into qt-dev

This commit is contained in:
TreeHugger Robot
2019-05-21 10:17:40 +00:00
committed by Android (Google) Code Review

View File

@@ -136,8 +136,12 @@ final class PhoneStateMonitor {
} }
private boolean isLauncherShowing(ActivityManager.RunningTaskInfo runningTaskInfo) { private boolean isLauncherShowing(ActivityManager.RunningTaskInfo runningTaskInfo) {
if (runningTaskInfo == null) {
return false;
} else {
return runningTaskInfo.topActivity.equals(mDefaultHome); return runningTaskInfo.topActivity.equals(mDefaultHome);
} }
}
private boolean isAppImmersive() { private boolean isAppImmersive() {
return SysUiServiceProvider.getComponent(mContext, StatusBar.class).inImmersiveMode(); return SysUiServiceProvider.getComponent(mContext, StatusBar.class).inImmersiveMode();