Java andengine LiveWallper不';不要对提供的解决方案政策作出反应

Java andengine LiveWallper不';不要对提供的解决方案政策作出反应,java,android,andengine,live-wallpaper,Java,Android,Andengine,Live Wallpaper,我试图使用本主题中的CroppedResolutionPolicy。这是我的密码: @Override public EngineOptions onCreateEngineOptions() { this.cameraWidth = getResources().getDisplayMetrics().widthPixels; this.cameraHeight = getResources().getDisplayMetrics().heightPixels;

我试图使用本主题中的CroppedResolutionPolicy。这是我的密码:

@Override
public EngineOptions onCreateEngineOptions() {
        this.cameraWidth = getResources().getDisplayMetrics().widthPixels;
        this.cameraHeight = getResources().getDisplayMetrics().heightPixels;
        this.camera = CameraFactory.createPixelPerfectCamera(this, this.cameraWidth / 2.0F, this.cameraHeight / 2.0F);
        this.camera.setResizeOnSurfaceSizeChanged(true);
        this.dpi = getResources().getDisplayMetrics().densityDpi;

        CroppedResolutionPolicy croppedResolutionPolicy = new CroppedResolutionPolicy(this.cameraWidth, this.cameraHeight);
        EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.PORTRAIT_SENSOR, croppedResolutionPolicy, this.camera);
        engineOptions.getAudioOptions().setNeedsSound(true);
        return engineOptions;
}
但我注意到方法CroppedResolutionPolicy.onMeasure从不调用。 我在我的HTC Sensation上调试了它

andengine LiveWallper似乎根本不对提供的解决策略做出反应。。至少在我的HTC上

如何在我的壁纸中正确应用裁剪解决方案策略?谢谢