Fix IWallpaperEngineWrapper NPE in wearOS
A crash was detected in wearOS. Simply add a null check to avoid that. Bug: 282156194 Test: treehugger (very safe, just a null check) Change-Id: I016c3c942b1b0099eaa423cad4b4d60c90804c79
This commit is contained in:
@@ -2231,7 +2231,7 @@ public abstract class WallpaperService extends Service {
|
||||
|
||||
mDestroyed = true;
|
||||
|
||||
if (mIWallpaperEngine.mDisplayManager != null) {
|
||||
if (mIWallpaperEngine != null && mIWallpaperEngine.mDisplayManager != null) {
|
||||
mIWallpaperEngine.mDisplayManager.unregisterDisplayListener(mDisplayListener);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user