Process: com.song.wallpaper, PID: 4734
java.lang.RuntimeException: Fail to connect to camera service
at android.hardware.Camera.(Camera.java:545)
at android.hardware.Camera.open(Camera.java:403)
at com.song.wallpaper.CameraLiveWallpaper$CameraEngine.startPreview(CameraLiveWallpaper.java:62)
at com.song.wallpaper.CameraLiveWallpaper$CameraEngine.onVisibilityChanged(CameraLiveWallpaper.java:52)
at android.service.wallpaper.WallpaperService$Engine.updateSurface(WallpaperService.java:848)
at android.service.wallpaper.WallpaperService$Engine.attach(WallpaperService.java:899)
at android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:1166)
at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:37)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5944)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Process: com.song.wallpaper, PID: 4734 java.lang.RuntimeException: Fail to connect to camera service at android.hardware.Camera.(Camera.java:545)
at android.hardware.Camera.open(Camera.java:403)
at com.song.wallpaper.CameraLiveWallpaper$CameraEngine.startPreview(CameraLiveWallpaper.java:62)
at com.song.wallpaper.CameraLiveWallpaper$CameraEngine.onVisibilityChanged(CameraLiveWallpaper.java:52)
at android.service.wallpaper.WallpaperService$Engine.updateSurface(WallpaperService.java:848)
at android.service.wallpaper.WallpaperService$Engine.attach(WallpaperService.java:899)
at android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:1166)
at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:37)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5944)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)