Reputation: 463
Yesterday Samsung published an update for the Galaxy Watch4. Since then I am being flooded by users' emails saying that my watch face is crashing and is unusable. The crash happens when the watch switches between normal and ambient mode.
According to some articles published today (https://www.xda-developers.com/galaxy-watch-4-update-breaking-watch-faces) the WatchFaceService.Engine is not supported any longer or broken in the new update.
What is confusing, is that while my watch face crashes, other watch faces simply don't get updated in ambient mode, because apparently onTimeTick() is not being called. But I still cannot figure out how to avoid the crash. The debug information only says "java.lang.RuntimeException: eglCreateWindowSurface failed", but does not point to any line in my code:
2022-02-11 11:21:55.612 4652-4652/com.xxxx.mywatchface E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.xxxx.mywatchface, PID: 4652
java.lang.RuntimeException: eglCreateWindowSurface failed
at android.support.wearable.watchface.Gles2WatchFaceService$Engine.createWindowSurface(Gles2WatchFaceService.java:202)
at android.support.wearable.watchface.Gles2WatchFaceService$Engine.onSurfaceChanged(Gles2WatchFaceService.java:300)
at android.service.wallpaper.WallpaperService$Engine.updateSurface(WallpaperService.java:1082)
at android.service.wallpaper.WallpaperService$Engine.reportVisibility(WallpaperService.java:1296)
at android.service.wallpaper.WallpaperService$Engine$3.onDisplayChanged(WallpaperService.java:1439)
at android.hardware.display.DisplayManagerGlobal$DisplayListenerDelegate.handleMessage(DisplayManagerGlobal.java:767)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:7690)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)
Does any body know more about this? Should WatchFaceService not longer be supported, what is the alternative to it?
Upvotes: 2
Views: 479
Reputation: 5986
That's a broken release of a firmware update by Samsung.
I performed a few tests regarding this issue.
My conclusion is that they "blocked" on the firmware layer, the lock request of the CPU - now, a process that requests a CPU lock is ignored.
I am not familiar with the onTimeTick()
method of the watch face API, but I guess it requests CPU lock to update the GUI.
According to the documentation, This is how a process claims a CPU lock, and now, after this update, those lines of code gets ignored:
Kotlin Code:
val pm = getSystemService(POWER_SERVICE) as PowerManager
wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "awake")
wl.acquire(
MainActivityModel.convertDegreesToMilliseconds(rotationValue)
.toLong()
)
Maybe you can find more information or an update about a hotfix here:
https://forum.developer.samsung.com/c/watch-face-studio/49
Upvotes: 1