Validate if the surface of wallpaper is valid before creating EglSurface.

Make sure the surface is still valid before creating egl surface, or it
might crash sysui accidently during cts and make test case fail.

Bug: 141756892
Test: make a local build
Test: acloud create --local-image
Test: atest CtsAppTestCases:android.app.cts.WallpaperManagerTest
--rerun-until-failure 10 -- --abi x86

Change-Id: I106c55a510ba30d90f797fa3419751d4b5128f8c
1 file changed