remove temporary hack
This commit is contained in:
parent
c7be2089d6
commit
ba6f5ea6dd
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 */ } }
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user