Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 753db8ac authored by lijilou's avatar lijilou Committed by Jilou li
Browse files

WallpaperManagerService:fix potential null pointer exception in onDisplayRemoved method.

Test: OEM monkey test
Bug: 347869068
Change-Id: I68840f68f1d46ba40e6b3f89d62b7ba99eabd6a3
parent c4cb9057
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -629,9 +629,12 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
            synchronized (mLock) {
                if (mLastWallpaper != null) {
                    WallpaperData targetWallpaper = null;
                    if (mLastWallpaper.connection.containsDisplay(displayId)) {
                    if (mLastWallpaper.connection != null &&
                            mLastWallpaper.connection.containsDisplay(displayId)) {
                        targetWallpaper = mLastWallpaper;
                    } else if (mFallbackWallpaper.connection.containsDisplay(displayId)) {
                    } else if (mFallbackWallpaper != null &&
                            mFallbackWallpaper.connection != null &&
                            mFallbackWallpaper.connection.containsDisplay(displayId)) {
                        targetWallpaper = mFallbackWallpaper;
                    }
                    if (targetWallpaper == null) return;