commit | 2c1d7f41e1ce40007f4a970cab6c9fad3938c678 | [log] [tgz] |
---|---|---|
author | chihhangchuang <chihhangchuang@google.com> | Mon Jun 01 17:22:34 2020 +0800 |
committer | chihhangchuang <chihhangchuang@google.com> | Mon Jun 01 17:22:34 2020 +0800 |
tree | bf061e7b72ce3df8c4ea2e166a6901c98e30872a | |
parent | c4d30d641a9f7312078a300e42cb18ef9678dff5 [diff] |
Fix runtime crash of using null wallpaperConnection instance Test: Manually Fixes: 157623239 Change-Id: Idb542b7febbab537e5adf9a01aeaa0272404688d
diff --git a/src/com/android/customization/picker/WallpaperPreviewer.java b/src/com/android/customization/picker/WallpaperPreviewer.java index 0185925..8f69d59 100644 --- a/src/com/android/customization/picker/WallpaperPreviewer.java +++ b/src/com/android/customization/picker/WallpaperPreviewer.java
@@ -174,7 +174,7 @@ mWallpaperConnection.setVisibility(true); mHomePreview.post(() -> { - if (!mWallpaperConnection.connect()) { + if (mWallpaperConnection != null && !mWallpaperConnection.connect()) { mWallpaperConnection = null; LiveTileOverlay.INSTANCE.detach(mHomePreview.getOverlay()); }