remove temporary hack

This commit is contained in:
Aleksei Kliuev 2017-10-26 15:36:53 +03:00
parent c7be2089d6
commit ba6f5ea6dd
2 changed files with 1 additions and 13 deletions

View File

@ -106,7 +106,7 @@ public class GlobalApp extends Application implements LibFreeRDP.EventListener {
static public void freeSession(long instance) {
if (GlobalApp.sessionMap.containsKey(instance)) {
GlobalApp.sessionMap.remove(instance);
//LibFreeRDP.freeInstance(instance);
LibFreeRDP.freeInstance(instance);
}
}

View File

@ -358,9 +358,6 @@ public class SessionActivity extends AppCompatActivity implements
// remove clipboard listener
mClipboardManager.removeClipboardboardChangedListener(this);
// FIXME: prevent crashing app in DeX Mode: app crashes with popup window when user manually closes the Window
DexFixCloseWin();
// free session
GlobalApp.freeSession(session.getInstance());
@ -1366,13 +1363,4 @@ public class SessionActivity extends AppCompatActivity implements
}
}
private void DexFixCloseWin() {
UiModeManager uiMode = (UiModeManager) getSystemService(Context.UI_MODE_SERVICE);
//Density for mdpi is 160
int density = getResources().getDisplayMetrics().densityDpi;
boolean isDex = ((uiMode.getCurrentModeType() == Configuration.UI_MODE_TYPE_DESK) && density == 160);
if (isDex) { try { Thread.sleep(100); } catch (InterruptedException e) { /* NOP */ } }
}
}