I have this bug that I don't know how to solve... spent ages looking
at it, but it seems to be in base GLWallpaperService code that is in
control of this stuff, and not my code.
I have given my engines unique ID's as the system asks for them to be
created with onCreateEngine, so that I can print out log messages to
see the order of functions called.
This is what I do:
1. My wallpaper is already running, with Engine0 being in control.
2. I then go to the Personalize->Wallpaper menu and select my same
wallpaper again.
3. At this point Engine0 is paused, and Engine1 is created (for the
preview) and resumed. (I would say this is correct).
4. I then click 'Apply'.
5. The new Engine1 is paused, BUT then Engine1 is resumed again.
Surely this should be the first Engine0?
What I end up with is my wallpaper being frozen after the preview. I
need to turn my screen on and off again for it to unfreeze and resume
Engine0 correctly.
I also tried Adam Ratana's wallpaper:
https://play.google.com/store/apps/details?id=com.ratana.jazzcat.biomechanicalbogfree
and it suffers from the same issue. Again, you must have your
wallpaper running already and then go and preview it again and apply
for the issue to manifest.
If the wallpaper is not running first, then it is fine... but still
there are some resumes in the log that are for the preview engine
after you are back on the home page. Is this a known issue? Is there
a fix? Is there some way to remove the preview engine from the list
of active engines after you apply perhaps?
Any ideas??? :)