// **************************************************************************** // LibFreeRDP UI event listener implementation @Override public void OnSettingsChanged(int width, int height, int bpp) { if (bpp > 16) bitmap = Bitmap.createBitmap(width, height, Config.ARGB_8888); else bitmap = Bitmap.createBitmap(width, height, Config.RGB_565); session.setSurface(new BitmapDrawable(bitmap)); // check this settings and initial settings - if they are not equal the server doesn't support // our settings // FIXME: the additional check (settings.getWidth() != width + 1) is for the RDVH bug fix to // avoid accidental notifications // (refer to android_freerdp.c for more info on this problem) BookmarkBase.ScreenSettings settings = session.getBookmark().getActiveScreenSettings(); if ((settings.getWidth() != width && settings.getWidth() != width + 1) || settings.getHeight() != height || settings.getColors() != bpp) uiHandler.sendMessage( Message.obtain( null, UIHandler.DISPLAY_TOAST, getResources().getText(R.string.info_capabilities_changed))); }