Moved construction to onCreate.
authorArmin Novak <armin.novak@thincast.com>
Fri, 24 Feb 2017 10:30:04 +0000 (11:30 +0100)
committerArmin Novak <armin.novak@thincast.com>
Fri, 24 Feb 2017 10:30:36 +0000 (11:30 +0100)
client/Android/Studio/freeRDPCore/src/main/java/com/freerdp/freerdpcore/application/GlobalApp.java

index 3bca3f5..1fb5318 100644 (file)
@@ -54,12 +54,6 @@ public class GlobalApp extends Application implements LibFreeRDP.EventListener {
     // timer for disconnecting sessions after the screen was turned off
     private static Timer disconnectTimer = null;
 
-    public GlobalApp() {
-        sessionMap = Collections.synchronizedMap(new HashMap<Long, SessionState>());
-
-        LibFreeRDP.setEventListener(this);
-    }
-
     public static ManualBookmarkGateway getManualBookmarkGateway() {
         return manualBookmarkGateway;
     }
@@ -123,6 +117,10 @@ public class GlobalApp extends Application implements LibFreeRDP.EventListener {
         /* Initialize preferences. */
         ApplicationSettingsActivity.get(this);
 
+        sessionMap = Collections.synchronizedMap(new HashMap<Long, SessionState>());
+
+        LibFreeRDP.setEventListener(this);
+
         bookmarkDB = new BookmarkDB(this);
 
         manualBookmarkGateway = new ManualBookmarkGateway(bookmarkDB);