I have a running live wallpaper and react to SCREEN_ON
event to display changes on the canvas. However on some phones the user can set a different lockscreen and homescreen wallpaper (Touchwiz, some Xperia devices). When the user has set a different wallpaper on the lockscreen my live wallpaper is not shown.
On the Galaxy S3 I used WallpaperService.Engine.isVisible()
and it correctly returns false
when the user has set a different lockscreen wallpaper. On the Galaxy S3 Mini, however, this does not work, because isVisible()
returns true
whether or not my live wallpaper is the active lockscreen wallpaper.
WallpaperManager.getWallpaperInfo()
or WallpaperManager.peekDrawable()
don't work either, because getWallpaperInfo()
returns my live wallpaper regardless of the current lockscreen wallpaper, and peekDrawable()
returns a valid drawable even if my live wallpaper is set for both screens. I tried listening to WallpaperService.Engine.onTouchEvent(..)
, but the touch events from the lockscreen don't get through to my live wallpaper, because they are consumed by the unlock slider.
Is there any other way to detect if my live wallpaper is the current lockscreen wallpaper? I'm fine with reflection-hacks, workarounds, everything that will let me do this.
EDIT: it also works on the Galaxy Note 2, bot not on the Xperia T LT30p