@Override
    public void onLayoutChange(View v,
            int left, int top, int right, int bottom,
            int oldLeft, int oldTop, int oldRight, int oldBottom) {

        if (v.equals(view)) {
//            logger.log(Level.INFO, "surfaceview layout changed. left: {0}, top: {1}, right: {2}, bottom: {3}",
//                    new Object[]{left, top, right, bottom});

            if (v.equals(view) && maxResolutionDimension > 0) {
                int newWidth = right-left;
                int newHeight = bottom-top;

                if (viewWidth != newWidth || viewHeight != newHeight) {
                    if (logger.isLoggable(Level.FINE)) {
                        logger.log(Level.FINE, "SurfaceView layout changed: old width: {0}, old height: {1}, new width: {2}, new height: {3}",
                                new Object[]{viewWidth, viewHeight, newWidth, newHeight});
                    }
                    viewWidth = newWidth;
                    viewHeight = newHeight;

                    int fixedSizeWidth = viewWidth;
                    int fixedSizeHeight = viewHeight;
                    if (viewWidth > viewHeight && viewWidth > maxResolutionDimension) {
                        // landscape
                        fixedSizeWidth = maxResolutionDimension;
                        fixedSizeHeight = (int)(maxResolutionDimension * (viewHeight / (float)viewWidth));
                    } else if (viewHeight > viewWidth && viewHeight > maxResolutionDimension) {
                        // portrait
                        fixedSizeWidth = (int)(maxResolutionDimension * (viewWidth / (float)viewHeight));
                        fixedSizeHeight = maxResolutionDimension;
                    } else if (viewWidth == viewHeight && viewWidth > maxResolutionDimension) {
                        fixedSizeWidth = maxResolutionDimension;
                        fixedSizeHeight = maxResolutionDimension;
                    }
                    // set the surfaceview resolution if the size != current view size
                    if (fixedSizeWidth != viewWidth || fixedSizeHeight != viewHeight) {
                        if (logger.isLoggable(Level.FINE)) {
                            logger.log(Level.FINE, "setting surfaceview resolution to width: {0}, height: {1}",
                                    new Object[]{fixedSizeWidth, fixedSizeHeight});
                        }
                        view.getHolder().setFixedSize(fixedSizeWidth, fixedSizeHeight);
                    }
                }
            }
        }
    }
Removes the standard Android log handler due to an issue with not logging
entries lower than INFO level and adds a handler that produces
JME formatted log messages.
jme3-android/src/main/java/com/jme3/app/AndroidHarnessFragment.java