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

Commit 4b1b756d authored by Kunhung Li's avatar Kunhung Li
Browse files

Fix live wallpaper stays on AOD mode

After unlock the device, the live wallpaper status stay on AOD mode.

WallpaperConnect does not disconnect while users existing wallpaper
app by entering home or pressing back key.

Disconnect WallpaperConnection in onStop().

Video:
https://drive.google.com/file/d/13Ek4ZSyjNHeUcAv-nh9uT8daYHN4i7rm/view

Bug: 158434793
Test: Manual
Change-Id: I0eac6ff1bf6ba9be9d51987a330c1b1bd9c2bcd4
parent 6f62a996
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -89,6 +89,15 @@ public class WallpaperPreviewer implements LifecycleObserver {
        }
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
    @MainThread
    public void onStop() {
        if (mWallpaperConnection != null) {
            mWallpaperConnection.disconnect();
            mWallpaperConnection = null;
        }
    }

    @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
    @MainThread
    public void onDestroy() {