Skip to content
Commit c3e257fc authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Check for nullness in WallpaperService onDestroy

There are cases where the WallpaperService API is misused and an instance is created manually. In those cases, onCreate is not called as expected, but onDestroy is.
As mBackgroundThread was being created `onCreate`, it ended up being null in onDestroy.

Adding a null check to avoid breaking those places.

Bug: 275361339
Test: androidx.wear.watchface.editor.EditorSessionTest#commitWithPreviewImage
Change-Id: I89076da179493fa282f3e59895cfa4f4bfb6bdfc
parent ee3afca5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment